profile.blade.php 2.0 KB

123456789101112131415161718192021222324252627282930313233
  1. @extends('layouts.app', ['title' => 'Профиль'])
  2. @section('content')
  3. <div class="px-3 col-xxl-8 offset-xxl-1">
  4. <form action="{{ route('profile.store') }}" method="post">
  5. @csrf
  6. @include('partials.input', ['name' => 'email', 'title' => 'E-mail', 'disabled' => true, 'value' => $user->email])
  7. @include('partials.input', ['name' => 'name', 'title' => 'Имя', 'required' => true, 'value' => $user->name])
  8. @include('partials.input', ['name' => 'role', 'title' => 'Роль', 'disabled' => true, 'value' => getRoles($user->role)])
  9. @include('partials.input', ['name' => 'phone', 'title' => 'Телефон', 'value' => $user->phone ?? ''])
  10. <div class="row pwd-change-link mb-3">
  11. <div class="offset-md-4">
  12. <a onclick="$('.pwg-change').removeClass('d-none'); $('.pwd-change-link').addClass('d-none');" class="text-secondary" href="#">Сменить пароль</a>
  13. </div>
  14. </div>
  15. <div class="pwg-change @if(!$errors->any()) d-none @endif">
  16. @include('partials.input', ['name' => 'current_password', 'type' => 'password', 'title' => 'Текущий пароль'])
  17. @include('partials.input', ['name' => 'password', 'type' => 'password', 'title' => 'Новый пароль'])
  18. @include('partials.input', ['name' => 'password_confirmation', 'type' => 'password', 'title' => 'Подтверждение пароля'])
  19. </div>
  20. @include('partials.submit', ['delete' => ['title' => 'Удалить', 'question' => 'Удалить профиль?']])
  21. {{-- <a href="#" class="btn btn-outline-info my-3 d-inline-block d-md-none" onclick="$('#logout').submit();">Выход</a>--}}
  22. </form>
  23. <form action="{{ route('profile.delete') }}" method="post" id="destroy_form" class="d-none">
  24. @csrf
  25. @method('DELETE')
  26. </form>
  27. </div>
  28. @endsection