mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
Move 'Logged in as' dialog to footer.html
This commit is contained in:
parent
37fb304942
commit
42dfd762d9
5 changed files with 49 additions and 123 deletions
|
@ -17,13 +17,12 @@
|
|||
?>
|
||||
|
||||
<?php
|
||||
if (!empty($_SESSION['error_msg'])):
|
||||
// todo: display all the dialogs?
|
||||
|
||||
if (!empty($_SESSION['look_alert'])):
|
||||
?>
|
||||
<div>
|
||||
<div id="dialog-message" title="">
|
||||
<p><?=htmlentities($_SESSION['error_msg'])?></p>
|
||||
</div>
|
||||
<script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#dialog:ui-dialog').dialog('destroy');
|
||||
$('#dialog-message').dialog({
|
||||
modal: true,
|
||||
|
@ -31,15 +30,40 @@ if (!empty($_SESSION['error_msg'])):
|
|||
Ok: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
},
|
||||
create: function() {
|
||||
$(this)
|
||||
.closest('.ui-dialog')
|
||||
.find('.ui-button:first')
|
||||
.addClass('submit');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div id="dialog-message" title="<?=__('Welcome')?>">
|
||||
<p class="confirmation"><?=__('LOGGED_IN_AS', $_SESSION['look'])?></p>
|
||||
</div>
|
||||
<?php
|
||||
unset($_SESSION['look_alert']);
|
||||
elseif (!empty($_SESSION['error_msg'])):
|
||||
?>
|
||||
<div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#dialog:ui-dialog').dialog('destroy');
|
||||
$('#dialog-message').dialog({
|
||||
modal: true,
|
||||
buttons: {
|
||||
Ok: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
},
|
||||
create: function() {
|
||||
$(this)
|
||||
.closest('.ui-dialog')
|
||||
.find('.ui-button:first')
|
||||
.addClass('submit');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div id="dialog-message" title="">
|
||||
<p><?=htmlentities($_SESSION['error_msg'])?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
unset($_SESSION['error_msg']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue