ui: fix the missing dialog padding in some modals

It appears that dialogRef.getModalBody() is one of our
ancient modal implementations and a simple 'message' does
the trick.
This commit is contained in:
Franco Fichtner 2024-01-04 10:47:25 +01:00
parent f1ae49b803
commit 763d2fd4dd
5 changed files with 14 additions and 25 deletions

View File

@ -302,12 +302,9 @@
type:BootstrapDialog.TYPE_INFO,
title: "{{ lang._('Your device is rebooting') }}",
closable: false,
onshow:function(dialogRef){
dialogRef.setClosable(false);
dialogRef.getModalBody().html(
"{{ lang._('The upgrade has finished and your device is being rebooted at the moment, please wait...') }}" +
' <i class="fa fa-cog fa-spin"></i>'
);
message: "{{ lang._('The upgrade has finished and your device is being rebooted at the moment, please wait...') }}" +
' <i class="fa fa-cog fa-spin"></i>',
onshow: function (dialogRef) {
setTimeout(rebootWait, 45000);
},
});

View File

@ -38,8 +38,8 @@
type:BootstrapDialog.TYPE_INFO,
title: '{{ lang._('Your device is powering off') }}',
closable: false,
onshow: function(dialogRef){
dialogRef.getModalBody().html('{{ lang._('The system is powering off now.') }}');
message: '{{ lang._('The system is powering off now.') }}',
onshow: function (dialogRef) {
ajaxCall('/api/core/system/halt');
},
});

View File

@ -49,11 +49,9 @@
type:BootstrapDialog.TYPE_INFO,
title: '{{ lang._('Your device is rebooting') }}',
closable: false,
onshow: function(dialogRef){
dialogRef.getModalBody().html(
'{{ lang._('The system is rebooting now, please wait...') }}' +
' <i class="fa fa-cog fa-spin"></i>'
);
message: '{{ lang._('The system is rebooting now, please wait...') }}' +
' <i class="fa fa-cog fa-spin"></i>',
onshow: function (dialogRef) {
ajaxCall('/api/core/system/reboot');
setTimeout(rebootWait, 45000);
},

View File

@ -58,10 +58,7 @@ $(document).ready(function() {
type:BootstrapDialog.TYPE_INFO,
title: '<?= html_safe(gettext('Your device is powering off')) ?>',
closable: false,
onshow:function(dialogRef){
dialogRef.setClosable(false);
dialogRef.getModalBody().html('<?= html_safe(gettext('The system has been reset to factory defaults and is shutting down.')) ?>');
},
message: '<?= html_safe(gettext('The system has been reset to factory defaults and is shutting down.')) ?>',
});
});
</script>

View File

@ -464,14 +464,11 @@ $(document).ready(function() {
type:BootstrapDialog.TYPE_INFO,
title: '<?= html_safe($savemsg) ?>',
closable: false,
onshow:function(dialogRef){
dialogRef.setClosable(false);
dialogRef.getModalBody().html(
'<?= html_safe(gettext('The web GUI is reloading at the moment, please wait...')) ?>' +
' <i class="fa fa-cog fa-spin"></i><br /><br />' +
' <?= html_safe(gettext('If the page does not reload go here:')) ?>' +
' <a href="<?= html_safe($url) ?>" target="_blank"><?= html_safe($url) ?></a>'
);
message: '<?= html_safe(gettext('The web GUI is reloading at the moment, please wait...')) ?>' +
' <i class="fa fa-cog fa-spin"></i><br /><br />' +
' <?= html_safe(gettext('If the page does not reload go here:')) ?>' +
' <a href="<?= html_safe($url) ?>" target="_blank"><?= html_safe($url) ?></a>',
onshow: function (dialogRef) {
setTimeout(reloadWaitNew, 20000);
},
});