no mark_lotw if no station is selected

这个提交包含在:
HB9HIL 2023-11-19 17:04:19 +01:00
父节点 71101ea2a1
当前提交 52890a6156
共有 3 个文件被更改,包括 16 次插入1 次删除

查看文件

@ -215,7 +215,7 @@
<label for="to"><?php echo lang('gen_to_date') . ": " ?></label> <label for="to"><?php echo lang('gen_to_date') . ": " ?></label>
<input name="to" id="to" type="date" class="form-control w-auto"> <input name="to" id="to" type="date" class="form-control w-auto">
<br> <br>
<button type="submit" class="btn btn-sm btn-primary" value="Export"><?php echo lang('adif_mark_qso_as_exported_to_lotw') ?></button> <button type="button" class="btn btn-sm btn-primary" id="markExportedToLotw" value="Export"><?php echo lang('adif_mark_qso_as_exported_to_lotw') ?></button>
</form> </form>
</div> </div>
<div class="tab-pane <?php if ($showtab == 'dcl') { <div class="tab-pane <?php if ($showtab == 'dcl') {

查看文件

@ -104,6 +104,10 @@ function load_was_map() {
<script src="<?php echo base_url() ;?>assets/js/sections/maintenance.js"></script> <script src="<?php echo base_url() ;?>assets/js/sections/maintenance.js"></script>
<?php } ?> <?php } ?>
<?php if ($this->uri->segment(1) == "adif" ) { ?>
<script src="<?php echo base_url() ;?>assets/js/sections/adif.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "notes" && ($this->uri->segment(2) == "add" || $this->uri->segment(2) == "edit") ) { ?> <?php if ($this->uri->segment(1) == "notes" && ($this->uri->segment(2) == "add" || $this->uri->segment(2) == "edit") ) { ?>
<!-- Javascript used for Notes Area --> <!-- Javascript used for Notes Area -->
<script src="<?php echo base_url() ;?>assets/plugins/quill/quill.min.js"></script> <script src="<?php echo base_url() ;?>assets/plugins/quill/quill.min.js"></script>

11
assets/js/sections/adif.js 普通文件
查看文件

@ -0,0 +1,11 @@
$(document).ready(function(){
$('#markExportedToLotw').click(function(e){
let form = $(this).closest('form');
let station = form.find('select[name=station_profile]');
if (station.val() == 0) {
station.addClass('is-invalid');
}else{
form.submit();
}
})
});