Убрал IIFE — doLogin теперь доступен глобально для onclick
This commit is contained in:
parent
cca3e99623
commit
b68dd5b138
@ -148,7 +148,7 @@ body{font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,s
|
||||
<div id="formLogin" class="login-form active">
|
||||
<div class="fg"><label>Логин</label><input type="text" id="loginUser" placeholder="Введите логин"></div>
|
||||
<div class="fg"><label>Пароль</label><input type="password" id="loginPass" placeholder="Введите пароль"></div>
|
||||
<button class="btn btn-primary btn-block" id="loginBtn">Войти</button>
|
||||
<button class="btn btn-primary btn-block" id="loginBtn" onclick="doLogin()">Войти</button>
|
||||
<div class="err-msg" id="loginError">Неверный логин или пароль</div>
|
||||
</div>
|
||||
<div id="formRegister" class="login-form">
|
||||
@ -217,7 +217,6 @@ body{font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,s
|
||||
</div></div>
|
||||
|
||||
<script>
|
||||
(function(){
|
||||
"use strict";
|
||||
// ===== DATA =====
|
||||
var PREDEFINED = {admin:{pass:"admin",name:"Администратор",role:"Руководитель",email:"admin@telecom.kz",branch:"АО «Казахтелеком»",dept:"ЦА",region:"Центральный",oblast:"—",city:"г. Астана"}};
|
||||
@ -474,7 +473,6 @@ function init(){
|
||||
var saved=localStorage.getItem("pab_current");if(saved){try{currentUser=JSON.parse(saved);showApp()}catch(e){localStorage.removeItem("pab_current")}}
|
||||
}
|
||||
init();
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user