From 603c643a1d3e796cd85cfe184c8731ba03f14f0b Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 15 Nov 2020 16:58:31 -0800 Subject: [PATCH] describe privacy roles --- Zotlabs/Module/Settings/Channel.php | 2 +- include/js_strings.php | 9 ++++++++- view/js/main.js | 7 +++++++ view/tpl/channel_settings_header.tpl | 1 + view/tpl/field_select_grouped.tpl | 2 +- view/tpl/js_strings.tpl | 11 ++++++++++- view/tpl/settings.tpl | 6 ++++-- 7 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php index 0aa639490..26b14c529 100644 --- a/Zotlabs/Module/Settings/Channel.php +++ b/Zotlabs/Module/Settings/Channel.php @@ -623,7 +623,7 @@ class Channel { '$group_select' => $group_select, '$can_change_role' => ((in_array($permissions_role, [ 'collection', 'collection_restricted'] )) ? false : true), '$permissions_role' => $permissions_role, - '$role' => array('permissions_role' , t('Channel role and privacy'), $permissions_role, '', $perm_roles), + '$role' => array('permissions_role' , t('Channel role and privacy'), $permissions_role, '', $perm_roles, ' onchange="update_role_text(); return false;"'), '$defpermcat' => [ 'defpermcat', t('Default Permissions Group'), $default_permcat, '', $permcats ], '$permcat_enable' => feature_enabled(local_channel(),'permcats'), '$profile_in_dir' => $profile_in_dir, diff --git a/include/js_strings.php b/include/js_strings.php index dd1641a3e..2517037ce 100644 --- a/include/js_strings.php +++ b/include/js_strings.php @@ -103,6 +103,13 @@ function js_strings() { '$month' => t('month','calendar'), '$week' => t('week','calendar'), '$day' => t('day','calendar'), - '$allday' => t('All day','calendar') + '$allday' => t('All day','calendar'), + '$channel_social' => t('A social networking profile that is public by default and private if desired'), + '$channel_social_restricted' => t('A social networking profile where content is private to your [Friends] Access List by default but can be made public if desired'), + '$channel_forum' => t('A public group where members are allowed to upload media by default'), + '$channel_forum_restricted' => t('A private group with no upload permission'), + '$channel_forum_moderated' => t('A public group where posts are moderated by the owner. The [moderated] permission may be removed from any group member once trust is established'), + '$channel_collection' =>t('A sub-channel of your main channel - often devoted to a specific language or topic. Replies are sent back to your main channel'), + '$channel_collection_restricted' =>t('A private sub-channel of your main channel - often devoted to a specific language or topic. Replies are sent back to your main channel'), )); } diff --git a/view/js/main.js b/view/js/main.js index 78bee5ce8..152a89866 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -435,6 +435,13 @@ function doFollowAuthor(url) { } +function update_role_text() { + var new_role = $("#id_permissions_role").val(); + if (typeof(new_role) !== 'undefined') { + $("#channel_role_text").html(aStr[new_role]); + } +} + function viewsrc(id) { $.colorbox({href: 'viewsrc/' + id, maxWidth: '80%', maxHeight: '80%' }); } diff --git a/view/tpl/channel_settings_header.tpl b/view/tpl/channel_settings_header.tpl index 54f839e1a..1e99db66e 100755 --- a/view/tpl/channel_settings_header.tpl +++ b/view/tpl/channel_settings_header.tpl @@ -1,3 +1,4 @@ +
{{$desc}} {{$nickname}}
{{$compat}} diff --git a/view/tpl/field_select_grouped.tpl b/view/tpl/field_select_grouped.tpl index e6d1479de..b74c778df 100644 --- a/view/tpl/field_select_grouped.tpl +++ b/view/tpl/field_select_grouped.tpl @@ -1,6 +1,6 @@
- {{foreach $field.4 as $group=>$opts}} {{foreach $opts as $opt=>$val}} diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl index c8dc417c2..d0853f2fb 100755 --- a/view/tpl/js_strings.tpl +++ b/view/tpl/js_strings.tpl @@ -63,7 +63,16 @@ 'month' : "{{$month}}", 'week' : "{{$week}}", 'day' : "{{$day}}", - 'allday' : "{{$allday}}" + 'allday' : "{{$allday}}", + + 'social' : "{{$channel_social}}", + 'social_restricted' : "{{$channel_social_restricted}}", + 'forum' : "{{$channel_forum}}", + 'forum_restricted' : "{{$channel_forum_restricted}}", + 'forum_moderated' : "{{$channel_forum_moderated}}", + 'collection' : "{{$channel_collection}}", + 'collection_restricted' : "{{$channel_collection_restricted}}", + }; diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 918f16a79..0eb1902ee 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -44,10 +44,12 @@
{{if $can_change_role}} - {{include file="field_select_grouped.tpl" field=$role}} + {{include file="field_select_grouped.tpl" field=$role}} +
{{else}} - + {{/if}} +
{{$autoperms}} {{$anymention}} {{include file="field_select.tpl" field=$comment_perms}}