|
|
@@ -34,9 +34,8 @@
|
|
|
<div class="row">
|
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
- <label class="col-sm-4 control-label">场所类别:</label>
|
|
|
+ <label class="col-sm-4 control-label is-required">场所类别:</label>
|
|
|
<div class="col-sm-8">
|
|
|
- <!--<input name="placeCategory" placeholder="如:寺/观/清真寺/教堂" class="form-control" type="text" maxlength="64" th:field="*{placeCategory}">-->
|
|
|
<select name="placeCategory" class="form-control" required th:with="type=${@dict.getType('category_type')}">
|
|
|
<option value="">请选择场所类别</option>
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{placeCategory}"></option>
|
|
|
@@ -46,9 +45,12 @@
|
|
|
</div>
|
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
- <label class="col-sm-4 control-label">所属区县:</label>
|
|
|
+ <label class="col-sm-4 control-label is-required">所属区县:</label>
|
|
|
<div class="col-sm-8">
|
|
|
- <input name="county" placeholder="请输入所属区县" class="form-control" type="text" maxlength="128" th:field="*{county}">
|
|
|
+ <select name="county" class="form-control" required th:with="type=${@dict.getType('region_xa_district')}">
|
|
|
+ <option value="">请选择所属区县</option>
|
|
|
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{county}"></option>
|
|
|
+ </select>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -68,18 +70,18 @@
|
|
|
<div class="row">
|
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
- <label class="col-sm-4 control-label is-required">负责人姓名:</label>
|
|
|
+ <label class="col-sm-4 control-label">负责人姓名:</label>
|
|
|
<div class="col-sm-8">
|
|
|
- <input name="chargeName" placeholder="请输入负责人姓名" class="form-control" type="text" maxlength="128" th:field="*{chargeName}" required>
|
|
|
+ <input name="chargeName" placeholder="请输入负责人姓名" class="form-control" type="text" maxlength="128" th:field="*{chargeName}">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
- <label class="col-sm-4 control-label is-required">负责人电话:</label>
|
|
|
+ <label class="col-sm-4 control-label">负责人电话:</label>
|
|
|
<div class="col-sm-8">
|
|
|
<div class="input-group">
|
|
|
- <input name="chargePhone" placeholder="请输入负责人电话" class="form-control" type="text" maxlength="32" th:field="*{chargePhone}" required>
|
|
|
+ <input name="chargePhone" placeholder="请输入负责人电话" class="form-control" type="text" maxlength="32" th:field="*{chargePhone}">
|
|
|
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -224,20 +226,31 @@
|
|
|
</form>
|
|
|
</div>
|
|
|
|
|
|
- <div class="row">
|
|
|
- <div class="col-sm-offset-5 col-sm-10">
|
|
|
- <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>
|
|
|
- <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
<th:block th:include="include :: footer" />
|
|
|
<th:block th:include="include :: datetimepicker-js" />
|
|
|
+ <style>
|
|
|
+ /* 必填项校验失败时的样式 */
|
|
|
+ input.error, select.error {
|
|
|
+ border-color: #dd4b39 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 必填项校验失败时 placeholder 变红 */
|
|
|
+ input.error::placeholder, select.error::placeholder {
|
|
|
+ color: #dd4b39 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 隐藏默认的错误提示文字 */
|
|
|
+ label.error {
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
<script th:inline="javascript">
|
|
|
var prefix = ctx + "religion/place";
|
|
|
|
|
|
$("#form-place-edit").validate({
|
|
|
onkeyup: false,
|
|
|
+ errorElement: "label",
|
|
|
+ errorClass: "error",
|
|
|
rules: {
|
|
|
placeName: {
|
|
|
required: true,
|
|
|
@@ -247,13 +260,17 @@
|
|
|
religionType: {
|
|
|
required: true
|
|
|
},
|
|
|
+ placeCategory: {
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ county: {
|
|
|
+ required: true
|
|
|
+ },
|
|
|
chargeName: {
|
|
|
- required: true,
|
|
|
minlength: 2,
|
|
|
maxlength: 128
|
|
|
},
|
|
|
chargePhone: {
|
|
|
- required: true,
|
|
|
isPhone: true
|
|
|
},
|
|
|
placeArea: {
|
|
|
@@ -284,13 +301,17 @@
|
|
|
religionType: {
|
|
|
required: "请选择宗教类别"
|
|
|
},
|
|
|
+ placeCategory: {
|
|
|
+ required: "请选择场所类别"
|
|
|
+ },
|
|
|
+ county: {
|
|
|
+ required: "请选择所属区县"
|
|
|
+ },
|
|
|
chargeName: {
|
|
|
- required: "请输入负责人姓名",
|
|
|
minlength: "负责人姓名不能少于2个字符",
|
|
|
maxlength: "负责人姓名不能超过128个字符"
|
|
|
},
|
|
|
chargePhone: {
|
|
|
- required: "请输入负责人电话",
|
|
|
isPhone: "请输入正确的手机号码"
|
|
|
}
|
|
|
},
|
|
|
@@ -300,7 +321,7 @@
|
|
|
function submitHandler() {
|
|
|
if ($.validate.form()) {
|
|
|
var data = $("#form-place-edit").serializeArray();
|
|
|
- $.operate.saveTab(prefix + "/edit", data);
|
|
|
+ $.operate.save(prefix + "/edit", data);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -331,3 +352,4 @@
|
|
|
</body>
|
|
|
</html>
|
|
|
|
|
|
+
|