mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
#10074 snmp alert edit content_type
This commit is contained in:
parent
0217a02da7
commit
707763f5e2
@ -40,6 +40,7 @@ $update_command = (bool) get_parameter('update_command');
|
|||||||
$create_command = (bool) get_parameter('create_command');
|
$create_command = (bool) get_parameter('create_command');
|
||||||
$delete_command = (bool) get_parameter('delete_command');
|
$delete_command = (bool) get_parameter('delete_command');
|
||||||
$copy_command = (bool) get_parameter('copy_command');
|
$copy_command = (bool) get_parameter('copy_command');
|
||||||
|
$content_type = (string) get_parameter('content_type', 'text/plain');
|
||||||
|
|
||||||
$url = 'index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands';
|
$url = 'index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands';
|
||||||
|
|
||||||
@ -226,7 +227,7 @@ if (is_ajax()) {
|
|||||||
'field'.$i.'_value',
|
'field'.$i.'_value',
|
||||||
'text/plain',
|
'text/plain',
|
||||||
'',
|
'',
|
||||||
'',
|
$content_type == 'text/plain',
|
||||||
$is_management_allowed,
|
$is_management_allowed,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
@ -238,7 +239,7 @@ if (is_ajax()) {
|
|||||||
'field'.$i.'_value',
|
'field'.$i.'_value',
|
||||||
'text/html',
|
'text/html',
|
||||||
'',
|
'',
|
||||||
'text/html',
|
$content_type == 'text/html',
|
||||||
$is_management_allowed,
|
$is_management_allowed,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
|
@ -1599,6 +1599,10 @@ $(document).ready (function () {
|
|||||||
name: "get_recovery_fields",
|
name: "get_recovery_fields",
|
||||||
value: "0"
|
value: "0"
|
||||||
});
|
});
|
||||||
|
values.push({
|
||||||
|
name: "content_type",
|
||||||
|
value: "<?php echo $al_field4; ?>"
|
||||||
|
})
|
||||||
jQuery.post (<?php echo "'".ui_get_full_url('ajax.php', false, false, false)."'"; ?>,
|
jQuery.post (<?php echo "'".ui_get_full_url('ajax.php', false, false, false)."'"; ?>,
|
||||||
values,
|
values,
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
@ -1624,8 +1628,9 @@ $(document).ready (function () {
|
|||||||
// The row provided has a predefined class. We delete it.
|
// The row provided has a predefined class. We delete it.
|
||||||
$('#table_macros-field' + i)
|
$('#table_macros-field' + i)
|
||||||
.removeAttr('class');
|
.removeAttr('class');
|
||||||
|
if(old_value && i != 4){
|
||||||
$("[name=field" + i + "_value]").val(old_value).trigger('change');
|
$("[name=field" + i + "_value]").val(old_value).trigger('change');
|
||||||
|
}
|
||||||
$('#table_macros-field').show();
|
$('#table_macros-field').show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user