New-OMIS/resources/views/crud/generated/users/edit.blade.php

83 lines
2.9 KiB
PHP
Raw Normal View History

2024-04-07 07:28:58 +00:00
@extends('layouts.app')
2024-04-05 05:22:15 +00:00
@section('content')
2024-04-07 07:28:58 +00:00
<div class='card'>
<div class='card-header d-flex justify-content-between align-items-center'>
<h2 class="">{{ label('Add Users') }}</h2>
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('users.index')); ?>
2024-04-05 05:22:15 +00:00
2024-04-07 07:28:58 +00:00
</div>
<div class='card-body'>
<form action="{{ $editable ? route('users.update', [$data->id]) : route('users.store') }}" id="updateCustomForm"
method="POST">
@csrf <input type=hidden name='id' value='{{ $editable ? $data->id : '' }}' />
<div class="row">
<div class="col-lg-6">{{ createText('name', 'name', 'Name', '', $editable ? $data->name : '') }}
</div>
<div class="col-lg-6">
{{ createText('email', 'email', 'Email', '', $editable ? $data->email : '') }}
</div>
<div class="col-lg-6">
{{ createText('username', 'username', 'Username', '', $editable ? $data->username : '') }}
</div>
<div class="col-lg-6 pb-2">
{{ createPassword('password', 'Password', '', $editable ? $data->password : '') }}
</div>
<div class="col-lg-6">
{{ createText(
'remember_token',
'remember_token',
"Remember
Token",
'',
$editable ? $data->remember_token : '',
) }}
</div>
<div class="col-lg-6">
{{ createCustomSelect(
'tbl_roles',
'title',
'role_id',
$editable ? $data->roles_id : '',
'Roles Id',
'roles_id',
'form-control
select2',
'status<>-1',
) }}
</div>
<div class="col-lg-6">
{{ createCustomSelect(
'tbl_branches',
'title',
'branch_id',
$editable ? $data->branches_id : '',
'Branches Id',
'branches_id',
'form-control
select2',
'status<>-1',
) }}
</div>
<div class="col-lg-12">
{{ createCustomSelect(
'tbl_employees',
'title',
'employee_id',
$editable ? $data->employees_id : '',
'employees Id',
'employees_id',
'form-control
select2',
'status<>-1',
) }}
</div>
<div class="col-md-12">
<?php createButton('btn-primary btn-update', '', 'Submit'); ?>
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('users.index')); ?>
</div>
</form>
</div>
</div>
@endsection