diff options
author | 2016-09-13 15:37:48 +0800 | |
---|---|---|
committer | 2016-09-13 15:37:48 +0800 | |
commit | 9230369a383b8bdd4b51940c69000a4fbc4aa6b1 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /nsoc-iui/src/main/resources/webroot/nsoc/js/hostMirror/host-validate.js | |
parent | d0cd8bdedcb2809d51ff960af8e8a39aed732fe9 (diff) |
clear the old code.
Change-Id: I6e3116979251f69e728f2a20006421948e1c4b35
Signed-off-by: j180240 <jiaxiangli@huawei.com>
Diffstat (limited to 'nsoc-iui/src/main/resources/webroot/nsoc/js/hostMirror/host-validate.js')
-rw-r--r-- | nsoc-iui/src/main/resources/webroot/nsoc/js/hostMirror/host-validate.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/nsoc-iui/src/main/resources/webroot/nsoc/js/hostMirror/host-validate.js b/nsoc-iui/src/main/resources/webroot/nsoc/js/hostMirror/host-validate.js deleted file mode 100644 index f6000dd0..00000000 --- a/nsoc-iui/src/main/resources/webroot/nsoc/js/hostMirror/host-validate.js +++ /dev/null @@ -1,56 +0,0 @@ -$(function(){
- var form = $("#hostForm");
- var error = $('.alert-danger', form);
- var success = $('.alert-success', form);
-
- form.validate({
- doNotHideMessage : true,
- errorElement : 'span',
- errorClass : 'help-block',
- focusInvalid : false,
- rules : {
- hosturl : {
- required : true,
- url : true
- },
- hostName : {
- required : true
- },
- vim : {
- required : true
- }
- },
- messages : {
- hosturl : {
- required : $.i18n.prop('nfv-host-iui-validate-hosturl-required'),
- url : $.i18n.prop('nfv-host-iui-validate-hosturl-url')
- },
- hostName : {
- required : $.i18n.prop('nfv-host-iui-validate-hostName')
- },
- vim : {
- required : $.i18n.prop('nfv-host-iui-validate-vim')
- }
- },
- errorPlacement : function(error, element) {
- error.insertAfter(element);
- },
- invalidHandler : function(event, validator) {
- success.hide();
- error.show();
- },
- highlight : function(element) {
- $(element).closest(".form-group").removeClass("has-success").addClass("has-error");
- },
- unhighlight : function(element) {
- $(element).closest(".form-group").removeClass("has-error");
- },
- success : function(label) {
- label.addClass("valid").closest(".form-group").removeClass("has-error");
- },
- submitHandler : function(form) {
- success.show();
- error.hide();
- }
- });
-});
\ No newline at end of file |