@extends('layouts.dashboard') @section('breadcrumb') @endsection @section('content')
{{ __('Tambah Petugas') }}
@csrf @method('put')
@error('level') {{ $message }} @enderror
@error('nama') {{ $message }} @enderror
@error('email') {{ $message }} @enderror
@error('password_baru') {{ $message }} @enderror
@error('password_baru') {{ $message }} @enderror
Kembali
@endsection @section('sweet') function buttonEdit() { var new_pass = $('#new_pass').val(); var confirm_new_pass = $('#confirm_new_pass').val(); if(new_pass == '' ){ var text = "Masukan Password anda?"; }else{ var text = "Masukan Password lama anda?"; } if(new_pass == confirm_new_pass){ swal.fire({ icon: 'question', title: text, input: 'password', inputAttributes: { autocapitalize: 'off', }, confirmButtonText: 'Lanjut', showLoaderOnConfirm: true, showCancelButton: true, cancelButtonText: 'Batal', cancelButtonColor: '#d33' }) .then((result) => { if(result.value){ $('#old_pass').val(result.value); $('#edit_data').submit(); }else{ const Toast = Swal.mixin({ toast: true, position: 'top-end', showConfirmButton: false, timer: 3000, timerProgressBar: true, onOpen: (toast) => { toast.addEventListener('mouseenter', Swal.stopTimer) toast.addEventListener('mouseleave', Swal.resumeTimer) } }); Toast.fire({ icon: 'error', title: 'Terjadi Kesalahan!' }); } }); }else{ Toast.fire({ icon: 'error', title: 'Konfirmasi Password tidak Cocok!' }) } } @endsection