Changeset 1035 for trunk/preferences/preferences.php
- Timestamp:
- 06/20/09 01:07:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/preferences/preferences.php
r1002 r1035 122 122 $def_text = $def_text != '' ? ' <i><font size="-1">'.lang('default').': '.$def_text.'</font></i>' : ''; 123 123 } 124 $t->set_var('row_id', "${GLOBALS[type]}[$name]"); 124 125 $t->set_var('row_value',"<input name=\"${GLOBALS[type]}[$name]\"value=\"". 125 126 @htmlentities($default,ENT_COMPAT,$charSet)."\"$options>$def_text"); … … 148 149 } 149 150 150 function create_check_box($label,$name,$help='',$default='',$run_lang=True )151 function create_check_box($label,$name,$help='',$default='',$run_lang=True,$checkbox_prop='',$visible=True) 151 152 { 152 153 // checkboxes itself can't be use as they return nothing if uncheckt !!! … … 165 166 '0' => lang('No'), 166 167 '1' => lang('Yes') 167 ),$help,$default,$run_lang );168 ),$help,$default,$run_lang,$checkbox_prop,$visible); 168 169 } 169 170 … … 196 197 { 197 198 global $t,$prefs; 199 $t->set_var('row_id', "${GLOBALS[type]}[$name]"); 198 200 $t->set_var('row_value',$code.$prefs[$name].$appendcode); 199 201 $t->set_var('row_name',lang("signature")); … … 202 204 } 203 205 204 function create_select_box($label,$name,$values,$help='',$default='',$run_lang=True,$select_prop = '' )206 function create_select_box($label,$name,$values,$help='',$default='',$run_lang=True,$select_prop = '',$visible=True) 205 207 { 206 208 global $t,$prefs; … … 235 237 $def_text = $def_text != '' ? ' <i><font size="-1">'.lang('default').': '.$values[$def_text].'</font></i>' : ''; 236 238 } 239 $t->set_var('row_id', "${GLOBALS[type]}[$name]"); 237 240 $t->set_var('row_value',"<select name=\"${GLOBALS[type]}[$name]\" $select_prop>$s</select>$def_text"); 238 241 $t->set_var('row_name',lang($label)); 242 if ($visible) 243 { 244 $t->set_var('row_visibility', ''); 245 } 246 else 247 { 248 $t->set_var('row_visibility', 'style="display: none;"'); 249 } 250 239 251 $GLOBALS['phpgw']->nextmatchs->template_alternate_row_color($t); 240 252 241 253 $t->fp('rows',process_help($help,$run_lang) ? 'help_row' : 'row',True); 242 254 } … … 314 326 $def_text = $def_text != '' ? '<br><i><font size="-1"><b>'.lang('default').'</b>:<br>'.nl2br($def_text).'</font></i>' : ''; 315 327 } 328 $t->set_var('row_id', "${GLOBALS[type]}[$name]"); 316 329 $t->set_var('row_value',"<textarea rows=\"$rows\" cols=\"$cols\" name=\"${GLOBALS[type]}[$name]\">". 317 330 htmlentities($default,ENT_COMPAT,$charSet)."</textarea>$def_text");
Note: See TracChangeset
for help on using the changeset viewer.