fix WAPC Award bands

This commit is contained in:
tallcode
2025-07-23 15:21:30 +08:00
parent 580fec5b2d
commit 2b43c5cc25
5 changed files with 8 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 249;
$config['migration_version'] = 250;
/*
|--------------------------------------------------------------------------

View File

@@ -154,6 +154,7 @@ class Band extends CI_Controller {
$band['sota'] = $this->security->xss_clean($this->input->post('sota'));
$band['uscounties'] = $this->security->xss_clean($this->input->post('uscounties'));
$band['wap'] = $this->security->xss_clean($this->input->post('wap'));
$band['wapc'] = $this->security->xss_clean($this->input->post('wapc'));
$band['was'] = $this->security->xss_clean($this->input->post('was'));
$band['wwff'] = $this->security->xss_clean($this->input->post('wwff'));
$band['vucc'] = $this->security->xss_clean($this->input->post('vucc'));

View File

@@ -320,6 +320,7 @@ class Bands extends CI_Model {
'sota' => $band['sota'] == "true" ? '1' : '0',
'uscounties' => $band['uscounties'] == "true" ? '1' : '0',
'wap' => $band['wap'] == "true" ? '1' : '0',
'wapc' => $band['wapc'] == "true" ? '1' : '0',
'waja' => $band['waja'] == "true" ? '1' : '0',
'was' => $band['was'] == "true" ? '1' : '0',
'wwff' => $band['wwff'] == "true" ? '1' : '0',

View File

@@ -12,6 +12,7 @@ $sota = 0;
$uscounties = 0;
$vucc = 0;
$wap = 0;
$wapc = 0;
$waja = 0;
$was = 0;
$wwff = 0;
@@ -57,6 +58,7 @@ $wwff = 0;
<th><?= __("USA County"); ?></th>
<th><?= __("VUCC"); ?></th>
<th><?= __("WAP"); ?></th>
<th><?= __("WAPC"); ?></th>
<th><?= __("WAJA"); ?></th>
<th><?= __("WAS"); ?></th>
<th><?= __("WWFF"); ?></th>
@@ -89,6 +91,7 @@ $wwff = 0;
<td style="text-align: center; vertical-align: middle;" class='uscounties_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->uscounties == 1) {echo 'checked'; $uscounties++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='vucc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->vucc == 1) {echo 'checked'; $vucc++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='wap_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->wap == 1) {echo 'checked'; $wap++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='wapc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->wapc == 1) {echo 'checked'; $wapc++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='waja_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->waja == 1) {echo 'checked'; $waja++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='was_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->was == 1) {echo 'checked'; $was++;}?>></td>
<td style="text-align: center; vertical-align: middle;" class='wwff_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->wwff == 1) {echo 'checked'; $wwff++;}?>></td>
@@ -132,6 +135,7 @@ $wwff = 0;
<th class="master_uscounties"><input type="checkbox" <?php if ($uscounties > 0) echo 'checked';?>></th>
<th class="master_vucc"><input type="checkbox" <?php if ($vucc > 0) echo 'checked';?>></th>
<th class="master_wap"><input type="checkbox" <?php if ($wap > 0) echo 'checked';?>></th>
<th class="master_wapc"><input type="checkbox" <?php if ($wapc > 0) echo 'checked';?>></th>
<th class="master_waja"><input type="checkbox" <?php if ($waja > 0) echo 'checked';?>></th>
<th class="master_was"><input type="checkbox" <?php if ($was > 0) echo 'checked';?>></th>
<th class="master_wwff"><input type="checkbox" <?php if ($wwff > 0) echo 'checked';?>></th>

View File

@@ -229,6 +229,7 @@ function saveBand(id) {
'uscounties': $(".uscounties_"+id+" input[type='checkbox']").is(":checked"),
'waja': $(".waja_"+id+" input[type='checkbox']").is(":checked"),
'wap': $(".wap_"+id+" input[type='checkbox']").is(":checked"),
'wapc': $(".wapc_"+id+" input[type='checkbox']").is(":checked"),
'was': $(".was_"+id+" input[type='checkbox']").is(":checked"),
'wwff': $(".wwff_"+id+" input[type='checkbox']").is(":checked"),
'vucc': $(".vucc_"+id+" input[type='checkbox']").is(":checked")