98 lines
4.5 KiB
PHP
98 lines
4.5 KiB
PHP
<?php echo e(html()->form('POST', route('user.store'))->class('needs-validation')->attributes(['novalidate'])->open()); ?>
|
|
|
|
|
|
<?php if(isset($user)): ?>
|
|
<?php echo e(html()->hidden('id', $user->id)); ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="mb-3">
|
|
<?php echo e(html()->label('Name')->for('name')); ?>
|
|
|
|
<?php echo e(html()->span('*')->class('text-danger')); ?>
|
|
|
|
<?php echo e(html()->text('name')->value($user->name ?? old('name'))->class('form-control')->placeholder('Enter Name')->required()); ?>
|
|
|
|
<?php echo e(html()->div('Please enter a name.')->class('invalid-feedback')); ?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
<div class="mb-3">
|
|
<?php echo e(html()->label('Email')->for('email')); ?>
|
|
|
|
<?php echo e(html()->span('*')->class('text-danger')); ?>
|
|
|
|
<?php echo e(html()->email('email')->value($user->email ?? old('email'))->class('form-control')->placeholder('Enter Email')->required()); ?>
|
|
|
|
<?php echo e(html()->div('Please enter a email.')->class('invalid-feedback')); ?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
<div class="mb-3">
|
|
<?php echo e(html()->label('Password')->for('password')); ?>
|
|
|
|
<?php echo e(html()->span('*')->class('text-danger')); ?>
|
|
|
|
<?php echo e(html()->password('password')->class('form-control')->placeholder('Enter Password')->required(!isset($user))); ?>
|
|
|
|
<?php echo e(html()->div('Please enter a password.')->class('invalid-feedback')); ?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
<div class="mb-3">
|
|
<?php echo e(html()->label('Confirm Password')->for('password_confirmation')); ?>
|
|
|
|
<?php echo e(html()->span('*')->class('text-danger')); ?>
|
|
|
|
<?php echo e(html()->password('password_confirmation')->class('form-control')->placeholder('Enter Password')->required(!isset($user))); ?>
|
|
|
|
<?php echo e(html()->div('Please enter a password.')->class('invalid-feedback')); ?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
<div>
|
|
<div class="form-check mb-2">
|
|
<?php echo e(html()->checkbox('is_admin')->value(1)->class('form-check-input')->checked(isset($user) && $user->is_admin ? true : false)); ?>
|
|
|
|
<?php echo e(html()->label('Is Admin?')->for('is_admin')->class('form-check-label')); ?>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (isset($component)) { $__componentOriginal4472fe0a558b38a919fed94c8472a9fd = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal4472fe0a558b38a919fed94c8472a9fd = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.form-buttons','data' => ['href' => route('user.index'),'label' => isset($user) ? 'Update' : 'Create']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
|
<?php $component->withName('form-buttons'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('user.index')),'label' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(isset($user) ? 'Update' : 'Create')]); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal4472fe0a558b38a919fed94c8472a9fd)): ?>
|
|
<?php $attributes = $__attributesOriginal4472fe0a558b38a919fed94c8472a9fd; ?>
|
|
<?php unset($__attributesOriginal4472fe0a558b38a919fed94c8472a9fd); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal4472fe0a558b38a919fed94c8472a9fd)): ?>
|
|
<?php $component = $__componentOriginal4472fe0a558b38a919fed94c8472a9fd; ?>
|
|
<?php unset($__componentOriginal4472fe0a558b38a919fed94c8472a9fd); ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php echo e(html()->form()->close()); ?>
|
|
|
|
<?php /**PATH /home/rohiniedu/public_html/Modules/User/resources/views/user/add-user-form.blade.php ENDPATH**/ ?>
|