Added datepicker for LoTW report download. Fixes #465.
这个提交包含在:
		
							父节点
							
								
									93b7100c51
								
							
						
					
					
						当前提交
						adbc7f68ce
					
				
					共有  3 个文件被更改,包括 37 次插入 和 8 次删除
				
			
		|  | @ -127,8 +127,17 @@ class Lotw extends CI_Controller { | ||||||
| 				$this->session->set_flashdata('warning', 'You have not defined your ARRL LoTW credentials!'); redirect('lotw/import'); | 				$this->session->set_flashdata('warning', 'You have not defined your ARRL LoTW credentials!'); redirect('lotw/import'); | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
|  |             $customDate = $this->input->post('from'); | ||||||
|  | 
 | ||||||
|  | 			if ($customDate != NULL) { | ||||||
|  |                 $customDate = DateTime::createFromFormat('d/m/Y', $customDate); | ||||||
|  |                 $customDate = $customDate->format('Y-m-d'); | ||||||
|  |                 $lotw_last_qsl_date = date($customDate); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|                 // Query the logbook to determine when the last LoTW confirmation was
 |                 // Query the logbook to determine when the last LoTW confirmation was
 | ||||||
|                 $lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date())); |                 $lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date())); | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
| 			// Build URL for LoTW report file
 | 			// Build URL for LoTW report file
 | ||||||
| 			$lotw_url .= "?"; | 			$lotw_url .= "?"; | ||||||
|  |  | ||||||
|  | @ -1128,5 +1128,17 @@ $(document).ready(function(){ | ||||||
| </script> | </script> | ||||||
| <?php } ?>
 | <?php } ?>
 | ||||||
| 
 | 
 | ||||||
|  |     <?php if ($this->uri->segment(2) == "import") { ?>
 | ||||||
|  |         <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script> | ||||||
|  |         <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js"></script> | ||||||
|  |         <script type="text/javascript"> | ||||||
|  |             $(function () { | ||||||
|  |                 $('#datetimepicker1').datetimepicker({ | ||||||
|  |                     format: 'DD/MM/YYYY', | ||||||
|  |                 }); | ||||||
|  |             }); | ||||||
|  |         </script> | ||||||
|  |     <?php } ?>
 | ||||||
|  | 
 | ||||||
|   </body> |   </body> | ||||||
| </html> | </html> | ||||||
|  |  | ||||||
|  | @ -27,9 +27,17 @@ | ||||||
| 			<input type="radio" name="lotwimport" id="fetch" class="custom-control-input" value="fetch" /> | 			<input type="radio" name="lotwimport" id="fetch" class="custom-control-input" value="fetch" /> | ||||||
| 			<label class="custom-control-label" for="fetch">Pull LoTW data for me</label> | 			<label class="custom-control-label" for="fetch">Pull LoTW data for me</label> | ||||||
| 		</div> | 		</div> | ||||||
|  |       <p class="card-text">From date:</p> | ||||||
|  |       <div class="row"> | ||||||
|  |           <div class="input-group date col-md-3" id="datetimepicker1" data-target-input="nearest"> | ||||||
|  |               <input name="from" type="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker1"/> | ||||||
|  |               <div class="input-group-append"  data-target="#datetimepicker1" data-toggle="datetimepicker"> | ||||||
|  |                   <div class="input-group-text"><i class="fa fa-calendar"></i></div> | ||||||
|  |               </div> | ||||||
|  |           </div> | ||||||
|  |       </div> | ||||||
| 
 | 
 | ||||||
| 
 | 		<p class="form-text text-muted">Cloudlog will use the LoTW username and password stored in your user profile to download a report from LoTW for you. The report Cloudlog downloads will have all confirmations since chosen date, or since your last LoTW confirmation (fetched from your log), up until now.</p> | ||||||
| 		<p class="form-text text-muted">Cloudlog will use the LoTW username and password stored in your user profile to download a report from LoTW for you. The report Cloudlog downloads will have all confirmations since your last LoTW confirmation, up until now.</p> |  | ||||||
| 
 | 
 | ||||||
| 		<p class="form-text text-muted"><span class="badge badge-info">Important</span> You must have QSOs in the logbook before this option works, it will not populate your log from empty based on LoTW QSOs yet.</p> | 		<p class="form-text text-muted"><span class="badge badge-info">Important</span> You must have QSOs in the logbook before this option works, it will not populate your log from empty based on LoTW QSOs yet.</p> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用