diff options
-rw-r--r-- | Zotlabs/Module/Profiles.php | 43 | ||||
-rw-r--r-- | Zotlabs/Module/Settings/Channel.php | 4 | ||||
-rw-r--r-- | Zotlabs/Widget/Newmember.php | 2 | ||||
-rw-r--r-- | view/css/widgets.css | 1 | ||||
-rwxr-xr-x | view/tpl/profile_edit.tpl | 8 | ||||
-rwxr-xr-x | view/tpl/settings.tpl | 4 |
6 files changed, 33 insertions, 29 deletions
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index b1cf9596c..e02cb33db 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -655,7 +655,7 @@ class Profiles extends \Zotlabs\Web\Controller { intval($id), intval(local_channel()) ); - if(! count($r)) { + if(! $r) { notice( t('Profile not found.') . EOL); return; } @@ -712,13 +712,10 @@ class Profiles extends \Zotlabs\Web\Controller { $tpl = get_markup_template("profile_edit.tpl"); $o .= replace_macros($tpl,array( - + '$multi_profiles' => ((feature_enabled(local_channel(),'multi_profiles')) ? true : false), '$form_security_token' => get_form_security_token("profile_edit"), - '$profile_clone_link' => ((feature_enabled(local_channel(),'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t=' - . get_form_security_token("profile_clone") : ''), - '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' - . get_form_security_token("profile_drop"), - + '$profile_clone_link' => 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone"), + '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"), '$fields' => $fields, '$vcard' => $vcard, '$guid' => $r[0]['profile_guid'], @@ -786,22 +783,22 @@ class Profiles extends \Zotlabs\Web\Controller { '$channels' => array('channels', t('My other channels'), $r[0]['channels']), '$extra_fields' => $extra_fields, '$comms' => t('Communications'), - '$tel_label' => t('Phone'), - '$email_label' => t('Email'), - '$impp_label' => t('Instant messenger'), - '$url_label' => t('Website'), - '$adr_label' => t('Address'), - '$note_label' => t('Note'), - '$mobile' => t('Mobile'), - '$home' => t('Home'), - '$work' => t('Work'), - '$other' => t('Other'), - '$add_card' => t('Add Contact'), - '$add_field' => t('Add Field'), - '$create' => t('Create'), - '$update' => t('Update'), - '$delete' => t('Delete'), - '$cancel' => t('Cancel'), + '$tel_label' => t('Phone'), + '$email_label' => t('Email'), + '$impp_label' => t('Instant messenger'), + '$url_label' => t('Website'), + '$adr_label' => t('Address'), + '$note_label' => t('Note'), + '$mobile' => t('Mobile'), + '$home' => t('Home'), + '$work' => t('Work'), + '$other' => t('Other'), + '$add_card' => t('Add Contact'), + '$add_field' => t('Add Field'), + '$create' => t('Create'), + '$update' => t('Update'), + '$delete' => t('Delete'), + '$cancel' => t('Cancel'), )); $arr = array('profile' => $r[0], 'entry' => $o); diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php index fb8284d2e..139e5f966 100644 --- a/Zotlabs/Module/Settings/Channel.php +++ b/Zotlabs/Module/Settings/Channel.php @@ -202,7 +202,7 @@ class Channel { $vnotify += intval($_POST['vnotify9']); if(x($_POST,'vnotify10')) $vnotify += intval($_POST['vnotify10']); - if(x($_POST,'vnotify11')) + if(x($_POST,'vnotify11') && is_site_admin()) $vnotify += intval($_POST['vnotify11']); if(x($_POST,'vnotify12')) $vnotify += intval($_POST['vnotify12']); @@ -569,7 +569,7 @@ class Channel { '$vnotify8' => array('vnotify8', t('System info messages'), ($vnotify & VNOTIFY_INFO), VNOTIFY_INFO, t('Recommended'), $yes_no), '$vnotify9' => array('vnotify9', t('System critical alerts'), ($vnotify & VNOTIFY_ALERT), VNOTIFY_ALERT, t('Recommended'), $yes_no), '$vnotify10' => array('vnotify10', t('New connections'), ($vnotify & VNOTIFY_INTRO), VNOTIFY_INTRO, t('Recommended'), $yes_no), - '$vnotify11' => array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, '', $yes_no), + '$vnotify11' => ((is_site_admin()) ? array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, '', $yes_no) : array()), '$vnotify12' => array('vnotify12', t('Unseen shared files'), ($vnotify & VNOTIFY_FILES), VNOTIFY_FILES, '', $yes_no), '$vnotify13' => (($disable_discover_tab) ? array() : array('vnotify13', t('Unseen public activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no)), '$mailhost' => [ 'mailhost', t('Email notification hub (hostname)'), get_pconfig(local_channel(),'system','email_notify_host',\App::get_hostname()), sprintf( t('If your channel is mirrored to multiple hubs, set this to your preferred location. This will prevent duplicate email notifications. Example: %s'),\App::get_hostname()) ], diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php index acc151944..afa808e6f 100644 --- a/Zotlabs/Widget/Newmember.php +++ b/Zotlabs/Widget/Newmember.php @@ -47,7 +47,7 @@ class Newmember { t('Communicate'), [ - 'channel/' . $channel['channel_address'] => t('View your channel homepage'), + 'channel/' . $c['channel_address'] => t('View your channel homepage'), 'network' => t('View your network stream'), ], diff --git a/view/css/widgets.css b/view/css/widgets.css index f97029aad..48df1811f 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -230,4 +230,5 @@ a.wikilist { font-size: 20px; margin-left: -25px; margin-top: 25px; + opacity: 0.8; } diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl index 95183fdf4..c967fa02c 100755 --- a/view/tpl/profile_edit.tpl +++ b/view/tpl/profile_edit.tpl @@ -4,7 +4,7 @@ <button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-cog"></i> {{$tools_label}} </button> - <div class="dropdown-menu"> + <div class="dropdown-menu dropdown-menu-right"> <a class="dropdown-item" href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}"><i class="fa fa-fw fa-user"></i> {{$profpic}}</a> {{if $is_default}} <a class="dropdown-item" href="cover_photo" id="cover-photo_upload-link" title="{{$coverpic}}"><i class="fa fa-fw fa-picture-o"></i> {{$coverpic}}</a> @@ -15,7 +15,7 @@ <a class="dropdown-item" href="thing" id="profile-edit-thing-link" title="{{$addthing}}"><i class="fa fa-fw fa-plus-circle"></i> {{$addthing}}</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="profile/{{$profile_id}}/view" id="profile-edit-view-link" title="{{$viewprof}}">{{$viewprof}}</a> - {{if $profile_clone_link}} + {{if $multi_profiles}} <div class="dropdown-divider"></div> <a class="dropdown-item" href="{{$profile_clone_link}}" id="profile-edit-clone-link" title="{{$cr_prof}}">{{$cl_prof}}</a> {{/if}} @@ -56,7 +56,11 @@ </div> <div id="personal-collapse" class="panel-collapse collapse show" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="personal"> <div class="section-content-tools-wrapper"> + {{if $multi_profiles}} {{include file="field_input.tpl" field=$profile_name}} + {{else}} + <input type="hidden" name="{{$profile_name.0}}" value="{{$profile_name.2}}"> + {{/if}} {{include file="field_input.tpl" field=$name}} diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 130dc6918..0055fa265 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -138,7 +138,9 @@ {{include file="field_intcheckbox.tpl" field=$vnotify7}} {{include file="field_intcheckbox.tpl" field=$vnotify8}} {{include file="field_intcheckbox.tpl" field=$vnotify9}} - {{include file="field_intcheckbox.tpl" field=$vnotify11}} + {{if $vnotify11}} + {{include file="field_intcheckbox.tpl" field=$vnotify11}} + {{/if}} {{include file="field_intcheckbox.tpl" field=$vnotify12}} {{if $vnotify13}} {{include file="field_intcheckbox.tpl" field=$vnotify13}} |