2 <script
type=
"text/javascript" src=
"../system/engines/jquery/jscolor/jscolor.js"></script>
3 <!-- --><script
type=
"text/javascript" src=
"../system/engines/jquery/bootstrap-tabcollapse.js"></script>
6 <script
type=
"text/javascript">
7 function saveHotkey() {
10 if (!(
event.which === 115 && (navigator.platform.match(
"Mac") ?
event.metaKey :
event.ctrlKey)) && !(
event.which === 19))
return true;
11 event.preventDefault();
16 $(document).keydown(
function (
event) {
17 if (
event.which === 83 && (navigator.platform.match(
"Mac") ?
event.metaKey :
event.ctrlKey)) {
18 event.preventDefault();
19 $(
'#savebutton').click();
27 $(document).
ready(
function()
30 const savebutton = (
'#savebutton');
31 const savebuttonIcon = (
'#savebuttonIcon');
33 const editor = (
'textarea#summernote');
36 $(savebutton).click(
function() {
37 $(savebutton).removeClass(
'btn btn-success').addClass(
'btn btn-warning disabled');
38 $(savebuttonIcon).removeClass(
'fa fa-check').addClass(
'fa fa-spinner fa-spin fa-fw');
40 if ($(editor).summernote(
'codeview.isActivated')) {
42 $(editor).summernote(
'codeview.deactivate');
45 const backendFooter = $(
'#backendFooter');
46 const backendFooterValueLeft = $(
'#backendFooterValueLeft');
47 const backendFooterValueRight = $(
'#backendFooterValueRight');
48 const backendFooterCopyright = $(
'#backendFooterCopyright');
49 const backendLogoUrl = $(
'#backendLogoUrl');
50 const backendLogoText = $(
'#backendLogoText');
51 const backendLogoSubText = $(
'#backendLogoSubText');
52 const backendFX = $(
'#backendFX');
53 const backendFXtype = $(
'#backendFXtype');
54 const backendFXtime = $(
'#backendFXtime');
55 const timediff = $(
'#timediff');
56 const timedifftext = $(
'#timedifftext');
57 const offline = $(
'#offline');
58 const offlinemsg = $(
'#offlinemsg');
59 const offlineimage = $(
'#offlineimage');
63 if( $(backendFooter).prop(
'checked')){
65 $(backendFooterValueLeft).prop(
'disabled',
false);
66 $(backendFooterValueRight).prop(
'disabled',
false);
67 $(backendFooterCopyright).prop(
'disabled',
false);
71 $(backendFooterValueLeft).prop(
'disabled',
true);
72 $(backendFooterValueRight).prop(
'disabled',
true);
73 $(backendFooterCopyright).prop(
'disabled',
true);
76 $(backendFooter).click(
function(){
77 if( $(
'#backendFooter').prop(
'checked')){
79 $(backendFooterValueLeft).prop(
'disabled',
false);
80 $(backendFooterValueRight).prop(
'disabled',
false);
81 $(backendFooterCopyright).prop(
'disabled',
false);
85 $(backendFooterValueLeft).prop(
'disabled',
true);
86 $(backendFooterValueRight).prop(
'disabled',
true);
87 $(backendFooterCopyright).prop(
'disabled',
true);
91 $(backendFooterCopyright).click(
function(){
92 if( $(backendFooterCopyright).prop(
'checked')){
94 $(backendFooterValueLeft).prop(
'disabled',
true);
95 $(backendFooterValueRight).prop(
'disabled',
true);
99 $(backendFooterValueLeft).prop(
'disabled',
false);
100 $(backendFooterValueRight).prop(
'disabled',
false);
107 if( $(backendLogoUrl).prop(
'checked')){
109 $(backendLogoText).prop(
'disabled',
true);
110 $(backendLogoSubText).prop(
'disabled',
true);
114 $(backendLogoText).prop(
'disabled',
false);
115 $(backendLogoSubText).prop(
'disabled',
false);
118 $(backendLogoUrl).click(
function(){
119 if( $(backendLogoUrl).prop(
'checked')){
121 $(backendLogoText).prop(
'disabled',
true);
122 $(backendLogoSubText).prop(
'disabled',
true);
126 $(backendLogoText.prop(
'disabled',
false);
127 $(backendLogoSubText).prop(
'disabled',
false);
134 if( $(backendFX).prop(
'checked')){
136 $(backendFXtype).prop(
'disabled',
false);
137 $(backendFXtime).prop(
'disabled',
false);
141 $(backendFXtype).prop(
'disabled',
true);
142 $(backendFXtime).prop(
'disabled',
true);
145 $(backendFX).click(
function(){
146 if( $(backendFX).prop(
'checked')){
148 $(backendFXtype).prop(
'disabled',
false);
149 $(backendFXtime).prop(
'disabled',
false);
153 $(backendFXtype).prop(
'disabled',
true);
154 $(backendFXtime).prop(
'disabled',
true);
161 if( $(timediff).prop(
'checked')){
163 $(timedifftext).prop(
'disabled',
false);
167 $(timedifftext).prop(
'disabled',
true);
170 $(timediff).click(
function(){
171 if( $(timediff).prop(
'checked')){
173 $(timedifftext).prop(
'disabled',
false);
177 $(timedifftext).prop(
'disabled',
true);
184 if( $(offline).prop(
'checked')){
186 $(offlinemsg).prop(
'disabled',
false);
187 $(offlineimage).prop(
'disabled',
false);
191 $(offlinemsg).prop(
'disabled',
true);
192 $(offlineimage).prop(
'disabled',
true);
195 $(offline).click(
function(){
196 if( $(offline).prop(
'checked')){
198 $(offlinemsg).prop(
'disabled',
false);
199 $(offlineimage).prop(
'disabled',
false);
203 $(offlinemsg).prop(
'disabled',
true);
204 $(offlineimage).prop(
'disabled',
true);
210 $(
'form *').change(
function(){
212 $(
'#savebutton').click(
function(){
217 window.onbeforeunload = confirmExit;
218 function confirmExit() {
219 if (formmodified === 1) {
220 return "Your changes may not be saved. Do you wish to leave the page?";
224 $(
'#tabs').tabCollapse({
225 tabsClass:
'hidden-sm hidden-xs',
226 accordionClass:
'visible-sm visible-xs'
244 if(isset($_POST[
'save']))
246 foreach ($_POST as $property =>
$value) {
247 if ($property !=
"save") {
249 if (substr($property, -5, 5) ==
'-long')
251 if (!settings::setLongSetting(
$db, $property,
$value))
253 alert::draw(
"warning",
"Error",
"Long Settings: Could not set long value <b>$value</b> of property <b>$property</b>",
"plugin=signup",
"4800");
258 if ($property ===
"selectedTemplate")
260 template::setTemplateActive(
$db,
$value);
264 if ($property ===
"backendLanguage")
266 echo
"<script>document.cookie = 'lang=$value';</script>";
273 if ($property ===
"robotsText-long")
275 sys::setRobotsText(
"../",
$value);
281 sys::setTimeout(
"index.php?page=settings-system&lang=$_POST[backendLanguage]", 0);
289 <!-- include summernote css/js-->
290 <!-- include codemirror (codemirror.css, codemirror.js, xml.js) -->
291 <link rel=
"stylesheet" type=
"text/css" href=
"../system/engines/codemirror/codemirror.min.css">
292 <link rel=
"stylesheet" type=
"text/css" href=
"../system/engines/codemirror/themes/<?php echo $editorSettings['editorTheme']; ?>.css">
293 <link rel=
"stylesheet" type=
"text/css" href=
"../system/engines/codemirror/show-hint.min.css">
294 <script
type=
"text/javascript" src=
"../system/engines/codemirror/codemirror-compressed.js"></script>
295 <script
type=
"text/javascript" src=
"../system/engines/codemirror/auto-refresh.js"></script>
298 <link href=
"../system/engines/summernote/dist/summernote.css" rel=
"stylesheet">
299 <script src=
"../system/engines/summernote/dist/summernote.min.js"></script>
300 <script src=
"../system/engines/summernote/dist/summernote-cleaner.js"></script>
301 <script src=
"../system/engines/summernote/dist/summernote-image-attributes.js"></script>
302 <script src=
"../system/engines/summernote/dist/summernote-floats-bs.js"></script>
303 <script
type=
"text/javascript">
304 $(document).
ready(
function() {
306 var editor = (
'textarea#summernote');
309 $(editor).
on(
'summernote.init',
function() {
311 $(editor).summernote(
'codeview.toggle');
315 $(editor).summernote({
326 lang:
'<?php echo $lang['CURRENT_LANGUAGE
']; ?>',
330 theme:
'<?php echo $editorSettings['editorTheme
']; ?>',
335 scrollbarStyle:
null,
337 autoCloseBrackets: <?php echo
$editorSettings[
'editorCloseBrackets'];?>,
339 value:
"<html>\n " + document.documentElement.innerHTML +
"\n</html>",
341 matchTags: {bothTags: <?php echo
$editorSettings[
'editorMatchTags']; ?>},
343 "Ctrl-J":
"toMatchingTag",
344 "Ctrl-Space":
"autocomplete"
364 <!-- Content Wrapper. Contains page content -->
365 <div class=\"content-wrapper\" id=\"content-FX\">
366 <!-- Content Header (Page header) -->
367 <section class=\"content-header\">";
369 echo backend::getTitle(
$lang[
'SETTINGS'],
$lang[
'SETTINGS_SYSTEM_SUBTEXT']);
370 echo
"<ol class=\"breadcrumb\">
371 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
372 <li><a href=\"index.php?page=settings-system\" class=\"active\" title=\"$lang[SETTINGS_EDIT]\"> $lang[SETTINGS_EDIT]</a></li>
374 <!-- Main content -->
375 <section class=\"content\">";
379 <div
class=
"box box-default">
380 <div
class=
"box-body">
382 <form
id=
"template-edit-form" action=
"index.php?page=settings-system" method=
"POST">
383 <!-- <div
class=
"nav-tabs-custom"> --> <!-- admin LTE tab style -->
384 <div
id=
"btn-wrapper" class=
"text-right">
385 <button
type=
"submit" id=
"savebutton" name=
"save" class=
"btn btn-success">
386 <
i id=
"savebuttonIcon" class=
"fa fa-check"></
i> &
nbsp;<?php print
$lang[
'SAVE_SETTINGS']; ?>
391 <ul
class=
"nav nav-tabs" id=
"tabs" role=
"tablist">
392 <li
class=
"active"><
a href=
"#overview" aria-controls=
"overview" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-home"></
i>&
nbsp; <?php echo
$lang[
'OVERVIEW'] ?></
a></li>
393 <li><
a href=
"#frontend" aria-controls=
"frontend" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-globe"></
i>&
nbsp; <?php echo
$lang[
'FRONTEND'] ?></
a></li>
394 <li><
a href=
"#backend" aria-controls=
"backend" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-wrench"></
i>&
nbsp; <?php echo
$lang[
'BACKEND'] ?></
a></li>
395 <li><
a href=
"#system" aria-controls=
"system" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-gears"></
i>&
nbsp; <?php echo
$lang[
'SYSTEM'] ?></
a></li>
396 <li><
a href=
"#database" aria-controls=
"database" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-database"></
i>&
nbsp; <?php echo
$lang[
'DATABASE'] ?></
a></li>
397 <li><
a href=
"#robots" aria-controls=
"robots" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-android"></
i>&
nbsp; <?php echo
$lang[
'ROBOTS_TXT'] ?></
a></li>
398 <li><
a href=
"#language" aria-controls=
"language" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-language"></
i>&
nbsp; <?php echo
$lang[
'LANGUAGES'] ?></
a></li>
399 <li><
a href=
"#info" aria-controls=
"info" role=
"tab" data-toggle=
"tab"><
i class=
"fa fa-info-circle"></
i>&
nbsp; <?php echo
$lang[
'INFO'] ?></
a></li>
403 <div
class=
"tab-content">
405 <div role=
"tabpanel" class=
"tab-pane active" id=
"overview">
406 <h3><?php echo
$lang[
'OVERVIEW']; ?> <small><?php echo
$lang[
'SETTINGS_SYSTEM_SUBTEXT']; ?></small></h3>
407 <div
class=
"row animated fadeIn">
408 <div
class=
"col-md-8">
410 <div
class=
"box-header with-border">
411 <h3
class=
"box-title"><?php echo
$lang[
'SETTINGS']; ?> <small><?php echo
$lang[
'SETTINGS_SUBTEXT']; ?> </small></h3>
413 <div
class=
"box-body">
423 <div
class=
"col-md-4">
430 <div role=
"tabpanel" class=
"tab-pane" id=
"frontend">
431 <h3><?php echo
$lang[
'FRONTEND']; ?> <small><?php echo
$lang[
'FRONTEND_SUBTEXT']; ?></small></h3>
433 <div
class=
"row animated fadeIn">
434 <div
class=
"col-md-4">
435 <!-- theme selector -->
438 <div
class=
"col-md-4">
444 <div
class=
"col-md-4">
445 <!-- maintenance mode -->
451 <!-- BACKEND SETTINGS -->
452 <div role=
"tabpanel" class=
"tab-pane" id=
"backend">
453 <h3><?php echo
$lang[
'BACKEND']; ?> <small><?php echo
$lang[
'BACKEND_SUBTEXT']; ?></small></h3>
455 <div
class=
"row animated fadeIn">
456 <div
class=
"col-md-4">
462 <div
class=
"col-md-4">
466 <div
class=
"col-md-4">
473 <div role=
"tabpanel" class=
"tab-pane" id=
"system">
475 <div
class=
"row animated fadeIn">
476 <div
class=
"col-md-4">
477 <!-- server seettings -->
478 <h3><?php echo
$lang[
'SERVER']; ?> <small> <?php echo
$lang[
'SERVER_SUBTEXT']; ?></small></h3>
482 <div
class=
"col-md-4">
486 <div
class=
"col-md-4">
488 <h3><
i class=
"fa fa-code"></
i> <?php echo
$lang[
'EDITOR']; ?> <small> <?php echo
$lang[
'EDITOR_SUBTEXT']; ?></small></h3>
495 <div role=
"tabpanel" class=
"tab-pane" id=
"database">
496 <h3><?php echo
$lang[
'DATABASE']; ?> <small><?php echo
$lang[
'DATABASE_SUBTEXT']; ?></small></h3>
497 <div
class=
"row animated fadeIn">
498 <div
class=
"col-md-8">
500 <div
class=
"box-header with-border">
501 <h3
class=
"box-title"><?php echo
$lang[
'SETTINGS']; ?> <small><?php echo
$lang[
'SETTINGS_SUBTEXT']; ?> </small></h3>
503 <div
class=
"box-body">
508 echo
"<table id=\"table-sort\" class=\"table table-striped table-hover table-condensed table-responsive table-bordered\">
509 <tr class=\"text-bold\"><td>ID</td>
514 echo
"<tr><td>$id</td><td>$table</td></tr>";
521 <div
class=
"col-md-4">
530 <div role=
"tabpanel" class=
"tab-pane" id=
"robots">
531 <h3><
i class=
"fa fa-android"></
i> <?php echo
$lang[
'ROBOTS_TXT']; ?> <small><?php echo
$lang[
'CONFIGURE']; ?></small></h3>
532 <div
class=
"row animated fadeIn">
533 <div
class=
"col-md-8">
535 <div
class=
"box-header with-border">
536 <h3
class=
"box-title"><?php echo
$lang[
'DATA_PRIVACY'].
" & ".
$lang[
'PRIVACY']; ?> <small><?php echo
$lang[
'ROBOTS_SUBTEXT']; ?> </small></h3>
538 <div
class=
"box-body">
539 <label
for=
"summernote"></label>
541 <textarea
name=
"robotsText-long" cols=
"64" rows=
"28" id=
"summernote"><?php echo
$content; ?></textarea>
545 <div
class=
"col-md-4">
548 <div
class=
"box-header with-border">
549 <h3
class=
"box-title"><?php echo
$lang[
'ROBOTS_TXT']; ?> <small> <?php echo
$lang[
'HELP']; ?></small></h3>
551 <div
class=
"box-body">
560 <div role=
"tabpanel" class=
"tab-pane" id=
"language">
561 <h3><?php echo
$lang[
'LANGUAGES']; ?> <small>& <?php echo
$lang[
'TRANSLATION']; ?></small></h3>
562 <div
class=
"row animated fadeIn">
563 <div
class=
"col-md-8">
565 <div
class=
"box-body">
569 <label
for=
"languageContent">Language File Content</label>
570 <textarea
id=
"languageContent" name=
"languageContent" rows=
"30" class=
"form-control"></textarea>
571 <div
id=
"textbox"></div>
575 <div
class=
"col-md-4">
578 <div
class=
"box-header with-border">
579 <h3
class=
"box-title">Sprache <small>festlegen</small></h3>
581 <div
class=
"box-body">
586 <div
class=
"box-header with-border">
587 <h3
class=
"box-title">Übersetzung <small>bearbeiten</small></h3>
589 <div
class=
"box-body">
590 <label
id=
"editLanguageSelectLabel" for=
"editLanguageSelect">welche Sprache möchtest Du bearbeiten?</label>
591 <select
id=
"editLanguageSelect" name=
"editLanguageSelect" class=
"form-control">
592 <option>bitte auswählen</option>
593 <option value=
"language/lang-de-DE.ini">de-DE</option>
594 <option value=
"language/lang-en-EN.ini">en-EN</option>
596 <div
id=
"editLanguageFooter">
597 <button
id=
"editLanguageBtn" class=
"btn btn-success pull-right" style=
"margin-top:5px;"><
i class=
"fa fa-save"></
i> &
nbsp;speichern</button>
598 <
a href=
"#" id=
"cancelLanguageBtn" class=
"btn btn-danger pull-right hidden" style=
"margin-top:5px; margin-right:2px;"><
i class=
"fa fa-times"></
i> &
nbsp;abbrechen</
a>
603 <div
class=
"box-header with-border">
604 <h3
class=
"box-title"><?php echo
$lang[
'LANGUAGES']; ?> <small>zurücksetzen</small></h3>
606 <div
class=
"box-body">
607 <
i class=
"fa fa-exclamation-triangle text-danger"></
i>&
nbsp;&
nbsp;Setzt alle Sprachen auf Werkseinstellung zurück.
608 <button
class=
"btn btn-default pull-right"><
i class=
"fa fa-language text-danger"></
i>&
nbsp;&
nbsp;Backup laden</button>
616 <div role=
"tabpanel" class=
"tab-pane" id=
"info">
617 <h3><?php echo
$lang[
'INFO']; ?> <small><?php echo
$lang[
'INFO_SUBTEXT']; ?></small></h3>
618 <div
class=
"row animated fadeIn">
619 <div
class=
"col-md-8">
621 <div
class=
"box-header with-border">
622 <h3
class=
"box-title"><?php echo
$lang[
'SETTINGS']; ?> <small><?php echo
$lang[
'SETTINGS_SUBTEXT']; ?> </small></h3>
624 <div
class=
"box-body">
629 <div
class=
"col-md-4">
631 <h3><?php echo
$lang[
'SYSLOG']; ?> <small> <?php echo
$lang[
'SETTINGS']; ?></small></h3>
639 <!-- </div> <!-- ./ nav-tabs-custom -->
646 <script
type=
"text/javascript">
650 $(
'#editLanguageSelect').
on(
'change',
function()
654 languageContent = $(
"#languageContent");
655 editlanguageSelectLabel = $(
"#editLanguageSelectLabel");
656 editLanguageSelect = $(
"#editLanguageSelect");
657 cancelLanguageBtn = $(
"#cancelLanguageBtn");
658 editLanguageBtn = $(
"#languageEditBtn");
661 $(languageContent).load( this.value,
function() {
665 $(editlanguageSelectLabel).empty().append(
'<?php // echo $lang['EDIT
'].":"; ?> admin/'+fn);
667 $(editLanguageSelect).prop(
'disabled',
true);
669 $(cancelLanguageBtn).removeClass(
'btn btn-danger pull-right hidden').addClass(
'btn btn-danger pull-right');
671 $(editLanguageBtn).removeClass(
'btn btn-success').addClass(
'btn btn-warning');
674 $(cancelLanguageBtn).click(
function() {
676 $(editLanguageSelect).prop(
'disabled',
false).val($(
"#editLanguageSelect option:first").val());
678 $(editLanguageSelectLabel).text(
'welche Sprache möchtest Du bearbeiten?');
680 $(cancelLanguageBtn).removeClass(
'btn btn-danger pull-right').addClass(
'btn btn-danger pull-right hidden');
682 $(editLanguageBtn).removeClass(
'btn btn-warning pull-right').addClass(
'btn btn-success pull-right');
684 $(languageContent).text(
'');
688 $(editLanguageBtn).click(
function() {
690 $(editLanguageSelect).prop(
'disabled',
false);
692 $(cancelLanguageBtn).removeClass(
'btn btn-danger pull-right').addClass(
'btn btn-danger pull-right hidden');
print $lang['SAVE_SETTINGS']
if(isset($_POST['save'])) $editorSettings
</div ></div ></div ><!-- ROBOTS.TXT -->< div role="tabpanel" class="tab-pane" id="robots">< h3 >< i class="fa fa-android"></i > $content
bersetzung< small > bearbeiten</small ></h3 ></div >< div class="box-body">< label id="editLanguageSelectLabel" for="editLanguageSelect"> welche Sprache möchtest Du bearbeiten</label >< select id="editLanguageSelect" name="editLanguageSelect" class="form-control">< option > bitte auswählen</option >< option value="language/lang-de-DE.ini"> de DE</option >< option value="language/lang-en-EN.ini"> en EN</option ></select >< div id="editLanguageFooter">< button id="editLanguageBtn" class="btn btn-success pull-right" style="margin-top:5px;">< i class="fa fa-save"></i > & nbsp
Throws a fancy Bootstrap Alert (success, info, warning or danger)
Backend class serves a few useful functions for the admin backend.
Mysqli database class; returns db connection object.
The language class - support multilingual backend.
Settings class: get and set YaWK system settings.
The sys class - handles yawk's system core functions.
The template controller - get and set template settings.
document ready(function() { $('a[data-confirm]').click(function(ev) { modal='#dataConfirmModal';var href=$(this).attr('href');var title=$(this).attr('title');var icon=$(this).attr('data-icon');if(!icon) { icon='fa fa-trash-o';} if(!$(modal).length) { $('body').append('< div id="dataConfirmModal" class="modal fade" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true">< div class="modal-dialog">< div class="modal-content">< div class="modal-header">< button type="button" class="close" data-dismiss="modal" aria-hidden="true">< i class="fa fa-times"></i ></button >< br >< div class="col-md-1">< h3 class="modal-title">< i class="'+icon+'"></i ></h3 ></div >< div class="col-md-11">< h3 class="modal-title" id="dataConfirmLabel">'+title+'</h3 ></div ></h3 ></div >< div class="modal-body"></div >< div class="modal-footer">< button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">Abbrechen</button >< a type="button" class="btn btn-danger" id="dataConfirmOK">< i class="'+icon+'"></i > L öschen</a ></div ></div ></div ></div >');} $(modal).find('.modal-body').text($(this).attr('data-confirm'));$('#dataConfirmOK').attr('href', href);$(modal).modal({show:true});return false;});$('#terminateUser').click(function() { var terminate=window.confirm("ACHTUNG!\nDas wird Deinen Account permanent deaktivieren.\n"+"Bist Du Dir sicher, dass Du das tun willst?");if(terminate===true) { var terminateUser=window.confirm("Bist Du Dir wirklich ganz sicher?\n"+"Diese Aktion kann nicht rueckgaengig gemacht werden.");if(terminateUser===true) { $.get('system/templates/YaWK-bootstrap3/js/terminate-user.php', function(data) { if(data==="true") { setTimeout("window.location='logout.html'", 0);} else { alert("Fehler: "+data);} });} } });function dismissNotifications() { $.ajax({ url:'js/dismiss-notifications.php', type:'POST', success:function(data) { if(!data) { alert('Something went wrong!');return false;} } });$("#bell-label").fadeOut();$('#notification-header').html('You have 0 notifications');$('#notification-menu').fadeOut();} $("#dismiss").click(function() { dismissNotifications();});function disableButtons(delay) { $('#loginButton').removeClass().addClass('btn btn-success disabled').attr('id', 'LOGIN_FORBIDDEN');$('#resetPasswordButton').removeClass().addClass('btn btn-danger disabled');setTimeout(function() { $('#LOGIN_FORBIDDEN').attr('id', 'loginButton').removeClass().addClass('btn btn-success');$('#resetPasswordButton').removeClass().addClass('btn btn-danger');}, delay);} $("#loginButton").click(function(){ if($('#loginButton').length > 0) { if($('#loginButton').hasClass('btn') &&$('#loginButton').hasClass('btn-success') &&$('#loginButton').hasClass('disabled')) { } else { $("#loginForm").submit();disableButtons(10000);} } else if($('#LOGIN_FORBIDDEN').length > 0) { if($('#LOGIN_FORBIDDEN').hasClass('btn') &&$('#LOGIN_FORBIDDEN').hasClass('btn-success') &&$('#LOGIN_FORBIDDEN').hasClass('disabled')) { } else { } } });$("#blockedBtn").hover(function() { $("#blockedBtn").hide();$("#askBtn").fadeIn(820);});})