mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-28 20:39:18 +02:00
* include/javascript/pandora_alerts.js godmode/alerts/configure_alert_action.php: Added descrption of the selected command under the combo when select one in the action editor to help user. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6328 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
28 lines
721 B
JavaScript
28 lines
721 B
JavaScript
var original_command = "";
|
|
|
|
function parse_alert_command (command) {
|
|
value = $("#text-field1").attr ("value");
|
|
re = /_FIELD1_/gi;
|
|
command = command.replace (re, value);
|
|
|
|
value = $("#text-field2").attr ("value");
|
|
re = /_FIELD2_/gi;
|
|
command = command.replace (re, value);
|
|
|
|
value = $("#textarea_field3").val();
|
|
re = /_FIELD3_/gi;
|
|
command = command.replace (re, value);
|
|
|
|
return command;
|
|
}
|
|
|
|
function render_command_preview () {
|
|
$("#textarea_command_preview").text (parse_alert_command (original_command));
|
|
}
|
|
function render_command_description (command_description) {
|
|
if(command_description != '') {
|
|
command_description = '<br>'+command_description;
|
|
}
|
|
$("#command_description").html(command_description);
|
|
}
|