[QSLPrint] Added function for deleting QSOs from print queue.
这个提交包含在:
父节点
cfd6253dfc
当前提交
b80aaf4458
共有 4 个文件被更改,包括 59 次插入 和 7 次删除
|
|
@ -114,6 +114,12 @@ class QSLPrint extends CI_Controller {
|
|||
|
||||
redirect('logbook');
|
||||
}
|
||||
|
||||
public function delete_from_qsl_queue($id) {
|
||||
$this->load->model('qslprint_model');
|
||||
|
||||
$this->qslprint_model->delete_from_qsl_queue($this->security->xss_clean($id));
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file Qslprint.php */
|
||||
|
|
|
|||
|
|
@ -37,6 +37,22 @@ class Qslprint_model extends CI_Model {
|
|||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function delete_from_qsl_queue($id) {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
$station_id = $CI->Stations->find_active();
|
||||
|
||||
$data = array(
|
||||
'COL_QSL_SENT' => "N",
|
||||
);
|
||||
|
||||
$this->db->where("COL_PRIMARY_KEY", $id);
|
||||
//$this->db->where("station_id", $station_id);
|
||||
$this->db->update($this->config->item('table_name'), $data);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -2022,5 +2022,33 @@ function deleteQsl(id) {
|
|||
<?php if ($this->uri->segment(1) == "contesting" && $this->uri->segment(2) == "add") { ?>
|
||||
<script src="<?php echo base_url() ;?>assets/js/sections/contestingnames.js"></script>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->uri->segment(1) == "qslprint") { ?>
|
||||
<script>
|
||||
function deleteFromQslQueue(id) {
|
||||
$.ajax({
|
||||
url: baseURL + 'index.php/qslprint/delete_from_qsl_queue',
|
||||
type: 'post',
|
||||
data: {'id': id
|
||||
},
|
||||
success: function(html) {
|
||||
BootstrapDialog.show({
|
||||
title: 'QSO Data',
|
||||
size: BootstrapDialog.SIZE_WIDE,
|
||||
cssClass: 'qso-counties-dialog',
|
||||
nl2br: false,
|
||||
message: html,
|
||||
buttons: [{
|
||||
label: 'Close',
|
||||
action: function (dialogItself) {
|
||||
dialogItself.close();
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -15,13 +15,15 @@
|
|||
<div class="card-header">
|
||||
Export Requested QSLs for Printing
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<select name="station_profile" class="custom-select mb-2 mr-sm-2" style="width: 20%;">
|
||||
<option value="0">Select Station Profile</option>
|
||||
<?php foreach ($station_profile->result() as $station) { ?>
|
||||
<option value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="card-body">
|
||||
<form class="form" action="<?php echo site_url('adif/import'); ?>" method="post" enctype="multipart/form-data">
|
||||
<select name="station_profile" class="custom-select mb-2 mr-sm-2" style="width: 20%;">
|
||||
<option value="0">Select Station Profile</option>
|
||||
<?php foreach ($station_profile->result() as $station) { ?>
|
||||
<option value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<p class="card-text">Here you can export requested QSLs as CSV or ADIF files for printing and, optionally, mark them as sent via bureau.</p>
|
||||
<p class="card-text">Requested QSLs are any QSOs with a value of "Requested" or "Queued" in their "QSL Sent" field.</p>
|
||||
|
|
|
|||
正在加载…
在新工单中引用