固定按钮位置(提交/关闭)
This commit is contained in:
@ -38,18 +38,12 @@
|
||||
<textarea id="remark" name="remark" class="form-control"></textarea>
|
||||
</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>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "system/post"
|
||||
|
||||
var prefix = ctx + "system/post";
|
||||
|
||||
$("#form-post-add").validate({
|
||||
rules:{
|
||||
postName:{
|
||||
@ -96,11 +90,14 @@
|
||||
"postName": {
|
||||
remote: "岗位名称已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
$.operate.save(prefix + "/add", $('#form-post-add').serialize());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form("#form-post-add")) {
|
||||
$.operate.save(prefix + "/add", $('#form-post-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user