1 <form method="post" action="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'applications.php');?>">
4 if (! empty($this->settings)) {
5 $settings = $this->settings;
6 foreach ($settings as $key => $setting) {
7 $name = ! empty($setting->displayName) ? $setting->displayName : $key;
8 $default = isset($setting->default) ? $setting->default : '';
9 // $value = isset($vars['application']['user_prefs'][$key]) ? $vars['application']['user_prefs'][$key] : $default;
10 $html .= "<div><div class=\"settings_label\">$name</div>";
11 switch ($setting->type) {
13 $html .= "<select name=\"$key\">\n";
14 foreach ($setting->enumValues as $k => $v) {
15 $sel = ($k == $value) ? ' SELECTED' : '';
16 $html .= "<option value=\"$k\" $sel>$v</option>\n";
18 $html .= "</select>\n";
21 if (isset($this->user_settings[$key]) && $this->user_settings[$key]!=''){
22 $default=$this->user_settings[$key];
24 $html .= "<input type=\"text\" name=\"$key\" value=\"$default\" />\n";
27 //hide these for now so that they don't get saved?
28 //echo "<input type=\"hidden\" name=\"$key\" value=\"$default\" />\n";
29 $html = ''; //do not display anything
32 //TODO add radio boxes here, should they be yes / no?
35 if ($default=='true'){
36 $yes = ' checked="checked"';
38 $no = ' checked="checked"';
40 $html .= '<label for="'.$key.'_yes"/>'._AT('yes').'</label>';
41 $html .= '<input id="'.$key.'_yes" type="radio" name="'.$key.'" value="true" '.$yes.' />';
42 $html .= '<label for="'.$key.'_no"/>'._AT('no').'</label>';
43 $html .= '<input id="'.$key.'_no" type="radio" name="'.$key.'" value="false" '.$no.' />';
46 //TODO not sure what to do with this one yet
49 $html .= "<input type=\"text\" name=\"$key\" value=\"$default\" />\n";
55 echo $html . "</div>";
57 <input type="hidden" name="app_id" value="<?php echo $this->app_id; ?>" />
58 <input type="hidden" name="app_settings" value="1" />
59 <input type="submit" value="<?php echo _AT('save');?>"/>
61 <?php echo _AT('no_settings'); ?>