mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
more work on audience selector - ready for test
This commit is contained in:
parent
f5f0cd3ac6
commit
496131b82a
3 changed files with 27 additions and 2 deletions
|
@ -372,7 +372,7 @@ class AccessList
|
|||
]);
|
||||
}
|
||||
|
||||
public static function audienceSelect(): string
|
||||
public static function AudienceSelect(): string
|
||||
{
|
||||
|
||||
$grps = [];
|
||||
|
@ -394,7 +394,10 @@ class AccessList
|
|||
}
|
||||
}
|
||||
|
||||
return replace_macros(Theme::get_template('group_selection.tpl'), [
|
||||
return replace_macros(Theme::get_template('audience_selection.tpl'), [
|
||||
'$title' => t('Audience Selection'),
|
||||
'$desc' => t('Use this form to select your default posting audience and default permissions for media and file uploads.'),
|
||||
'$desc2' => t('Note: If you change your channel type, this form will be reset to the default audience for that type'),
|
||||
'$label' => t('Default audience for posts and media access'),
|
||||
'$groups' => $grps
|
||||
]);
|
||||
|
|
|
@ -27,6 +27,7 @@ class Audience extends Controller
|
|||
if (!local_channel()) {
|
||||
return login();
|
||||
}
|
||||
return AccessList::AudienceSelect();
|
||||
|
||||
}
|
||||
|
||||
|
|
21
view/tpl/audience_selection.tpl
Normal file
21
view/tpl/audience_selection.tpl
Normal file
|
@ -0,0 +1,21 @@
|
|||
<div class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper clearfix">
|
||||
{{$title}}
|
||||
</div>
|
||||
<div class="descriptive-text">{{$desc}}</div>
|
||||
<div class="descriptive-text">{{$desc2}}</div>
|
||||
|
||||
<form action="audience" method="post">
|
||||
<div class="form-group field custom">
|
||||
<label for="group-selection" id="group-selection-lbl">{{$label}}</label>
|
||||
<select class="form-control" name="group-selection" id="group-selection" >
|
||||
{{foreach $groups as $group}}
|
||||
<option value="{{$group.id}}" {{if $group.selected}}selected="selected"{{/if}} >{{$group.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="settings-submit-wrapper" >
|
||||
<button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
Loading…
Reference in a new issue