diff --git a/preferences/preferences.php b/preferences/preferences.php index 659142f25c..fd58f409fb 100755 --- a/preferences/preferences.php +++ b/preferences/preferences.php @@ -46,6 +46,10 @@ $t->set_block('_preferences','footer'); $t->set_block('_preferences','row_error'); + if ($GLOBALS['HTTP_GET_VARS']['appname'] != 'preverences') + { + $GLOBALS['phpgw']->translation->add_app('preferences'); // we need the prefs translations too + } /* Make things a little easier to follow */ /* Some places we will need to change this if there in common */ function check_app() @@ -102,6 +106,36 @@ $t->fp('rows','row',True); } + function create_check_box($label_name,$preference_name) + { + global $t; + + $_appname = check_app(); + $GLOBALS['phpgw']->nextmatchs->template_alternate_row_color($t); + $t->set_var('row_name',lang($label_name)); + + if (is_forced_value($_appname,$preference_name)) + { + return True; + } + + switch ($GLOBALS['type']) + { + case 'user': + $s = ''; + break; + case 'default': + $s = 'data[$_appname][$preference_name] ? ' CHECKED' : '') . '">'; + break; + case 'forced': + $s = 'data[$_appname][$preference_name] ? ' CHECKED' : '') . '">'; + break; + } + $t->set_var('row_value',$s); + + $t->fp('rows','row',True); + } + function create_option_string($selected,$values) { while (is_array($values) && list($var,$value) = each($values)) @@ -151,6 +185,36 @@ $t->fp('rows','row',True); } + + function create_text_area($label_name,$preference_name,$rows,$cols) + { + global $t; + + $_appname = check_app(); + $GLOBALS['phpgw']->nextmatchs->template_alternate_row_color($t); + $t->set_var('row_name',lang($label_name)); + + if (is_forced_value($_appname,$preference_name)) + { + return True; + } + + switch ($GLOBALS['type']) + { + case 'user': + $s = ''; + break; + case 'default': + $s = ''; + break; + case 'forced': + $s = ''; + break; + } + $t->set_var('row_value',$s); + + $t->fp('rows','row',True); + } function process_array(&$_p, $array) { @@ -291,7 +355,7 @@ } else { - $t->set_var('lang_title',lang('%1 - Preferences',$GLOBALS['phpgw_info']['navbar'][$GLOBALS['appname']]['title'])); + $t->set_var('lang_title',lang('%1 - Preferences',$GLOBALS['phpgw_info']['apps'][$GLOBALS['HTTP_GET_VARS']['appname']]['title'])); } $t->set_var('action_url',$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $GLOBALS['appname']));