Revert "Correct user date formating on QSO pages (Live/Post)"
This reverts commit 77a99780cb.
			
			
这个提交包含在:
		
							父节点
							
								
									5f10c52323
								
							
						
					
					
						当前提交
						0f57e62a84
					
				
					共有  2 个文件被更改,包括 13 次插入 和 42 次删除
				
			
		|  | @ -498,35 +498,10 @@ $(document).on('keypress',function(e) { | ||||||
|           $('.input_time').jclock(options); |           $('.input_time').jclock(options); | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         var fmt = "<?php
 |  | ||||||
| 		// Borrowed from ..\qso\index.php
 |  | ||||||
| 		// Get Date format
 |  | ||||||
|         if($this->session->userdata('user_date_format')) { |  | ||||||
|             // If Logged in and session exists
 |  | ||||||
|             $custom_date_format = $this->session->userdata('user_date_format'); |  | ||||||
|         } else { |  | ||||||
|             // Get Default date format from /config/cloudlog.php
 |  | ||||||
|             $custom_date_format = $this->config->item('qso_date_format'); |  | ||||||
|         } |  | ||||||
| 		// php format string
 |  | ||||||
| 		$find = array('d',  // Day of month (2 digit)
 |  | ||||||
|                       'm',  // Numeric month (2 digit)
 |  | ||||||
|                       'M',  // Month abbreviation (3 char)
 |  | ||||||
|                       'Y',  // Year (4 digit)
 |  | ||||||
|                       'y'); // Year (2 digit)
 |  | ||||||
| 		// jclock format string
 |  | ||||||
| 		$replace = array('%d',  // Day of month (2 digit)
 |  | ||||||
|                          '%m',  // Numeric month (2 digit)
 |  | ||||||
|                          '%b',  // Month abbreviation (3 char)
 |  | ||||||
|                          '%Y',  // Year (4 digit)
 |  | ||||||
|                          '%y'); // Year (2 digit)
 |  | ||||||
| 		echo str_replace($find, $replace, $custom_date_format) |  | ||||||
| 		?>"
 |  | ||||||
| 
 |  | ||||||
|         $(function($) { |         $(function($) { | ||||||
|           var options = { |           var options = { | ||||||
|             utc: true, |             utc: true, | ||||||
|             format: fmt |             format: '%d-%m-%Y' | ||||||
|           } |           } | ||||||
|           $('.input_date').jclock(options); |           $('.input_date').jclock(options); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  | @ -35,19 +35,6 @@ | ||||||
|         </ul> |         </ul> | ||||||
|       </div> |       </div> | ||||||
| 
 | 
 | ||||||
|       <?php |  | ||||||
| 
 |  | ||||||
|       // Get Date format
 |  | ||||||
|       if($this->session->userdata('user_date_format')) { |  | ||||||
|           // If Logged in and session exists
 |  | ||||||
|           $custom_date_format = $this->session->userdata('user_date_format'); |  | ||||||
|       } else { |  | ||||||
|           // Get Default date format from /config/cloudlog.php
 |  | ||||||
|           $custom_date_format = $this->config->item('qso_date_format'); |  | ||||||
|       } |  | ||||||
| 
 |  | ||||||
|       ?>
 |  | ||||||
| 
 |  | ||||||
|       <div class="card-body"> |       <div class="card-body"> | ||||||
|         <div class="tab-content" id="myTabContent"> |         <div class="tab-content" id="myTabContent"> | ||||||
|           <div class="tab-pane fade show active" id="qso" role="tabpanel" aria-labelledby="qso-tab"> |           <div class="tab-pane fade show active" id="qso" role="tabpanel" aria-labelledby="qso-tab"> | ||||||
|  | @ -55,7 +42,7 @@ | ||||||
|               <div class="form-row"> |               <div class="form-row"> | ||||||
|                 <div class="form-group col-md-6"> |                 <div class="form-group col-md-6"> | ||||||
|                   <label for="start_date"><?php echo $this->lang->line('general_word_date'); ?></label>
 |                   <label for="start_date"><?php echo $this->lang->line('general_word_date'); ?></label>
 | ||||||
|                   <input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo date($custom_date_format, strtotime($this->session->userdata('start_date'))); } else { echo date($custom_date_format); }?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : "");  ?> >
 |                   <input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : "");  ?> >
 | ||||||
|                 </div> |                 </div> | ||||||
| 
 | 
 | ||||||
|                 <div class="form-group col-md-6"> |                 <div class="form-group col-md-6"> | ||||||
|  | @ -528,6 +515,15 @@ | ||||||
| 
 | 
 | ||||||
|               <?php |               <?php | ||||||
| 
 | 
 | ||||||
|  | 			  // Get Date format
 | ||||||
|  | 			  if($this->session->userdata('user_date_format')) { | ||||||
|  | 				  // If Logged in and session exists
 | ||||||
|  | 				  $custom_date_format = $this->session->userdata('user_date_format'); | ||||||
|  | 			  } else { | ||||||
|  | 				  // Get Default date format from /config/cloudlog.php
 | ||||||
|  | 				  $custom_date_format = $this->config->item('qso_date_format'); | ||||||
|  | 			  } | ||||||
|  | 
 | ||||||
| 			  $i = 0; | 			  $i = 0; | ||||||
|               foreach ($query->result() as $row) { |               foreach ($query->result() as $row) { | ||||||
|               	echo '<tr class="tr'.($i & 1).'">'; |               	echo '<tr class="tr'.($i & 1).'">'; | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用