2023-09-21 12:45:08 +00:00
|
|
|
<div class="modal-dialog modal-lg">
|
2023-09-21 14:20:06 +00:00
|
|
|
<form id="add_user_form"
|
|
|
|
action="{{action([\App\Http\Controllers\Superadmin\ManageUsersController::class, 'store'])}}" method="POST">
|
2023-09-21 12:45:08 +00:00
|
|
|
{{ csrf_field() }}
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h5 class="modal-title">
|
|
|
|
@lang('messages.add_user')
|
|
|
|
</h5>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="name">
|
|
|
|
@lang('messages.name')
|
|
|
|
<span class="error">*</span>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<input type="text" class="form-control"
|
2023-09-21 14:20:06 +00:00
|
|
|
name="name" id="name" required>
|
2023-09-21 14:01:58 +00:00
|
|
|
</div>
|
2023-09-21 12:45:08 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="email">
|
|
|
|
@lang('messages.email')
|
|
|
|
<span class="error">*</span>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<input type="email" class="form-control"
|
2023-09-21 14:20:06 +00:00
|
|
|
name="email" id="email" required>
|
2023-09-21 14:01:58 +00:00
|
|
|
</div>
|
2023-09-21 12:45:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="password">
|
|
|
|
@lang('messages.password')
|
|
|
|
<span class="error">*</span>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<input type="password" class="form-control"
|
2023-09-21 14:20:06 +00:00
|
|
|
name="password" id="password" required>
|
2023-09-21 14:01:58 +00:00
|
|
|
</div>
|
2023-09-21 12:45:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2023-09-21 14:20:06 +00:00
|
|
|
<div class="col-md-2">
|
2023-09-21 12:45:08 +00:00
|
|
|
<div class="form-group form-check">
|
2023-09-21 14:20:06 +00:00
|
|
|
<input type="checkbox" class="form-check-input" id="is_active" name="is_active" value="1"
|
|
|
|
checked>
|
2023-09-21 12:45:08 +00:00
|
|
|
<label class="form-check-label" for="is_active">
|
|
|
|
@lang('messages.is_active')
|
2023-09-21 14:20:06 +00:00
|
|
|
<i class="fas fa-info-circle text-info" data-toggle="tooltip"
|
|
|
|
title="@lang('messages.is_active_tooltip')"></i>
|
2023-09-21 12:45:08 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-21 14:20:06 +00:00
|
|
|
|
|
|
|
@if(auth()->user()->hasRole([\App\Enums\User\RoleEnum::SUPERVISOR->value, \App\Enums\User\RoleEnum::ADMIN->value]))
|
|
|
|
<div class="col-md-2">
|
|
|
|
<div class="form-group form-check">
|
|
|
|
<input type="checkbox" class="form-check-input" id="is_admin" name="is_admin">
|
|
|
|
<label class="form-check-label" for="is_admin">
|
|
|
|
@lang('messages.is_admin')
|
|
|
|
<i class="fas fa-info-circle text-info" data-toggle="tooltip"
|
|
|
|
title="@lang('messages.is_admin_tooltip')"></i>
|
|
|
|
</label>
|
|
|
|
</div>
|
2023-09-21 12:45:08 +00:00
|
|
|
</div>
|
2023-09-21 14:20:06 +00:00
|
|
|
@endif
|
2023-09-21 14:01:58 +00:00
|
|
|
|
2023-09-21 14:20:06 +00:00
|
|
|
@if(auth()->user()->hasRole(\App\Enums\User\RoleEnum::SUPERVISOR->value))
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="form-group form-check">
|
|
|
|
<input type="checkbox" class="form-check-input" name="send_email" id="send_email"
|
|
|
|
value="1">
|
|
|
|
<label class="form-check-label" for="send_email">
|
|
|
|
@lang('messages.send_email')
|
|
|
|
<i class="fas fa-info-circle text-info" data-toggle="tooltip"
|
|
|
|
title="@lang('messages.send_email_tooltip')"></i>
|
|
|
|
</label>
|
|
|
|
</div>
|
2023-09-21 14:01:58 +00:00
|
|
|
</div>
|
2023-09-21 14:20:06 +00:00
|
|
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="form-group form-check">
|
|
|
|
<input type="checkbox" class="form-check-input" name="can_create_form"
|
|
|
|
id="can_create_form" value="1">
|
|
|
|
<label class="form-check-label" for="can_create_form">
|
|
|
|
@lang('messages.can_create_form')
|
|
|
|
<i class="fas fa-info-circle text-info" data-toggle="tooltip"
|
|
|
|
title="@lang('messages.can_create_form_tooltip')"></i>
|
|
|
|
</label>
|
|
|
|
</div>
|
2023-09-21 14:01:58 +00:00
|
|
|
</div>
|
2023-09-21 14:20:06 +00:00
|
|
|
@endif
|
2023-09-21 12:45:08 +00:00
|
|
|
</div>
|
|
|
|
<div class="card assign-form p-3">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="assign_form">
|
|
|
|
@lang('messages.assign_forms'):
|
|
|
|
</label>
|
|
|
|
<select multiple class="form-control" id="assign_form" name="form_id[]">
|
|
|
|
@foreach($forms as $key => $value)
|
|
|
|
<option value="{{$key}}">
|
|
|
|
{{$value}}
|
|
|
|
</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h5>@lang('messages.permission_for_forms'):</h5>
|
2023-09-21 14:01:58 +00:00
|
|
|
<div class="row">
|
2023-09-21 14:20:06 +00:00
|
|
|
@if(auth()->user()->hasRole(\App\Enums\User\RoleEnum::SUPERVISOR->value))
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="form-group form-check">
|
|
|
|
<input type="checkbox" class="form-check-input" name="permissions[]"
|
|
|
|
id="form_design"
|
|
|
|
value="can_design_form">
|
|
|
|
<label class="form-check-label" for="form_design">
|
|
|
|
@lang('messages.can_design_form')
|
|
|
|
<i class="fas fa-info-circle text-info" data-toggle="tooltip"
|
|
|
|
title="@lang('messages.can_design_form_tooltip')"></i>
|
|
|
|
</label>
|
|
|
|
</div>
|
2023-09-21 12:45:08 +00:00
|
|
|
</div>
|
2023-09-21 14:20:06 +00:00
|
|
|
@endif
|
|
|
|
|
2023-09-21 12:45:08 +00:00
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="form-group form-check">
|
2023-09-21 14:20:06 +00:00
|
|
|
<input type="checkbox" class="form-check-input" name="permissions[]" id="form_data"
|
|
|
|
value="can_view_data">
|
2023-09-21 12:45:08 +00:00
|
|
|
<label class="form-check-label" for="form_data">
|
|
|
|
@lang('messages.can_view_data')
|
2023-09-21 14:20:06 +00:00
|
|
|
<i class="fas fa-info-circle text-info" data-toggle="tooltip"
|
|
|
|
title="@lang('messages.can_view_data_tooltip')"></i>
|
2023-09-21 12:45:08 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="form-group form-check">
|
2023-09-21 14:20:06 +00:00
|
|
|
<input type="checkbox" class="form-check-input" name="permissions[]" id="form_view"
|
|
|
|
value="can_view_form">
|
2023-09-21 12:45:08 +00:00
|
|
|
<label class="form-check-label" for="form_view">
|
|
|
|
@lang('messages.can_view_form')
|
2023-09-21 14:20:06 +00:00
|
|
|
<i class="fas fa-info-circle text-info" data-toggle="tooltip"
|
|
|
|
title="@lang('messages.can_view_form_tooltip')"></i>
|
2023-09-21 12:45:08 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="submit" class="btn btn-sm btn-primary submit_btn">
|
|
|
|
@lang('messages.save')
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">
|
|
|
|
@lang('messages.close')
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2023-09-21 14:01:58 +00:00
|
|
|
</div>
|