mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
validation alerts
This commit is contained in:
parent
0c5af7ea24
commit
65f5223698
@ -184,9 +184,11 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||||
|
ui_require_jquery_file('validate');
|
||||||
ui_require_jquery_file('cluetip');
|
ui_require_jquery_file('cluetip');
|
||||||
ui_require_jquery_file('pandora.controls');
|
ui_require_jquery_file('pandora.controls');
|
||||||
ui_require_jquery_file('bgiframe');
|
ui_require_jquery_file('bgiframe');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/* <![CDATA[ */
|
/* <![CDATA[ */
|
||||||
@ -201,7 +203,25 @@ $(document).ready (function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
// Rule.
|
||||||
|
$.validator.addMethod(
|
||||||
|
"valueNotEquals",
|
||||||
|
function(value, element, arg) {
|
||||||
|
return arg != value;
|
||||||
|
},
|
||||||
|
"Value must not equal arg."
|
||||||
|
);
|
||||||
|
|
||||||
|
// configure your validation
|
||||||
|
$("form.add_alert_form").validate({
|
||||||
|
rules: {
|
||||||
|
id_agent_module: { valueNotEquals: "0" }
|
||||||
|
},
|
||||||
|
messages: {
|
||||||
|
id_agent_module: { valueNotEquals: "Please select an item!" }
|
||||||
|
}
|
||||||
|
});
|
||||||
$("select#template").change (function () {
|
$("select#template").change (function () {
|
||||||
id = this.value;
|
id = this.value;
|
||||||
$a = $(this).siblings ("a.template_details");
|
$a = $(this).siblings ("a.template_details");
|
||||||
|
4
pandora_console/include/javascript/jquery.validate.js
vendored
Normal file
4
pandora_console/include/javascript/jquery.validate.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user