diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index 680af7bd3d..ac82949586 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -162,6 +162,7 @@ + @if ($user->ldap_import!='1' || str_contains(Route::currentRouteName(), 'clone'))
@@ -271,14 +272,7 @@
@endif - - - @if (\App\Models\Company::canManageUsersCompanies()) - @include ('partials.forms.edit.company-select', ['translated_name' => trans('general.select_company'), 'fieldname' => 'company_id']) - @endif - - - + @if ($user->avatar)
@@ -292,236 +286,255 @@ @include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar']) - - -
- -
- {!! Form::locales('locale', old('locale', $user->locale), 'select2') !!} - {!! $errors->first('locale', '') !!} -
-
- - -
- -
- - {!! $errors->first('employee_num', '') !!} -
-
- - - -
- -
- - {!! $errors->first('jobtitle', '') !!} -
-
- - - - @include ('partials.forms.edit.user-select', ['translated_name' => trans('admin/users/table.manager'), 'fieldname' => 'manager_id']) - - - @include ('partials.forms.edit.department-select', ['translated_name' => trans('general.department'), 'fieldname' => 'department_id']) - - - -
-
- -

{{ trans('admin/users/general.remote_help') }} -

-
-
- - - @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id']) - - -
- -
- - {!! $errors->first('phone', '') !!} -
-
- - -
- -
- - {!! $errors->first('website', '') !!} -
-
- - -
- -
- - {!! $errors->first('address', '') !!} -
-
- - -
- -
- - {!! $errors->first('city', '') !!} -
-
- - -
- -
- - {!! $errors->first('state', '') !!} -
-
- - -
- -
- {!! Form::countries('country', old('country', $user->country), 'col-md-6 select2') !!} - {!! $errors->first('country', '') !!} -
-
- - -
- -
- - {!! $errors->first('zip', '') !!} -
-
- - - - - - @if ($snipeSettings->two_factor_enabled!='') - @if ($snipeSettings->two_factor_enabled=='1') +
-
- {{ Form::label('two_factor_optin', trans('admin/settings/general.two_factor')) }} -
-
- @if (config('app.lock_passwords')) -
- {{ Form::checkbox('two_factor_optin', '1', Request::old('two_factor_optin', $user->two_factor_optin),['class' => 'minimal', 'disabled'=>'disabled']) }} {{ trans('admin/settings/general.two_factor_enabled_text') }} -

{{ trans('general.feature_disabled') }}

-
- @else - {{ Form::checkbox('two_factor_optin', '1', Request::old('two_factor_optin', $user->two_factor_optin),['class' => 'minimal']) }} {{ trans('admin/settings/general.two_factor_enabled_text') }} -

{{ trans('admin/users/general.two_factor_admin_optin_help') }}

+ - @endif +
-
-
- @endif + + + {{ trans('admin/hardware/form.optional_infos') }} + - -
- -
-

{{ trans('admin/settings/general.two_factor_reset_help') }}

-
-
- @endif +
- -
- -
- - {!! $errors->first('notes', '') !!} -
-
+
@@ -619,6 +632,24 @@ $(document).ready(function() { } }); + $("#optional_user_info").on("click",function(){ + $('#optional_user_details').fadeToggle(100); + $('#optional_user_info_icon').toggleClass('fa-caret-right fa-caret-down'); + var optional_user_info_open = $('#optional_user_info_icon').hasClass('fa-caret-down'); + document.cookie = "optional_user_info_open="+optional_user_info_open+'; path=/'; + }); + + var all_cookies = document.cookie.split(';') + for(var i in all_cookies) { + var trimmed_cookie = all_cookies[i].trim(' ') + if (trimmed_cookie.startsWith('optional_user_info_open=')) { + elems = all_cookies[i].split('=', 2) + if (elems[1] == 'true') { + $('#optional_user_info').trigger('click') + } + } + } + $("#two_factor_reset").click(function(){ $("#two_factor_resetrow").removeClass('success'); $("#two_factor_resetrow").removeClass('danger');