@extends('layouts.app') @section('link') @endsection @section('content')
@include('shared.messages')

{{__('texte.users_arr.edit.change_user')}}

{{ method_field('PATCH') }} {{ csrf_field() }} @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-name-read'))
user()->id==$user->id && !auth()->user()->can('user-form-name-write')) readonly @endif /> @if ($errors->has('name')) {{ $errors->first('name') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-name-read'))
@if ($errors->has('username')) {{ $errors->first('username') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-email-read'))
user()->id==$user->id && !auth()->user()->can('user-form-email-write')) readonly @endif /> @if ($errors->has('email')) {{ $errors->first('email') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-mobile-read'))
user()->id==$user->id && !auth()->user()->can('user-form-mobile-write')) readonly @endif /> @if ($errors->has('mobile')) {{ $errors->first('mobile') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-phone-read'))
user()->id==$user->id && !auth()->user()->can('user-form-phone-write')) readonly @endif /> @if ($errors->has('phone')) {{ $errors->first('phone') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-fax-read'))
user()->id==$user->id && !auth()->user()->can('user-form-fax-write')) readonly @endif /> @if ($errors->has('fax')) {{ $errors->first('fax') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-note-read'))
@if ($errors->has('note')) {{ $errors->first('note') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-password-read'))
user()->id==$user->id && !auth()->user()->can('user-form-password-write')) readonly @endif /> @if ($errors->has('password')) {{ $errors->first('password') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-password-read'))
user()->id==$user->id && !auth()->user()->can('user-form-password-write')) readonly @endif /> @if ($errors->has('password_confirmation')) {{ $errors->first('password_confirmation') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-pic-read'))
user()->id!=$user->id && auth()->user()->cannot('user-form-pic-write')) readonly @endif /> @if ($errors->has('pic')) {{ $errors->first('pic') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-pic-read'))
user()->id!=$user->id && auth()->user()->cannot('user-form-pic-write')) readonly @endif /> @if ($errors->has('pic_confirmation')) {{ $errors->first('pic_confirmation') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-roles-read'))
@if ($errors->has('roles')) {{ $errors->first('roles') }} @endif
@endif @if(auth()->user()->id==$user->id || auth()->user()->can('user-form-active-read'))
@if ($errors->has('active')) {{ $errors->first('active') }} @endif
@endif
@endsection