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:
@ -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>
|
||||
|
Reference in New Issue
Block a user