TIF_E41212062/resources/views/profile/index.blade.php

125 lines
5.8 KiB
PHP

@extends('admin.layouts.main', ['title' => 'Profil'])
@section('content')
<div class="page-header d-print-none">
<div class="container-xl">
<div class="row g-2 align-items-center">
<div class="col">
<h2 class="page-name">
Profil
</h2>
</div>
</div>
</div>
</div>
<div class="page-body">
<div class="container-xl">
<div class="row d-flex justify-content-center">
<div class="col-8">
<div class="card">
<div class="card-body">
<div class="form-group mb-3">
<label>Nama</label>
<input type="text" name="name" value="{{ Auth::user()->name }}" class="form-control"
disabled>
</div>
<div class="form-group mb-3">
<label>Email</label>
<input type="text" name="email" value="{{ Auth::user()->email }}" class="form-control"
disabled>
</div>
<br><br>
<h3>Ubah Password</h3>
<form action="{{ route('profile.update_password') }}" method="POST"
enctype="multipart/form-data">
@csrf
<div class="form-group mb-3">
<label>Password Lama</label>
<input type="password" name="old_password"
class="form-control @error('old_password') is-invalid @enderror"
placeholder="Masukan Password Lama">
@error('old_password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group mb-3">
<label>Password Baru</label>
<input type="password" name="password"
class="form-control @error('password') is-invalid @enderror"
placeholder="Masukan Password Baru">
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group mb-3">
<label>Konfirmasi Password</label>
<input type="password" name="password_confirmation"
class="form-control @error('password_confirmation') is-invalid @enderror"
placeholder="Masukan Konfirmasi Password">
@error('password_confirmation')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="form-group d-flex justify-content-end">
<button type="submit" class="btn btn-primary"> <svg xmlns="http://www.w3.org/2000/svg"
class="icon icon-tabler icon-tabler-square-rounded-plus" width="24"
height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"
fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M9 12h6"></path>
<path d="M12 9v6"></path>
<path d="M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"></path>
</svg>Simpan</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('js')
<script src="https://cdn.ckeditor.com/4.15.0/standard/ckeditor.js"></script>
<script>
$(document).ready(function() {
createCkeditor('about', '{{ asset('vendor/autogrow/plugin.js') }}');
createCkeditor('vision_mission', '{{ asset('vendor/autogrow/plugin.js') }}');
});
@if (session('success'))
Swal.fire({
position: 'top-end',
icon: 'success',
title: '{!! session('success') !!}',
showConfirmButton: false,
timer: 1500,
toast: true
})
@endif
@if (session('error'))
Swal.fire({
position: 'top-end',
icon: 'error',
title: '{!! session('error') !!}',
showConfirmButton: false,
timer: 1500,
toast: true
})
@endif
</script>
@endpush