#13313 Validations are added for the template field in goal alerts. It is not redirected in case of errors in the meta form
This commit is contained in:
parent
cd3634b857
commit
c6b28f5061
|
@ -294,10 +294,14 @@ $(document).ready (function () {
|
|||
// configure your validation
|
||||
$("form.add_alert_form").validate({
|
||||
rules: {
|
||||
id_agent_module: { valueNotEquals: "0" }
|
||||
id_agent_module: { valueNotEquals: "0" },
|
||||
template: { valueNotEquals: "0" },
|
||||
id_agent: { valueNotEquals: "" },
|
||||
},
|
||||
messages: {
|
||||
id_agent_module: { valueNotEquals: "Please select an item!" }
|
||||
id_agent_module: { valueNotEquals: "Please select an item!" },
|
||||
template: { valueNotEquals: "Please select a templete!" },
|
||||
id_agent: { valueNotEquals: "Please select an agent!" }
|
||||
}
|
||||
});
|
||||
$("select#template").change (function () {
|
||||
|
|
|
@ -220,7 +220,6 @@ if ($create_alert) {
|
|||
if (is_metaconsole()) {
|
||||
// Restore db connection.
|
||||
metaconsole_restore_db();
|
||||
echo '<script>window.location.assign("index.php?sec=estado&sec2=operation/agentes/alerts_status")</script>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue