1 <div class="social-wrapper">
2 <form method="post" action="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'applications.php');?>">
5 if (! empty($this->settings)) {
6 $settings = $this->settings;
7 foreach ($settings as $key => $setting) {
8 $name = ! empty($setting->displayName) ? $setting->displayName : $key;
9 $default = isset($setting->default) ? $setting->default : '';
10 // $value = isset($vars['application']['user_prefs'][$key]) ? $vars['application']['user_prefs'][$key] : $default;
11 $html .= "<div class=\"settings_label\">$name</div>";
12 switch ($setting->type) {
14 $html .= "<select name=\"$key\">\n";
15 foreach ($setting->enumValues as $k => $v) {
16 $sel = ($k == $value) ? ' SELECTED' : '';
17 $html .= "<option value=\"$k\" $sel>$v</option>\n";
19 $html .= "</select>\n";
22 if (isset($this->user_settings[$key]) && $this->user_settings[$key]!=''){
23 $default=$this->user_settings[$key];
25 $html .= "<input type=\"text\" name=\"$key\" value=\"$default\" />\n";
28 //hide these for now so that they don't get saved?
29 //echo "<input type=\"hidden\" name=\"$key\" value=\"$default\" />\n";
30 $html = ''; //do not display anything
33 //TODO add radio boxes here, should they be yes / no?
36 if ($default=='true'){
37 $yes = ' checked="checked"';
39 $no = ' checked="checked"';
41 $html .= '<label for="'.$key.'_yes">'._AT('yes').'</label>';
42 $html .= '<input id="'.$key.'_yes" type="radio" name="'.$key.'" value="true" '.$yes.' />';
43 $html .= '<label for="'.$key.'_no">'._AT('no').'</label>';
44 $html .= '<input id="'.$key.'_no" type="radio" name="'.$key.'" value="false" '.$no.' />';
47 //TODO not sure what to do with this one yet
50 $html .= "<input type=\"text\" name=\"$key\" value=\"$default\" />\n";
56 echo $html . "</div>";
58 <input type="hidden" name="app_id" value="<?php echo $this->app_id; ?>" />
59 <input type="hidden" name="app_settings" value="1" />
60 <input type="submit" value="<?php echo _AT('save');?>"/>
62 <?php echo _AT('no_settings'); ?>
65 <div style="clear:both;"></div>