Files
RuoYi/ruoyi-admin/src/main/resources/templates/system/config/edit.html

84 lines
3.3 KiB
HTML
Raw Normal View History

2018-07-09 08:44:52 +08:00
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
2019-03-31 12:56:04 +08:00
<head>
<th:block th:include="include :: header('修改参数')" />
</head>
2018-07-09 08:44:52 +08:00
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-edit" th:object="${config}">
<input id="configId" name="configId" th:field="*{configId}" type="hidden">
<div class="form-group">
2019-12-31 16:34:24 +08:00
<label class="col-sm-3 control-label is-required">参数名称:</label>
2018-07-09 08:44:52 +08:00
<div class="col-sm-8">
2019-02-25 13:19:06 +08:00
<input id="configName" name="configName" th:field="*{configName}" class="form-control" type="text" required>
2018-07-09 08:44:52 +08:00
</div>
</div>
<div class="form-group">
2019-12-31 16:34:24 +08:00
<label class="col-sm-3 control-label is-required">参数键名:</label>
2018-07-09 08:44:52 +08:00
<div class="col-sm-8">
2019-02-25 13:19:06 +08:00
<input id="configKey" name="configKey" th:field="*{configKey}" class="form-control" type="text" required>
2018-07-09 08:44:52 +08:00
</div>
</div>
<div class="form-group">
2019-12-31 16:34:24 +08:00
<label class="col-sm-3 control-label is-required">参数键值:</label>
2018-07-09 08:44:52 +08:00
<div class="col-sm-8">
2023-08-12 16:21:23 +08:00
<textarea id="configValue" name="configValue" class="form-control" rows="4" required>[[*{configValue}]]</textarea>
2018-07-09 08:44:52 +08:00
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">系统内置:</label>
2018-08-23 17:06:31 +08:00
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
<input type="radio" th:id="${dict.dictCode}" name="configType" th:value="${dict.dictValue}" th:field="*{configType}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
2018-07-09 08:44:52 +08:00
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
</form>
</div>
2019-03-31 12:56:04 +08:00
<th:block th:include="include :: footer" />
2018-07-09 08:44:52 +08:00
<script type="text/javascript">
2018-10-03 21:44:14 +08:00
var prefix = ctx + "system/config";
2018-07-09 08:44:52 +08:00
$("#form-config-edit").validate({
onkeyup: false,
2018-07-09 08:44:52 +08:00
rules: {
configKey: {
remote: {
url: prefix + "/checkConfigKeyUnique",
type: "post",
dataType: "json",
data: {
"configId": function() {
2018-08-23 17:06:31 +08:00
return $("#configId").val();
2018-07-09 08:44:52 +08:00
},
"configKey": function() {
2018-08-23 17:06:31 +08:00
return $.common.trim($("#configKey").val());
2018-07-09 08:44:52 +08:00
}
}
}
},
},
messages: {
"configKey": {
remote: "参数键名已经存在"
}
2019-02-25 13:19:06 +08:00
},
focusCleanup: true
2018-07-09 08:44:52 +08:00
});
2018-10-03 21:44:14 +08:00
function submitHandler() {
2018-10-03 23:11:09 +08:00
if ($.validate.form()) {
2018-10-03 21:44:14 +08:00
$.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
}
}
2018-07-09 08:44:52 +08:00
</script>
</body>
</html>