固定按钮位置(提交/关闭)

This commit is contained in:
RuoYi
2018-10-03 21:44:14 +08:00
parent e68e13bc16
commit c85f36fa1f
28 changed files with 216 additions and 262 deletions

View File

@@ -79,13 +79,6 @@
</label>
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
@@ -167,11 +160,14 @@
"phonenumber":{
remote: "手机号码已经存在"
}
},
submitHandler:function(form){
add();
}
}
});
function submitHandler() {
if ($.validate.form("#form-user-add")) {
add();
}
}
function add() {
var userId = $("input[name='userId']").val();

View File

@@ -74,13 +74,6 @@
</label>
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
@@ -147,6 +140,12 @@
edit();
}
});
function submitHandler() {
if ($.validate.form("#form-user-edit")) {
edit();
}
}
function edit() {
var userId = $("input[name='userId']").val();

View File

@@ -50,12 +50,6 @@
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
@@ -113,11 +107,14 @@
"phonenumber":{
remote: "手机号码已经存在"
}
},
submitHandler:function(form){
$.operate.save(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
}
}
});
function submitHandler() {
if ($.validate.form("#form-user-edit")) {
$.operate.save(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
}
}
</script>
</body>
</html>

View File

@@ -31,12 +31,6 @@
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span>
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include :: footer"></div>
@@ -82,11 +76,14 @@
equalTo: "两次密码输入不一致"
}
},
submitHandler:function(form){
$.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
}
}
});
function submitHandler() {
if ($.validate.form("#form-user-resetPwd")) {
$.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
}
}
</script>
</body>

View File

@@ -18,12 +18,6 @@
<input class="form-control" type="password" name="password" id="password" th:value="${@config.getKey('sys.user.initPassword')}">
</div>
</div>
<div class="form-group">
<div class="form-control-static col-sm-offset-9">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
</div>
<div th:include="include :: footer"></div>
@@ -35,11 +29,14 @@
minlength: 5,
maxlength: 20
},
},
submitHandler:function(form){
$.operate.save(ctx + "system/user/resetPwd", $('#form-user-resetPwd').serialize());
}
});
function submitHandler() {
if ($.validate.form("#form-user-resetPwd")) {
$.operate.save(ctx + "system/user/resetPwd", $('#form-user-resetPwd').serialize());
}
}
</script>
</body>