diff options
Diffstat (limited to 'portal/src/main')
-rw-r--r-- | portal/src/main/webapp/extsys/vim/js/vimController.js | 26 | ||||
-rw-r--r-- | portal/src/main/webapp/extsys/vim/vimView.html | 3 |
2 files changed, 27 insertions, 2 deletions
diff --git a/portal/src/main/webapp/extsys/vim/js/vimController.js b/portal/src/main/webapp/extsys/vim/js/vimController.js index e9fd644..6bd6961 100644 --- a/portal/src/main/webapp/extsys/vim/js/vimController.js +++ b/portal/src/main/webapp/extsys/vim/js/vimController.js @@ -106,6 +106,32 @@ var vm = avalon if (form.valid() == false) { vm.isSave = false; return false; + } else { + vm.isSave = true; + } + var cloudOwner = vm.currentElement["cloudOwner"]; + var $cloudOwner = $("#vim_form input[name='cloudOwner']"); + var cloudRegionId = vm.currentElement["cloudRegionId"]; + var $cloudRegionId = $("#vim_form input[name='cloudRegionId']"); + if(cloudOwner.indexOf("_") != -1){ + $cloudOwner.parent().parent().addClass("has-error"); + $cloudOwner.next().html("It not allowed '_' contained here").show(); + vm.isSave = false; + return false; + } else { + vm.isSave = true; + $cloudOwner.parent().parent().removeClass("has-error"); + $cloudOwner.next().hide(); + } + if(cloudRegionId.indexOf("_") != -1){ + $cloudRegionId.parent().parent().addClass("has-error"); + $cloudRegionId.next().html("It not allowed '_' contained here").show(); + vm.isSave = false; + return false; + } else { + vm.isSave = true; + $cloudRegionId.parent().parent().removeClass("has-error"); + $cloudRegionId.next().hide(); } var res = false; if (vm.saveType == "add") { diff --git a/portal/src/main/webapp/extsys/vim/vimView.html b/portal/src/main/webapp/extsys/vim/vimView.html index 923ddf7..33715ed 100644 --- a/portal/src/main/webapp/extsys/vim/vimView.html +++ b/portal/src/main/webapp/extsys/vim/vimView.html @@ -211,8 +211,7 @@ <div class="row-fluid col-sm-12" data-name="cond_zone"> <div class="col-sm-4"> <button class="btn white radius_l" id="app-new-btn" ms-click="$showVimTable(-1, 'add')"> - <i class="ict-new"></i> <span id_i18n="com_zte_ums_eco_roc_vim_register" - name_i18n="com_zte_conductor_ui_i18n"></span> + <i class="ict-new"></i> <span id_i18n="com_zte_ums_eco_roc_vim_register" name_i18n="com_zte_conductor_ui_i18n"></span> </button> </div> <!-- <div class="fa fa-refresh text-muted refresh-status-text"><small><span id_i18n="com_zte_ums_eco_roc_vim_status_update_time" name_i18n="com_zte_conductor_ui_i18n"></span></small><small ms-text="vimStatusTime"></small></div>--> |