配置汇总库的警告提示的样式

This commit is contained in:
chenlw 2017-01-05 11:29:04 +08:00
parent cc251fba16
commit fbed6fba0a
2 changed files with 48 additions and 31 deletions

View File

@ -29,79 +29,80 @@
<div class="form-group">
<label class="col-sm-2 control-label">名称</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control " type="text" ng-model="tableForm.name" name="orcName" ng-minlength="2" ng-maxlength="20" required="required"/>
<div class="form-error" ng-show="validForm.orcName.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcName.$error.required">名称不能为空</span> <span class="alert alert-danger" role="alert" ng-show="!validForm.orcName.$error.required && validForm.orcName.$invalid">请输入输入2-20个字符的数据名称</span>
<input class="system-info-danger-input form-control " type="text" ng-model="tableForm.name" name="orcName" ng-minlength="2" ng-maxlength="20" required="required"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcName.$invalid && submitted">
<span role="alert" ng-show="validForm.orcName.$error.required">名称不能为空</span>
<span role="alert" ng-show="!validForm.orcName.$error.required && validForm.orcName.$invalid">请输入输入2-20个字符的数据名称</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">IP</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control" type="text" ng-model="tableForm.ip" name="orcIP" ng-pattern="/((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))/" required="required"/>
<div class="form-error" ng-show="validForm.orcIP.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcIP.$error.required">IP不能为空</span>
<span class="alert alert-danger" role="alert" ng-show="validForm.orcIP.$error.pattern">请输入正确的IP地址</span>
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.ip" name="orcIP" ng-pattern="/((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))/" required="required"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcIP.$invalid && submitted">
<span role="alert" ng-show="validForm.orcIP.$error.required">IP不能为空</span>
<span role="alert" ng-show="validForm.orcIP.$error.pattern">请输入正确的IP地址</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">端口号</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control" type="text" ng-model="tableForm.port" name="orcPort" ng-pattern="/^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/" required="required"/>
<div class="form-error" ng-show="validForm.orcPort.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcPort.$error.required">端口号不能为空</span>
<span class="alert alert-danger" role="alert" ng-show="validForm.orcPort.$error.pattern">端口号必须为1~65535的数字</span>
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.port" name="orcPort" ng-pattern="/^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/" required="required"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcPort.$invalid && submitted">
<span role="alert" ng-show="validForm.orcPort.$error.required">端口号不能为空</span>
<span role="alert" ng-show="validForm.orcPort.$error.pattern">端口号必须为1~65535的数字</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">用戶名</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control" type="text" ng-model="tableForm.user" name="orcUser" ng-pattern="/^\w{2,15}$/" required="required"/>
<div class="form-error" ng-show="validForm.orcUser.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcUser.$error.required">用户名不能为空</span>
<span class="alert alert-danger" role="alert" ng-show="validForm.orcUser.$error.pattern">用户名必须为2-15个字母、数字或下划线</span>
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.user" name="orcUser" ng-pattern="/^\w{2,15}$/" required="required"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcUser.$invalid && submitted">
<span role="alert" ng-show="validForm.orcUser.$error.required">用户名不能为空</span>
<span role="alert" ng-show="validForm.orcUser.$error.pattern">用户名必须为2-15个字母、数字或下划线</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">密码</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control" type="text" ng-model="tableForm.password" name="orcPassword" ng-pattern="/^\w{2,15}$/" required="required"/>
<div class="form-error" ng-show="validForm.orcPassword.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcPassword.$error.required">密码不能为空</span>
<span class="alert alert-danger" role="alert" ng-show="validForm.orcPassword.$error.pattern">密码必须为2-15个字母、数字或下划线</span>
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.password" name="orcPassword" ng-pattern="/^\w{2,15}$/" required="required"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcPassword.$invalid && submitted">
<span role="alert" ng-show="validForm.orcPassword.$error.required">密码不能为空</span>
<span role="alert" ng-show="validForm.orcPassword.$error.pattern">密码必须为2-15个字母、数字或下划线</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">服务名</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control" type="text" ng-model="tableForm.databaseName" name="orcService" ng-pattern="/^[a-zA-Z]{1,10}$/" required="required"/>
<div class="form-error" ng-show="validForm.orcService.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcService.$error.required">服务名不能为空</span>
<span class="alert alert-danger" role="alert" ng-show="validForm.orcService.$error.pattern">服务名必须为1-10个字母</span>
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.databaseName" name="orcService" ng-pattern="/^[a-zA-Z]{1,10}$/" required="required"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcService.$invalid && submitted">
<span role="alert" ng-show="validForm.orcService.$error.required">服务名不能为空</span>
<span role="alert" ng-show="validForm.orcService.$error.pattern">服务名必须为1-10个字母</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">表空间名</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control" type="text" ng-model="tableForm.tableName" name="orcTable" ng-pattern="/^\w{1,15}$/" required="required"/>
<div class="form-error" ng-show="validForm.orcTable.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcTable.$error.required">表空间名不能为空</span>
<span class="alert alert-danger" role="alert" ng-show="validForm.orcTable.$error.pattern">表空间名必须为1-15个字母、数字或下划线</span>
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.tableName" name="orcTable" ng-pattern="/^\w{1,15}$/" required="required"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcTable.$invalid && submitted">
<span role="alert" ng-show="validForm.orcTable.$error.required">表空间名不能为空</span>
<span role="alert" ng-show="validForm.orcTable.$error.pattern">表空间名必须为1-15个字母、数字或下划线</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">表后缀名</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control" type="text" ng-model="tableForm.suffix" name="orcSuffix" ng-pattern="/^\w{1,10}$/" required="required"/>
<div class="form-error" ng-show="validForm.orcSuffix.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcSuffix.$error.required">表后缀名不能为空</span>
<span class="alert alert-danger" role="alert" ng-show="validForm.orcSuffix.$error.pattern">表后缀名必须为1-10个字母、数字或下划线</span>
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.suffix" name="orcSuffix" ng-pattern="/^\w{1,10}$/" required="required"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcSuffix.$invalid && submitted">
<span role="alert" ng-show="validForm.orcSuffix.$error.required">表后缀名不能为空</span>
<span role="alert" ng-show="validForm.orcSuffix.$error.pattern">表后缀名必须为1-10个字母、数字或下划线</span>
</div>
</div>
</div>

View File

@ -335,3 +335,19 @@ legend {
top: 48%;
}
.system-info-danger-red-char{
float:right;
width:52%;
height:30px;
border:0px;
background-color:#FFFFFF;
font-family:'微软雅黑','宋体';
font-size: 16px;
line-height:1.5;
color:#cc0000;
}
.system-info-danger-input{
float:left;
height:32px;
}