@extends('layouts.app')

@section('content')

<div class="row justify-content-center">

    <div class="col-md-6">

        <div class="card shadow">

            <div class="card-header">
                <h4>
                    <i class="fas fa-key"></i>
                    Ubah Password
                </h4>
            </div>

            <div class="card-body">

                @if(session('error'))
                    <div class="alert alert-danger">
                        {{ session('error') }}
                    </div>
                @endif

                <form method="POST" action="/profile/password">

                    @csrf

                    <div class="form-group">
                        <label>Password Lama</label>
                        <input type="password"
                               name="password_lama"
                               class="form-control"
                               required>
                    </div>

                    <div class="form-group">
                        <label>Password Baru</label>
                        <input type="password"
                               name="password"
                               class="form-control"
                               required>
                    </div>

                    <div class="form-group">
                        <label>Konfirmasi Password Baru</label>
                        <input type="password"
                               name="password_confirmation"
                               class="form-control"
                               required>
                    </div>

                    <button class="btn btn-primary">
                        <i class="fas fa-save"></i>
                        Simpan Password
                    </button>

                    <a href="/profile"
                       class="btn btn-secondary">
                        Kembali
                    </a>

                </form>

            </div>

        </div>

    </div>

</div>

@endsection