diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-10-19 11:18:28 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-10-19 11:18:28 +0200 |
commit | fa9e9510e5d993d183feb942fe74be5fdd07f5cf (patch) | |
tree | 41fec09f527a9346e043b8099b458a97d81b03ed /include/selectors.php | |
parent | 32de123db0ac526795a237ff46885fe8a332cbc0 (diff) | |
parent | 06b3ad1071c755757555baf941e2c0f446f97b21 (diff) | |
download | volse-hubzilla-fa9e9510e5d993d183feb942fe74be5fdd07f5cf.tar.gz volse-hubzilla-fa9e9510e5d993d183feb942fe74be5fdd07f5cf.tar.bz2 volse-hubzilla-fa9e9510e5d993d183feb942fe74be5fdd07f5cf.zip |
Merge branch '3.8RC'3.8
Diffstat (limited to 'include/selectors.php')
-rw-r--r-- | include/selectors.php | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/include/selectors.php b/include/selectors.php index ab049fff6..71e2a387d 100644 --- a/include/selectors.php +++ b/include/selectors.php @@ -3,21 +3,32 @@ function contact_profile_assign($current) { - $o = ''; - - $o .= "<select id=\"contact-profile-selector\" name=\"profile_assign\" class=\"form-control\"/>\r\n"; - $r = q("SELECT profile_guid, profile_name FROM profile WHERE uid = %d", - intval($_SESSION['uid'])); + intval($_SESSION['uid']) + ); if($r) { foreach($r as $rr) { - $selected = (($rr['profile_guid'] == $current) ? " selected=\"selected\" " : ""); - $o .= "<option value=\"{$rr['profile_guid']}\" $selected >{$rr['profile_name']}</option>\r\n"; + $options[$rr['profile_guid']] = $rr['profile_name']; } } - $o .= "</select>\r\n"; + + $select = [ + 'profile_assign', + t('Profile to assign new connections'), + $current, + '', + $options + ]; + + $o = replace_macros(get_markup_template('field_select.tpl'), + [ + '$field' => $select + ] + ); + return $o; + } function contact_poll_interval($current, $disabled = false) { |