1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Fixed default registration role display options

- This also allows an admin to choose not to have a default role.
- Also applied latest styleCI fixes.

For #3220
This commit is contained in:
Dan Brown
2022-01-31 14:16:56 +00:00
parent 90c543064b
commit 17215431ca
6 changed files with 25 additions and 8 deletions

View File

@ -227,10 +227,11 @@
<label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
<select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
<option value="0" @if(intval(setting('registration-role', '0')) === 0) selected @endif>-- {{ trans('common.none') }} --</option>
@foreach(\BookStack\Auth\Role::all() as $role)
<option value="{{$role->id}}"
data-system-role-name="{{ $role->system_name ?? '' }}"
@if(setting('registration-role', \BookStack\Auth\Role::first()->id) == $role->id) selected @endif
@if(intval(setting('registration-role', '0')) === $role->id) selected @endif
>
{{ $role->display_name }}
</option>