describe privacy roles

This commit is contained in:
nobody 2020-11-15 16:58:31 -08:00
parent 04817523cc
commit 603c643a1d
7 changed files with 32 additions and 6 deletions

View file

@ -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,

View file

@ -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'),
));
}

View file

@ -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%' });
}

View file

@ -1,3 +1,4 @@
<div id="settings-nick-wrapper" class="section-content-info-wrapper">
<div id="settings-nickname-desc">{{$desc}} <strong>{{$nickname}}</strong><br>
{{$compat}}

View file

@ -1,6 +1,6 @@
<div class='form-group field select'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<select class="form-control" name='{{$field.0}}' id='id_{{$field.0}}'>
<select class="form-control" name='{{$field.0}}' id='id_{{$field.0}}'{{if $field.5}} {{$field.5}}{{/if}}>
{{foreach $field.4 as $group=>$opts}}
<optgroup label='{{$group}}'>
{{foreach $opts as $opt=>$val}}

View file

@ -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}}",
};
</script>

View file

@ -44,10 +44,12 @@
<div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings" data-parent="#settings">
<div class="section-content-tools-wrapper">
{{if $can_change_role}}
{{include file="field_select_grouped.tpl" field=$role}}
{{include file="field_select_grouped.tpl" field=$role}}
<div class="descriptive-text" id="channel_role_text"></div>
{{else}}
<input type="hidden" name="permissions_role" value="{{$permissions_role}}">
<input type="hidden" name="permissions_role" value="{{$permissions_role}}" >
{{/if}}
<br>
{{$autoperms}}
{{$anymention}}
{{include file="field_select.tpl" field=$comment_perms}}