[Options] Frontend Code added to enable or disable public search
这个提交包含在:
		
							父节点
							
								
									91f53dddd2
								
							
						
					
					
						当前提交
						18f8933d7a
					
				
					共有  2 个文件被更改,包括 17 次插入 和 0 次删除
				
			
		|  | @ -78,6 +78,14 @@ class Options extends CI_Controller { | ||||||
| 				$this->session->set_flashdata('success', 'Theme changed to '.$this->input->post('theme')); | 				$this->session->set_flashdata('success', 'Theme changed to '.$this->input->post('theme')); | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
|  | 			// Update theme choice within the options system
 | ||||||
|  | 			$search_update_status = $this->optionslib->update('global_search', $this->input->post('globalSearch')); | ||||||
|  | 
 | ||||||
|  | 			// If theme update is complete set a flashsession with a success note
 | ||||||
|  | 			if($search_update_status == TRUE) { | ||||||
|  | 				$this->session->set_flashdata('success', 'Global Search changed to '.$this->input->post('globalSearch')); | ||||||
|  | 			} | ||||||
|  | 
 | ||||||
| 			// Update Lang choice within the options system
 | 			// Update Lang choice within the options system
 | ||||||
| 			$lang_update_status = $this->optionslib->update('language', $this->input->post('language')); | 			$lang_update_status = $this->optionslib->update('language', $this->input->post('language')); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -57,6 +57,15 @@ | ||||||
|                             <small id="themeHelp" class="form-text text-muted">Global Theme Choice, this is used when users arent logged in.</small> |                             <small id="themeHelp" class="form-text text-muted">Global Theme Choice, this is used when users arent logged in.</small> | ||||||
|                         </div> |                         </div> | ||||||
| 
 | 
 | ||||||
|  |                         <div class="form-group"> | ||||||
|  |                             <label for="globalSearch">Public Search Bar</label> | ||||||
|  |                             <select class="custom-select" id="globalSearch" name="globalSearch" aria-describedby="globalSearchHelp" required> | ||||||
|  |                                 <option value='true' <?php if($this->optionslib->get_option('global_search') == "true") { echo "selected=\"selected\""; } ?>>Enabled</option>
 | ||||||
|  |                                 <option value='false' <?php if($this->optionslib->get_option('global_search') == "false") { echo "selected=\"selected\""; } ?>>Disabled</option>
 | ||||||
|  |                             </select> | ||||||
|  |                             <small id="globalSearchHelp" class="form-text text-muted">This allows non logged in users to access the search functions.</small> | ||||||
|  |                         </div> | ||||||
|  | 
 | ||||||
|                         <!-- Save the Form --> |                         <!-- Save the Form --> | ||||||
|                         <input class="btn btn-primary" type="submit" value="Save" /> |                         <input class="btn btn-primary" type="submit" value="Save" /> | ||||||
|                     </form> |                     </form> | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用