98 lines
8.6 KiB
PHP
98 lines
8.6 KiB
PHP
@extends('layouts.app')
|
|
@section('content')
|
|
<section class="bg-white dark:bg-gray-900 pt-20">
|
|
<div class="py-8 px-4 mx-auto max-w-screen-xl text-center lg:py-16">
|
|
<h1 class="mb-4 text-4xl font-extrabold tracking-tight leading-none text-gray-900 md:text-5xl lg:text-6xl dark:text-white">Lengkapi Profile</h1>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="px-80 pb-20">
|
|
@if (Session::has('errorr'))
|
|
<div id="alert-border-2" class="flex items-center p-4 mb-4 text-red-800 border-t-4 border-red-300 bg-red-50 dark:text-red-400 dark:bg-gray-800 dark:border-red-800" role="alert">
|
|
<svg class="flex-shrink-0 w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
|
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
|
|
</svg>
|
|
<div class="ms-3 text-sm font-medium">
|
|
{{ Session::get('errorr') }}!
|
|
</div>
|
|
<button type="button" class="ms-auto -mx-1.5 -my-1.5 bg-red-50 text-red-500 rounded-lg focus:ring-2 focus:ring-red-400 p-1.5 hover:bg-red-200 inline-flex items-center justify-center h-8 w-8 dark:bg-gray-800 dark:text-red-400 dark:hover:bg-gray-700" data-dismiss-target="#alert-border-2" aria-label="Close">
|
|
<span class="sr-only">Dismiss</span>
|
|
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
@endif
|
|
@if (Session::has('message'))
|
|
<div id="alert-border-2" class="flex items-center p-4 mb-4 text-green-800 border-t-4 border-green-300 bg-green-50 dark:text-green-400 dark:bg-gray-800 dark:border-green-800" role="alert">
|
|
<svg class="flex-shrink-0 w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
|
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
|
|
</svg>
|
|
<div class="ms-3 text-sm font-medium">
|
|
{{ Session::get('message') }}.
|
|
</div>
|
|
<button type="button" class="ms-auto -mx-1.5 -my-1.5 bg-green-50 text-green-500 rounded-lg focus:ring-2 focus:ring-green-400 p-1.5 hover:bg-green-200 inline-flex items-center justify-center h-8 w-8 dark:bg-gray-800 dark:text-green-400 dark:hover:bg-gray-700" data-dismiss-target="#alert-border-2" aria-label="Close">
|
|
<span class="sr-only">Dismiss</span>
|
|
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
@endif
|
|
<form action="{{ route('masyarakat.store') }}" method="post" class="w-full flex flex-wrap justify-between shadow-lg p-8" autocomplete="off">
|
|
@csrf
|
|
<div class="mb-6 w-full px-4">
|
|
<label for="email" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Email</label>
|
|
<input type="email" id="email" class="shadow-sm bg-gray-200 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" value="{{ Auth::user()->email }}" readonly>
|
|
</div>
|
|
<div class="mb-6 w-1/2 px-4">
|
|
<label for="email" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Nama Pengguna</label>
|
|
<input type="email" id="email" class="shadow-sm bg-gray-200 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" value="{{ Auth::user()->name }}" readonly>
|
|
<input type="hidden" name="user_id" value="{{ Auth::user()->id }}">
|
|
</div>
|
|
<div class="mb-6 w-1/2 px-4">
|
|
<label for="jenis_kelamin" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Jenis Kelamin</label>
|
|
<select id="jenis_kelamin" name="jenis_kelamin" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
|
<option value="">- pilih -</option>
|
|
<option value="Laki-laki" {{ old('jenis_kelamin', $masyarakat->jenis_kelamin) == 'Laki-laki' ? 'selected' : '' }}>Laki-laki</option>
|
|
<option value="Perempuan" {{ old('jenis_kelamin', $masyarakat->jenis_kelamin) == 'Perempuan' ? 'selected' : '' }}>Perempuan</option>
|
|
</select>
|
|
@if ($errors->has('jenis_kelamin'))
|
|
<strong class="text-red-600 lowercase"> * {{ $errors->first('jenis_kelamin') }}</strong>
|
|
@endif
|
|
</div>
|
|
<div class="mb-6 w-full px-4">
|
|
<label for="alamat" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Alamat tempat tinggal</label>
|
|
<textarea id="alamat" name="alamat" rows="4" class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Mohon tulis alamat Anda dengan lengkap...">{{ old('alamat', $masyarakat->alamat) }}</textarea>
|
|
@if ($errors->has('alamat'))
|
|
<strong class="text-red-600 lowercase"> * {{ $errors->first('alamat') }}</strong>
|
|
@endif
|
|
</div>
|
|
<div class="mb-6 w-1/2 px-4">
|
|
<label for="tempat_lahir" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Tempat Lahir</label>
|
|
<input type="text" name="tempat_lahir" id="tempat_lahir" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="ex: Kalimantan Barat" value="{{ old('tempat_lahir', $masyarakat->tempat_lahir) }}">
|
|
@if ($errors->has('tempat_lahir'))
|
|
<strong class="text-red-600 lowercase"> * {{ $errors->first('tempat_lahir') }}</strong>
|
|
@endif
|
|
</div>
|
|
<div class="mb-6 w-1/2 px-4">
|
|
<label for="tanggal_lahir" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Tanggal Lahir</label>
|
|
<input type="date" name="tanggal_lahir" id="tanggal_lahir" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="name@flowbite.com" value="{{ old('tanggal_lahir', $masyarakat->tanggal_lahir) }}">
|
|
@if ($errors->has('tanggal_lahir'))
|
|
<strong class="text-red-600 lowercase"> * {{ $errors->first('tanggal_lahir') }}</strong>
|
|
@endif
|
|
</div>
|
|
<div class="mb-6 w-full px-4">
|
|
<label for="nohp" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">*Nomor Handphone / WhatsApp</label>
|
|
<input type="text" name="nohp" id="nohp" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 dark:shadow-sm-light" placeholder="ex: 089998765654" value="{{ old('nohp', $masyarakat->nohp) }}">
|
|
@if ($errors->has('nohp'))
|
|
<strong class="text-red-600 lowercase"> * {{ $errors->first('nohp') }}</strong>
|
|
@endif
|
|
</div>
|
|
<div class="w-full p-4">
|
|
<button type="submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-md px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 w-full">Simpan Pembaruan Profil</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
@endsection
|