qso time off tested befor submit
这个提交包含在:
父节点
a85dc88159
当前提交
4139b3cb4c
共有 3 个文件被更改,包括 36 次插入 和 0 次删除
|
|
@ -1,4 +1,5 @@
|
||||||
<div class="container qso_panel">
|
<div class="container qso_panel">
|
||||||
|
<script language="javascript">var qso_manual = "<?php echo $_GET['manual']; ?>";</script>
|
||||||
|
|
||||||
<div class="row qsopane">
|
<div class="row qsopane">
|
||||||
|
|
||||||
|
|
@ -547,6 +548,7 @@
|
||||||
|
|
||||||
<button type="reset" class="btn btn-secondary" onclick="reset_fields()"><?php echo lang('qso_btn_reset_qso'); ?></button>
|
<button type="reset" class="btn btn-secondary" onclick="reset_fields()"><?php echo lang('qso_btn_reset_qso'); ?></button>
|
||||||
<button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> <?php echo lang('qso_btn_save_qso'); ?></button>
|
<button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> <?php echo lang('qso_btn_save_qso'); ?></button>
|
||||||
|
<div class="alert alert-danger warningOnSubmit" style="display:none;"><span><i class="fas fa-times-circle"></i></span> <span class="warningOnSubmit_txt">TimeOff lest than TimeOn</span></div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -651,4 +651,14 @@ table.dataTable tfoot td {
|
||||||
}
|
}
|
||||||
.icon_selectBox_data label:hover {
|
.icon_selectBox_data label:hover {
|
||||||
background-color:var(--bs-primary);
|
background-color:var(--bs-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputError {
|
||||||
|
border: 1px var(--bs-danger) solid;
|
||||||
|
}
|
||||||
|
.warningOnSubmit {
|
||||||
|
margin-top:15px;
|
||||||
|
}
|
||||||
|
.warningOnSubmit_txt {
|
||||||
|
margin-left:10px;
|
||||||
}
|
}
|
||||||
|
|
@ -345,6 +345,14 @@ var favs={};
|
||||||
$('.satellite_names_list').append(items.join( "" ));
|
$('.satellite_names_list').append(items.join( "" ));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Test Consistency value on submit form //
|
||||||
|
$("#qso_input").off('submit').on('submit', function(){
|
||||||
|
var _submit = true;
|
||||||
|
if ((typeof qso_manual !== "undefined")&&(qso_manual == "1")) {
|
||||||
|
if ($('#qso_input input[name="end_time"]').length == 1) { _submit = testTimeOffConsistency(); }
|
||||||
|
}
|
||||||
|
return _submit;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
var selected_sat;
|
var selected_sat;
|
||||||
|
|
@ -1053,3 +1061,19 @@ function closeModal() {
|
||||||
container.removeChild(modal)
|
container.removeChild(modal)
|
||||||
}, 200)
|
}, 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// [TimeOff] test Consistency timeOff value //
|
||||||
|
function testTimeOffConsistency() {
|
||||||
|
var _start_time = $('#qso_input input[name="start_time"]').val();
|
||||||
|
var _end_time = $('#qso_input input[name="end_time"]').val();
|
||||||
|
$('#qso_input input[name="end_time"]').removeClass('inputError');
|
||||||
|
$('#qso_input .warningOnSubmit').hide();
|
||||||
|
if ( !( (parseInt(_start_time.replaceAll(':','')) <= parseInt(_end_time.replaceAll(':','')))
|
||||||
|
|| ((_start_time.substring(0,2)=="23")&&(_end_time.substring(0,2)=="00")) ) ) {
|
||||||
|
$('#qso_input input[name="end_time"]').addClass('inputError');
|
||||||
|
$('#qso_input .warningOnSubmit').show();
|
||||||
|
$('#qso_input input[name="end_time"]').off('change').on('change',function(){ testTimeOffConsistency(); });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用