mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Traffic policing page i18n, are-you-sure integration and styling (#837)
* Traffic policing page internationalization, are-you-sure integration, styling * are-you-sure utility functions * move to shaping section
This commit is contained in:
parent
c825c689ff
commit
eda7bd42b1
6 changed files with 270 additions and 100 deletions
|
|
@ -603,24 +603,7 @@ print[[
|
|||
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
|
||||
|
||||
print([[<script>
|
||||
/* jQuery AreYouSure plugin activation */
|
||||
// Disable save buttons by default
|
||||
$('form').find('button[type="submit"]').attr('disabled', 'disabled');
|
||||
|
||||
$(function() {
|
||||
// Enable on all forms
|
||||
$('form').areYouSure();
|
||||
|
||||
$('form').on('dirty.areYouSure', function() {
|
||||
// Enable save button only as the form is dirty.
|
||||
$(this).find('button[type="submit"]').removeAttr('disabled');
|
||||
});
|
||||
|
||||
$('form').on('clean.areYouSure', function() {
|
||||
// Form is clean so nothing to save - disable the save button.
|
||||
$(this).find('button[type="submit"]').attr('disabled', 'disabled');
|
||||
});
|
||||
});
|
||||
aysHandleForm();
|
||||
</script>]])
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue