mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:35:19 +00:00
make reason conditional on 'requires approval'
This commit is contained in:
parent
2b56dc2358
commit
be1119a7a1
2 changed files with 4 additions and 2 deletions
|
@ -290,7 +290,7 @@ class Register extends Controller
|
|||
$invite_code = ['invite_code', t('Please enter your invitation code'), ((x($_REQUEST, 'invite_code')) ? strip_tags(trim($_REQUEST['invite_code'])) : "")];
|
||||
$name = ['name', t('Your Name'), ((x($_REQUEST, 'name')) ? $_REQUEST['name'] : ''), t('Real names are preferred.')];
|
||||
$nickhub = '@' . str_replace(['http://', 'https://', '/'], '', get_config('system', 'baseurl'));
|
||||
$reason = ['reason', t('Please tell us briefly why you are requesting this account'), '', ''];
|
||||
$reason = ($policy === REGISTER_APPROVE) ? ['reason', t('Please tell us briefly why you are requesting this account'), '', ''] : null;
|
||||
$nickname = ['nickname', t('Choose a short nickname'), ((x($_REQUEST, 'nickname')) ? $_REQUEST['nickname'] : ''), sprintf(t('Your nickname will be used to create an easy to remember channel address e.g. nickname%s'), $nickhub)];
|
||||
$role = ['permissions_role', t('Channel role and privacy'), ($privacy_role) ?: 'social', t('Select a channel permission role for your usage needs and privacy requirements.'), $perm_roles];
|
||||
$tos = ['tos', $label_tos, '', '', [t('no'), t('yes')], ' required '];
|
||||
|
|
|
@ -28,8 +28,10 @@
|
|||
|
||||
{{include file="field_password.tpl" field=$pass2}}
|
||||
|
||||
{{if $reason}}
|
||||
{{include file="field_textarea.tpl" field=$reason}}
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{if $auto_create}}
|
||||
{{if $default_role}}
|
||||
<input type="hidden" name="permissions_role" value="{{$default_role}}" />
|
||||
|
|
Loading…
Reference in a new issue