aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-06 18:29:32 +0000
committerMario <mario@mariovavti.com>2018-10-06 20:34:57 +0200
commit9bfa5c82d19ce42bfb283c35f31518cca461349f (patch)
treed133f4edb91c47bfe8e109a2485097101e7ecb0f /include
parent567448e2fdddb7e9d9f1da64f9b70648ad1c2b65 (diff)
downloadvolse-hubzilla-9bfa5c82d19ce42bfb283c35f31518cca461349f.tar.gz
volse-hubzilla-9bfa5c82d19ce42bfb283c35f31518cca461349f.tar.bz2
volse-hubzilla-9bfa5c82d19ce42bfb283c35f31518cca461349f.zip
move profile assign selector to profile settings and personal menu selector to channel_home settings and get rid of misc channel settings section.
(cherry picked from commit 66cf0852728d2f95ed3a5b7a304dbc7b79111831)
Diffstat (limited to 'include')
-rw-r--r--include/selectors.php27
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) {