edit.blade.php 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!--
  2. Copyright (C) 2022 Echedey López Romero <elr@disroot.org>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. -->
  14. @extends('layouts.app')
  15. @section('content')
  16. <div class="container">
  17. <div class="row justify-content-center">
  18. <div class="col-md-8">
  19. <div class="card">
  20. <div class="card-header">Profile edition</div>
  21. <div class="card-body">
  22. <form class="container px-0" action="{{ route('profiles.update', $user->id) }}" method="POST" enctype="multipart/form-data">
  23. @csrf
  24. @method('PUT')
  25. <div class="row mb-3">
  26. <label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
  27. <div class="col-md-6">
  28. <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') ? old('email') : $user->email }}" autocomplete="email" />
  29. @error('email')
  30. <span class="invalid-feedback" role="alert">
  31. <strong>{{ $message }}</strong>
  32. </span>
  33. @enderror
  34. </div>
  35. </div>
  36. <div class="row mb-3">
  37. <label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
  38. <div class="col-md-6">
  39. <input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" value="{{ old('password') }}" autocomplete="new-password" />
  40. @error('password')
  41. <span class="invalid-feedback" role="alert">
  42. <strong>{{ $message }}</strong>
  43. </span>
  44. @enderror
  45. </div>
  46. </div>
  47. <div class="row mb-3">
  48. <label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
  49. <div class="col-md-6">
  50. <input id="password-confirm" type="password" class="form-control" name="password_confirmation" autocomplete="new-password" />
  51. </div>
  52. </div>
  53. <div class="row mb-3">
  54. <label for="image" class="col-md-4 col-form-label text-md-end">{{ __('Image') }}</label>
  55. <div class="col-md-6">
  56. <input id="image" type="file" class="form-control @error('image') is-invalid @enderror" name="image" />
  57. @error('image')
  58. <span class="invalid-feedback" role="alert">
  59. <strong>{{ $message }}</strong>
  60. </span>
  61. @enderror
  62. </div>
  63. </div>
  64. <div class="row mb-3">
  65. <span class="col-md-4 text-md-end">{{ __('Previous image') }}</span>
  66. <img src="{{ $user->image }}" class="col-md-4" alt="{{ $user->name }}"/>
  67. </div>
  68. <div class="row">
  69. <div class="col-md-8 offset-md-4">
  70. <button type="submit" class="btn btn-primary">Modify</button>
  71. </div>
  72. </div>
  73. </form>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. @endsection