Ask for Reason when changing Port up/down Status, or VLAN

This commit is contained in:
Oliver Gorwits
2013-12-29 18:16:49 +00:00
parent d826a2e12b
commit cfb04e98d1
6 changed files with 53 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ var nd_save_ok = false;
// user clicked or asked for port changes to be submitted via ajax
function port_control (e) {
var td = $(e).closest('td'),
reason = $('#nd_portlog-reason').val(),
logmessage = $('#nd_portlog-log').val();
$('#nd_portlog-log').val('');
@@ -23,7 +24,8 @@ function port_control (e) {
,field: td.data('field')
,action: td.data('action')
,value: td.text().trim()
,log: logmessage,
,reason: reason
,log: logmessage
}
,success: function() {
toastr.info('Submitted change request');
@@ -119,6 +121,12 @@ $(document).ready(function() {
$('#nd_portlog').one('hidden', function() {
port_control(clicked); // save
});
if ($(this).hasClass('icon-hand-up')) {
$('#nd_portlog-reason').val('resolved');
}
else {
$('#nd_portlog-reason').val('other');
}
$('#nd_portlog').modal('show');
});