|
@@ -63,6 +63,30 @@
|
|
|
$('#add_boot_job_modal').on('show.bs.modal', function (me) {
|
|
$('#add_boot_job_modal').on('show.bs.modal', function (me) {
|
|
|
refresh_boot_job_selectpicker($('#boot_job_selector'));
|
|
refresh_boot_job_selectpicker($('#boot_job_selector'));
|
|
|
});
|
|
});
|
|
|
|
|
+ $('#add_guest_boot_job_form').formValidation({
|
|
|
|
|
+ framework: 'bootstrap4',
|
|
|
|
|
+ icon: {
|
|
|
|
|
+ valid: 'fa fa-check',
|
|
|
|
|
+ invalid: 'fa fa-times',
|
|
|
|
|
+ validating: 'fa fa-refresh'
|
|
|
|
|
+ },
|
|
|
|
|
+ // Since the Bootstrap Button hides the radio and checkbox
|
|
|
|
|
+ // We exclude the disabled elements only
|
|
|
|
|
+ excluded: ':disabled',
|
|
|
|
|
+ locale: 'zh_CN',
|
|
|
|
|
+ fields: {
|
|
|
|
|
+ boot_job_selector: {
|
|
|
|
|
+ validators: {
|
|
|
|
|
+ notEmpty: {}
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .on('success.field.fv', function(e, data) {
|
|
|
|
|
+ if (data.fv.getInvalidFields().length > 0) { // There is invalid field
|
|
|
|
|
+ data.fv.disableSubmitButtons(true);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
function refresh() {
|
|
function refresh() {
|
|
@@ -258,7 +282,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="modal-body" style="padding-top: 0; padding-bottom: 0;">
|
|
<div class="modal-body" style="padding-top: 0; padding-bottom: 0;">
|
|
|
<div class="example-box-wrapper">
|
|
<div class="example-box-wrapper">
|
|
|
- <form class="form-horizontal bordered-row">
|
|
|
|
|
|
|
+ <form id="add_guest_boot_job_form" class="form-horizontal bordered-row">
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<div class="col-sm-2"></div>
|
|
<div class="col-sm-2"></div>
|
|
|
<label class="col-sm-2 control-label"><span class="glyph-icon icon-list-alt"></span> 启动作业</label>
|
|
<label class="col-sm-2 control-label"><span class="glyph-icon icon-list-alt"></span> 启动作业</label>
|
|
@@ -270,7 +294,7 @@
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<div class="col-sm-4"></div>
|
|
<div class="col-sm-4"></div>
|
|
|
<div class="col-sm-6 pull-right">
|
|
<div class="col-sm-6 pull-right">
|
|
|
- <button class="btn btn-blue-alt" style="width: 180px; height: 40px; font-size: 16px;" onclick="add_boot_job_at();">添加</button>
|
|
|
|
|
|
|
+ <button type="submit" class="btn btn-blue-alt" style="width: 180px; height: 40px; font-size: 16px;" onclick="add_boot_job_at();" disabled>添加</button>
|
|
|
<button class="btn btn-default" style="width: 64px; height: 40px; font-size: 16px;" data-dismiss="modal">取消</button>
|
|
<button class="btn btn-default" style="width: 64px; height: 40px; font-size: 16px;" data-dismiss="modal">取消</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|