Added an IOTA-dropdown in edit/create station profile. We have the table with IOTA, so I added a dropdown to make it a bit more user-friendly.
这个提交包含在:
		
							父节点
							
								
									44eee371d6
								
							
						
					
					
						当前提交
						d38aa6eb51
					
				
					共有  3 个文件被更改,包括 38 次插入 和 10 次删除
				
			
		|  | @ -37,6 +37,9 @@ class Station extends CI_Controller { | ||||||
| 		$this->load->model('dxcc'); | 		$this->load->model('dxcc'); | ||||||
| 		$data['dxcc_list'] = $this->dxcc->list(); | 		$data['dxcc_list'] = $this->dxcc->list(); | ||||||
| 
 | 
 | ||||||
|  |         $this->load->model('logbook_model'); | ||||||
|  |         $data['iota_list'] = $this->logbook_model->fetchIota(); | ||||||
|  | 
 | ||||||
| 		$this->load->library('form_validation'); | 		$this->load->library('form_validation'); | ||||||
| 
 | 
 | ||||||
| 		$this->form_validation->set_rules('station_profile_name', 'Station Profile Name', 'required'); | 		$this->form_validation->set_rules('station_profile_name', 'Station Profile Name', 'required'); | ||||||
|  | @ -62,6 +65,9 @@ class Station extends CI_Controller { | ||||||
| 
 | 
 | ||||||
| 		$this->load->model('stations'); | 		$this->load->model('stations'); | ||||||
| 		$this->load->model('dxcc'); | 		$this->load->model('dxcc'); | ||||||
|  |         $this->load->model('logbook_model'); | ||||||
|  | 
 | ||||||
|  |         $data['iota_list'] = $this->logbook_model->fetchIota(); | ||||||
| 
 | 
 | ||||||
| 		$item_id_clean = $this->security->xss_clean($id); | 		$item_id_clean = $this->security->xss_clean($id); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -161,7 +161,16 @@ | ||||||
| 
 | 
 | ||||||
|             <div class="form-group"> |             <div class="form-group"> | ||||||
|                 <label for="stationIOTAInput">IOTA Reference</label> |                 <label for="stationIOTAInput">IOTA Reference</label> | ||||||
| 		    <input type="text" class="form-control" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" placeholder="EU-005"> |                 <select class="custom-select" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" placeholder="EU-005"> | ||||||
|  |                     <option value =""></option> | ||||||
|  | 
 | ||||||
|  |                     <?php | ||||||
|  |                     foreach($iota_list as $i){ | ||||||
|  |                         echo '<option value=' . $i->tag . '>' . $i->tag . ' - ' . $i->name . '</option>'; | ||||||
|  |                     } | ||||||
|  |                     ?>
 | ||||||
|  | 
 | ||||||
|  |                 </select> | ||||||
|                 <small id="stationIOTAInputHelp" class="form-text text-muted">Station IOTA Reference for example EU-005, You can lookup IOTA References at the <a target="_blank" href="https://www.iota-world.org/iota-directory/annex-f-short-title-iota-reference-number-list.html">IOTA World</a> website.</small> |                 <small id="stationIOTAInputHelp" class="form-text text-muted">Station IOTA Reference for example EU-005, You can lookup IOTA References at the <a target="_blank" href="https://www.iota-world.org/iota-directory/annex-f-short-title-iota-reference-number-list.html">IOTA World</a> website.</small> | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -179,7 +179,20 @@ | ||||||
| 
 | 
 | ||||||
|             <div class="form-group"> |             <div class="form-group"> | ||||||
|                 <label for="stationIOTAInput">IOTA Reference</label> |                 <label for="stationIOTAInput">IOTA Reference</label> | ||||||
| 		    <input type="text" class="form-control" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" value="<?php if(set_value('iota') != "") { echo set_value('iota'); } else { echo $my_station_profile->station_iota; } ?>"> |                 <select class="custom-select" name="iota" id="stationIOTAInput" aria-describedby="stationIOTAInputHelp" placeholder="EU-005"> | ||||||
|  |                     <option value =""></option> | ||||||
|  | 
 | ||||||
|  |                     <?php | ||||||
|  |                     foreach($iota_list as $i){ | ||||||
|  |                         echo '<option value=' . $i->tag; | ||||||
|  |                         if ($my_station_profile->station_iota == $i->tag) { | ||||||
|  |                             echo " selected =\"selected\""; | ||||||
|  |                         } | ||||||
|  |                         echo '>' . $i->tag . ' - ' . $i->name . '</option>'; | ||||||
|  |                     } | ||||||
|  |                     ?>
 | ||||||
|  | 
 | ||||||
|  |                 </select> | ||||||
|                 <small id="stationIOTAInputHelp" class="form-text text-muted">Station IOTA Reference for example EU-005, You can lookup IOTA References at the <a target="_blank" href="https://www.iota-world.org/iota-directory/annex-f-short-title-iota-reference-number-list.html">IOTA World</a> website.</small> |                 <small id="stationIOTAInputHelp" class="form-text text-muted">Station IOTA Reference for example EU-005, You can lookup IOTA References at the <a target="_blank" href="https://www.iota-world.org/iota-directory/annex-f-short-title-iota-reference-number-list.html">IOTA World</a> website.</small> | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用