Nicer disclosure UI for optional data
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
6e60594e66
commit
fe672ed727
8 changed files with 381 additions and 337 deletions
|
@ -1453,7 +1453,11 @@ legend.highlight {
|
|||
background: repeating-linear-gradient(45deg, #222d32, #222d32 10px, #444 10px, #444 11px);
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
padding: 6px;
|
||||
padding: 6px 6px 6px 10px;
|
||||
}
|
||||
legend.highlight a {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
fieldset.bottom-padded {
|
||||
padding-bottom: 20px;
|
||||
|
|
|
@ -1074,7 +1074,11 @@ legend.highlight {
|
|||
background: repeating-linear-gradient(45deg, #222d32, #222d32 10px, #444 10px, #444 11px);
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
padding: 6px;
|
||||
padding: 6px 6px 6px 10px;
|
||||
}
|
||||
legend.highlight a {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
fieldset.bottom-padded {
|
||||
padding-bottom: 20px;
|
||||
|
|
12
public/css/dist/all.css
vendored
12
public/css/dist/all.css
vendored
|
@ -22788,7 +22788,11 @@ legend.highlight {
|
|||
background: repeating-linear-gradient(45deg, #222d32, #222d32 10px, #444 10px, #444 11px);
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
padding: 6px;
|
||||
padding: 6px 6px 6px 10px;
|
||||
}
|
||||
legend.highlight a {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
fieldset.bottom-padded {
|
||||
padding-bottom: 20px;
|
||||
|
@ -24357,7 +24361,11 @@ legend.highlight {
|
|||
background: repeating-linear-gradient(45deg, #222d32, #222d32 10px, #444 10px, #444 11px);
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
padding: 6px;
|
||||
padding: 6px 6px 6px 10px;
|
||||
}
|
||||
legend.highlight a {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
fieldset.bottom-padded {
|
||||
padding-bottom: 20px;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"/js/build/app.js": "/js/build/app.js?id=19253af36b58ed3fb6770c7bb944f079",
|
||||
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=06c13e817cc022028b3f4a33c0ca303a",
|
||||
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=79aa889a1a6691013be6c342ca7391cd",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=a51d8ac1d0948606bf6bd2fb06118cf0",
|
||||
"/css/build/app.css": "/css/build/app.css?id=b9970ad4ec56f54702fd07be6ee5dd21",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=2bfc7b71d951c5ac026dbc034f7373b1",
|
||||
"/css/build/app.css": "/css/build/app.css?id=4b4c2f1225d59efa7a22b76f7bbe39d8",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=4ea0068716c1bb2434d87a16d51b98c9",
|
||||
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690",
|
||||
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=ea22079836a432d7f46a5d390c445e13",
|
||||
|
@ -19,7 +19,7 @@
|
|||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=a82b065847bf3cd5d713c04ee8dc86c6",
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=6ea836d8126de101081c49abbdb89417",
|
||||
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=84aee73038982c2f8a4a09c658b3559e",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=12e96a25d0dc3ee39e9d3ce97044fbbf",
|
||||
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde",
|
||||
|
|
|
@ -1199,7 +1199,12 @@ legend.highlight {
|
|||
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
padding: 6px;
|
||||
padding: 6px 6px 6px 10px;
|
||||
}
|
||||
|
||||
legend.highlight a {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
fieldset.bottom-padded {
|
||||
|
|
|
@ -99,86 +99,92 @@
|
|||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"></label>
|
||||
|
||||
<div class="col-md-9 col-sm-9 col-md-offset-3">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
|
||||
<a id="optional_info" class="text-primary">
|
||||
<x-icon type="caret-right" class="fa-2x" id="optional_info_icon" />
|
||||
<strong>{{ trans('admin/hardware/form.optional_infos') }}</strong>
|
||||
</a>
|
||||
<fieldset name="optional-details">
|
||||
|
||||
</div>
|
||||
<legend class="highlight">
|
||||
<a id="optional_info">
|
||||
<x-icon type="caret-right" id="optional_info_icon" />
|
||||
{{ trans('admin/hardware/form.optional_infos') }}
|
||||
</a>
|
||||
</legend>
|
||||
|
||||
<div id="optional_details" class="col-md-12" style="display:none">
|
||||
<br>
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/hardware/form.name')])
|
||||
@include ('partials.forms.edit.warranty')
|
||||
<div id="optional_details" class="col-md-12" style="display:none">
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/hardware/form.name')])
|
||||
@include ('partials.forms.edit.warranty')
|
||||
|
||||
<!-- Datepicker -->
|
||||
<div class="form-group{{ $errors->has('next_audit_date') ? ' has-error' : '' }}">
|
||||
<!-- Datepicker -->
|
||||
<div class="form-group{{ $errors->has('next_audit_date') ? ' has-error' : '' }}">
|
||||
|
||||
<label class="col-md-3 control-label" for="next_audit_date">
|
||||
{{ trans('general.next_audit_date') }}
|
||||
</label>
|
||||
<label class="col-md-3 control-label" for="next_audit_date">
|
||||
{{ trans('general.next_audit_date') }}
|
||||
</label>
|
||||
|
||||
<div class="input-group col-md-4">
|
||||
<div class="input-group date" data-provide="datepicker" data-date-clear-btn="true" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date', $item->next_audit_date) }}" readonly style="background-color:inherit" maxlength="10">
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
<div class="input-group col-md-4">
|
||||
<div class="input-group date" data-provide="datepicker" data-date-clear-btn="true" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date', $item->next_audit_date) }}" readonly style="background-color:inherit" maxlength="10">
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
{!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p class="help-block">{!! trans('general.next_audit_date_help') !!}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- byod checkbox -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="byod" {{ (old('remote', $item->byod)) == '1' ? ' checked="checked"' : '' }} aria-label="byod">
|
||||
{{ trans('general.byod') }}
|
||||
</label>
|
||||
<p class="help-block">
|
||||
{{ trans('general.byod_help') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
{!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p class="help-block">{!! trans('general.next_audit_date_help') !!}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- end optional details -->
|
||||
</fieldset>
|
||||
|
||||
</div><!-- end col-md-12 col-sm-12-->
|
||||
|
||||
|
||||
<!-- byod checkbox -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="byod" {{ (old('remote', $item->byod)) == '1' ? ' checked="checked"' : '' }} aria-label="byod">
|
||||
{{ trans('general.byod') }}
|
||||
|
||||
</label>
|
||||
<p class="help-block">{{ trans('general.byod_help') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<fieldset name="order-info">
|
||||
<legend class="highlight">
|
||||
<a id="order_info">
|
||||
<x-icon type="caret-right" id="order_info_icon" />
|
||||
{{ trans('admin/hardware/form.order_details') }}
|
||||
</a>
|
||||
</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-sm-9 col-md-offset-3">
|
||||
<a id="order_info" class="text-primary">
|
||||
<x-icon type="caret-right" class="fa-2x" id="order_info_icon" />
|
||||
<strong>{{ trans('admin/hardware/form.order_details') }}</strong>
|
||||
</a>
|
||||
<div id='order_details' class="col-md-12" style="display:none">
|
||||
@include ('partials.forms.edit.order_number')
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.eol_date')
|
||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
||||
|
||||
</div>
|
||||
@php
|
||||
$currency_type = null;
|
||||
if ($item->id && $item->location) {
|
||||
$currency_type = $item->location->currency;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div id='order_details' class="col-md-12" style="display:none">
|
||||
<br>
|
||||
@include ('partials.forms.edit.order_number')
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.eol_date')
|
||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
||||
@include ('partials.forms.edit.purchase_cost', ['currency_type' => $currency_type])
|
||||
|
||||
@php
|
||||
$currency_type = null;
|
||||
if ($item->id && $item->location) {
|
||||
$currency_type = $item->location->currency;
|
||||
}
|
||||
@endphp
|
||||
|
||||
@include ('partials.forms.edit.purchase_cost', ['currency_type' => $currency_type])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end order details -->
|
||||
</fieldset>
|
||||
</div><!-- end col-md-12 col-sm-12-->
|
||||
</div><!-- end col-md-12 col-sm-12-->
|
||||
</div><!-- end col-md-12 col-sm-12-->
|
||||
|
||||
@stop
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
@if (($model) && ($model->fieldset))
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<fieldset name="custom-fields" class="bottom-padded">
|
||||
<legend class="highlight">
|
||||
{{ trans('admin/custom_fields/general.custom_fields') }}
|
||||
</legend>
|
||||
|
||||
@foreach($model->fieldset->fields AS $field)
|
||||
@if (
|
||||
((!isset($show_display_checkin_fields))
|
||||
|
@ -10,7 +16,12 @@
|
|||
)
|
||||
|
||||
<div class="form-group{{ $errors->has($field->db_column_name()) ? ' has-error' : '' }}">
|
||||
<label for="{{ $field->db_column_name() }}" class="col-md-3 control-label">{{ $field->name }} </label>
|
||||
|
||||
|
||||
<label for="{{ $field->db_column_name() }}" class="col-md-3 control-label">
|
||||
{{ $field->name }}
|
||||
</label>
|
||||
|
||||
<div class="col-md-7 col-sm-12">
|
||||
|
||||
@if ($field->element!='text')
|
||||
|
@ -98,6 +109,8 @@
|
|||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</fieldset>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
|
|
@ -274,291 +274,295 @@
|
|||
|
||||
|
||||
<!-- begin optional disclosure arrow stuff -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"></label>
|
||||
|
||||
<div class="col-md-9 col-sm-9 col-md-offset-3">
|
||||
<div class="col-md-12">
|
||||
|
||||
<a id="optional_user_info" class="text-primary">
|
||||
<i class="fa fa-caret-right fa-2x" id="optional_user_info_icon"></i>
|
||||
<strong>{{ trans('admin/hardware/form.optional_infos') }}</strong>
|
||||
</a>
|
||||
<fieldset name="optional-details">
|
||||
|
||||
</div>
|
||||
<legend class="highlight">
|
||||
<a id="optional_user_info">
|
||||
<x-icon type="caret-right" id="optional_user_info_icon" />
|
||||
{{ trans('admin/hardware/form.optional_infos') }}
|
||||
</a>
|
||||
</legend>
|
||||
|
||||
<div id="optional_user_details" class="col-md-12" style="display:none">
|
||||
<!-- everything here should be what is considered optional -->
|
||||
<br>
|
||||
<!-- Company -->
|
||||
@if (\App\Models\Company::canManageUsersCompanies())
|
||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.select_company'), 'fieldname' => 'company_id'])
|
||||
@endif
|
||||
<div id="optional_user_details" class="col-md-12" style="display:none">
|
||||
|
||||
|
||||
<!-- language -->
|
||||
<div class="form-group {{ $errors->has('locale') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="locale">{{ trans('general.language') }}</label>
|
||||
<div class="col-md-6">
|
||||
{!! Form::locales('locale', old('locale', $user->locale), 'select2') !!}
|
||||
{!! $errors->first('locale', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Employee Number -->
|
||||
<div class="form-group {{ $errors->has('employee_num') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="employee_num">{{ trans('general.employee_number') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
aria-label="employee_num"
|
||||
name="employee_num"
|
||||
maxlength="191"
|
||||
id="employee_num"
|
||||
value="{{ old('employee_num', $user->employee_num) }}"
|
||||
/>
|
||||
{!! $errors->first('employee_num', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Jobtitle -->
|
||||
<div class="form-group {{ $errors->has('jobtitle') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="jobtitle">{{ trans('admin/users/table.title') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
maxlength="191"
|
||||
name="jobtitle"
|
||||
id="jobtitle"
|
||||
value="{{ old('jobtitle', $user->jobtitle) }}"
|
||||
/>
|
||||
{!! $errors->first('jobtitle', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Manager -->
|
||||
@include ('partials.forms.edit.user-select', ['translated_name' => trans('admin/users/table.manager'), 'fieldname' => 'manager_id'])
|
||||
|
||||
<!-- Department -->
|
||||
@include ('partials.forms.edit.department-select', ['translated_name' => trans('general.department'), 'fieldname' => 'department_id'])
|
||||
|
||||
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.start_date'), 'fieldname' => 'start_date', 'item' => $user])
|
||||
|
||||
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.end_date'), 'fieldname' => 'end_date', 'item' => $user])
|
||||
|
||||
<!-- VIP checkbox -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
|
||||
<label class="form-control" for="vip">
|
||||
<input type="checkbox" value="1" name="vip" {{ (old('vip', $user->vip)) == '1' ? ' checked="checked"' : '' }} aria-label="vip">
|
||||
{{ trans('admin/users/general.vip_label') }}
|
||||
</label>
|
||||
|
||||
<p class="help-block">{{ trans('admin/users/general.vip_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Auto assign checkbox -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
|
||||
<label class="form-control" for="autoassign_licenses">
|
||||
<input type="checkbox" value="1" name="autoassign_licenses" {{ (old('autoassign_licenses', $user->autoassign_licenses)) == '1' ? " checked='checked'" : '' }} aria-label="autoassign_licenses">
|
||||
{{ trans('general.autoassign_licenses') }}
|
||||
</label>
|
||||
|
||||
<p class="help-block">{{ trans('general.autoassign_licenses_help_long') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- remote checkbox -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
<label for="remote" class="form-control">
|
||||
<input type="checkbox" value="1" name="remote" {{ (old('remote', $user->remote)) == '1' ? ' checked="checked"' : '' }} aria-label="remote">
|
||||
{{ trans('admin/users/general.remote_label') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/users/general.remote_help') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Location -->
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="phone">{{ trans('admin/users/table.phone') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="phone" id="phone" value="{{ old('phone', $user->phone) }}" maxlength="191" />
|
||||
{!! $errors->first('phone', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Website URL -->
|
||||
<div class="form-group {{ $errors->has('website') ? ' has-error' : '' }}">
|
||||
<label for="website" class="col-md-3 control-label">{{ trans('general.website') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="url" name="website" id="website" value="{{ old('website', $user->website) }}" maxlength="191" />
|
||||
{!! $errors->first('website', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Address -->
|
||||
<div class="form-group{{ $errors->has('address') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="address">{{ trans('general.address') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="address" id="address" value="{{ old('address', $user->address) }}" maxlength="191" />
|
||||
{!! $errors->first('address', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- City -->
|
||||
<div class="form-group{{ $errors->has('city') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="city">{{ trans('general.city') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="city" id="city" aria-label="city" value="{{ old('city', $user->city) }}" maxlength="191" />
|
||||
{!! $errors->first('city', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- State -->
|
||||
<div class="form-group{{ $errors->has('state') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="state">{{ trans('general.state') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="state" id="state" value="{{ old('state', $user->state) }}" maxlength="191" />
|
||||
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Country -->
|
||||
<div class="form-group{{ $errors->has('country') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="country">{{ trans('general.country') }}</label>
|
||||
<div class="col-md-6">
|
||||
{!! Form::countries('country', old('country', $user->country), 'col-md-12 select2') !!}
|
||||
|
||||
<p class="help-block">{{ trans('general.countries_manually_entered_help') }}</p>
|
||||
{!! $errors->first('country', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Zip -->
|
||||
<div class="form-group{{ $errors->has('zip') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="zip">{{ trans('general.zip') }}</label>
|
||||
<div class="col-md-3">
|
||||
<input class="form-control" type="text" name="zip" id="zip" value="{{ old('zip', $user->zip) }}" maxlength="10" />
|
||||
{!! $errors->first('zip', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/users/table.notes') }}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" rows="5" id="notes" name="notes">{{ old('notes', $user->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($snipeSettings->two_factor_enabled!='')
|
||||
@if ($snipeSettings->two_factor_enabled=='1')
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
|
||||
<label class="form-control form-control--disabled" for="two_factor_optin">
|
||||
<input type="checkbox" value="1" name="two_factor_optin" {{ (old('two_factor_optin', $user->two_factor_optin)) == '1' ? ' checked="checked"' : '' }} aria-label="two_factor_optin" disabled>
|
||||
{{ trans('admin/settings/general.two_factor') }}
|
||||
</label>
|
||||
|
||||
@else
|
||||
|
||||
<label class="form-control" for="two_factor_optin">
|
||||
<input type="checkbox" value="1" name="two_factor_optin" {{ (old('two_factor_optin', $user->two_factor_optin)) == '1' ? ' checked="checked"' : '' }} aria-label="two_factor_optin">
|
||||
{{ trans('admin/settings/general.two_factor') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/users/general.two_factor_admin_optin_help') }}</p>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- everything here should be what is considered optional -->
|
||||
<br>
|
||||
<!-- Company -->
|
||||
@if (\App\Models\Company::canManageUsersCompanies())
|
||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.select_company'), 'fieldname' => 'company_id'])
|
||||
@endif
|
||||
|
||||
@if ((Auth::user()->isSuperUser()) && ($user->two_factor_active_and_enrolled()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!=''))
|
||||
<!-- Reset Two Factor -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||
<a class="btn btn-default btn-sm pull-left" id="two_factor_reset" style="margin-right: 10px;"> {{ trans('admin/settings/general.two_factor_reset') }}</a>
|
||||
<span id="two_factor_reseticon"></span>
|
||||
<span id="two_factor_resetresult"></span>
|
||||
<span id="two_factor_resetstatus"></span>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_reset_help') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- language -->
|
||||
<div class="form-group {{ $errors->has('locale') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="locale">{{ trans('general.language') }}</label>
|
||||
<div class="col-md-6">
|
||||
{!! Form::locales('locale', old('locale', $user->locale), 'select2') !!}
|
||||
{!! $errors->first('locale', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Employee Number -->
|
||||
<div class="form-group {{ $errors->has('employee_num') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="employee_num">{{ trans('general.employee_number') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
aria-label="employee_num"
|
||||
name="employee_num"
|
||||
maxlength="191"
|
||||
id="employee_num"
|
||||
value="{{ old('employee_num', $user->employee_num) }}"
|
||||
/>
|
||||
{!! $errors->first('employee_num', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Jobtitle -->
|
||||
<div class="form-group {{ $errors->has('jobtitle') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="jobtitle">{{ trans('admin/users/table.title') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
maxlength="191"
|
||||
name="jobtitle"
|
||||
id="jobtitle"
|
||||
value="{{ old('jobtitle', $user->jobtitle) }}"
|
||||
/>
|
||||
{!! $errors->first('jobtitle', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Manager -->
|
||||
@include ('partials.forms.edit.user-select', ['translated_name' => trans('admin/users/table.manager'), 'fieldname' => 'manager_id'])
|
||||
|
||||
<!-- Department -->
|
||||
@include ('partials.forms.edit.department-select', ['translated_name' => trans('general.department'), 'fieldname' => 'department_id'])
|
||||
|
||||
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.start_date'), 'fieldname' => 'start_date', 'item' => $user])
|
||||
|
||||
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.end_date'), 'fieldname' => 'end_date', 'item' => $user])
|
||||
|
||||
<!-- VIP checkbox -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
|
||||
<label class="form-control" for="vip">
|
||||
<input type="checkbox" value="1" name="vip" {{ (old('vip', $user->vip)) == '1' ? ' checked="checked"' : '' }} aria-label="vip">
|
||||
{{ trans('admin/users/general.vip_label') }}
|
||||
</label>
|
||||
|
||||
<p class="help-block">{{ trans('admin/users/general.vip_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Auto assign checkbox -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
|
||||
<label class="form-control" for="autoassign_licenses">
|
||||
<input type="checkbox" value="1" name="autoassign_licenses" {{ (old('autoassign_licenses', $user->autoassign_licenses)) == '1' ? " checked='checked'" : '' }} aria-label="autoassign_licenses">
|
||||
{{ trans('general.autoassign_licenses') }}
|
||||
</label>
|
||||
|
||||
<p class="help-block">{{ trans('general.autoassign_licenses_help_long') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- remote checkbox -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
<label for="remote" class="form-control">
|
||||
<input type="checkbox" value="1" name="remote" {{ (old('remote', $user->remote)) == '1' ? ' checked="checked"' : '' }} aria-label="remote">
|
||||
{{ trans('admin/users/general.remote_label') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/users/general.remote_help') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Location -->
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="phone">{{ trans('admin/users/table.phone') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="phone" id="phone" value="{{ old('phone', $user->phone) }}" maxlength="191" />
|
||||
{!! $errors->first('phone', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Website URL -->
|
||||
<div class="form-group {{ $errors->has('website') ? ' has-error' : '' }}">
|
||||
<label for="website" class="col-md-3 control-label">{{ trans('general.website') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="url" name="website" id="website" value="{{ old('website', $user->website) }}" maxlength="191" />
|
||||
{!! $errors->first('website', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Address -->
|
||||
<div class="form-group{{ $errors->has('address') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="address">{{ trans('general.address') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="address" id="address" value="{{ old('address', $user->address) }}" maxlength="191" />
|
||||
{!! $errors->first('address', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- City -->
|
||||
<div class="form-group{{ $errors->has('city') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="city">{{ trans('general.city') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="city" id="city" aria-label="city" value="{{ old('city', $user->city) }}" maxlength="191" />
|
||||
{!! $errors->first('city', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- State -->
|
||||
<div class="form-group{{ $errors->has('state') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="state">{{ trans('general.state') }}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="state" id="state" value="{{ old('state', $user->state) }}" maxlength="191" />
|
||||
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Country -->
|
||||
<div class="form-group{{ $errors->has('country') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="country">{{ trans('general.country') }}</label>
|
||||
<div class="col-md-6">
|
||||
{!! Form::countries('country', old('country', $user->country), 'col-md-12 select2') !!}
|
||||
|
||||
<p class="help-block">{{ trans('general.countries_manually_entered_help') }}</p>
|
||||
{!! $errors->first('country', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Zip -->
|
||||
<div class="form-group{{ $errors->has('zip') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="zip">{{ trans('general.zip') }}</label>
|
||||
<div class="col-md-3">
|
||||
<input class="form-control" type="text" name="zip" id="zip" value="{{ old('zip', $user->zip) }}" maxlength="10" />
|
||||
{!! $errors->first('zip', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/users/table.notes') }}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" rows="5" id="notes" name="notes">{{ old('notes', $user->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($snipeSettings->two_factor_enabled!='')
|
||||
@if ($snipeSettings->two_factor_enabled=='1')
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
|
||||
<label class="form-control form-control--disabled" for="two_factor_optin">
|
||||
<input type="checkbox" value="1" name="two_factor_optin" {{ (old('two_factor_optin', $user->two_factor_optin)) == '1' ? ' checked="checked"' : '' }} aria-label="two_factor_optin" disabled>
|
||||
{{ trans('admin/settings/general.two_factor') }}
|
||||
</label>
|
||||
|
||||
@else
|
||||
|
||||
<label class="form-control" for="two_factor_optin">
|
||||
<input type="checkbox" value="1" name="two_factor_optin" {{ (old('two_factor_optin', $user->two_factor_optin)) == '1' ? ' checked="checked"' : '' }} aria-label="two_factor_optin">
|
||||
{{ trans('admin/settings/general.two_factor') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/users/general.two_factor_admin_optin_help') }}</p>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ((Auth::user()->isSuperUser()) && ($user->two_factor_active_and_enrolled()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!=''))
|
||||
<!-- Reset Two Factor -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||
<a class="btn btn-default btn-sm pull-left" id="two_factor_reset" style="margin-right: 10px;"> {{ trans('admin/settings/general.two_factor_reset') }}</a>
|
||||
<span id="two_factor_reseticon"></span>
|
||||
<span id="two_factor_resetresult"></span>
|
||||
<span id="two_factor_resetstatus"></span>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_reset_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
|
||||
@endif
|
||||
<!-- Groups -->
|
||||
<div class="form-group{{ $errors->has('groups') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="groups[]"> {{ trans('general.groups') }}</label>
|
||||
<div class="col-md-6">
|
||||
|
||||
<!-- Groups -->
|
||||
<div class="form-group{{ $errors->has('groups') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="groups[]"> {{ trans('general.groups') }}</label>
|
||||
<div class="col-md-6">
|
||||
@if ($groups->count())
|
||||
@if ((Config::get('app.lock_passwords') || (!Auth::user()->isSuperUser())))
|
||||
|
||||
@if ($groups->count())
|
||||
@if ((Config::get('app.lock_passwords') || (!Auth::user()->isSuperUser())))
|
||||
@if (count($userGroups->keys()) > 0)
|
||||
<ul>
|
||||
@foreach ($groups as $id => $group)
|
||||
{!! ($userGroups->keys()->contains($id) ? '<li>'.e($group).'</li>' : '') !!}
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@if (count($userGroups->keys()) > 0)
|
||||
<ul>
|
||||
@foreach ($groups as $id => $group)
|
||||
{!! ($userGroups->keys()->contains($id) ? '<li>'.e($group).'</li>' : '') !!}
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<span class="help-block">{{ trans('admin/users/general.group_memberships_helpblock') }}</span>
|
||||
@else
|
||||
<div class="controls">
|
||||
<select
|
||||
name="groups[]"
|
||||
aria-label="groups[]"
|
||||
id="groups[]"
|
||||
multiple="multiple"
|
||||
class="form-control">
|
||||
|
||||
<span class="help-block">{{ trans('admin/users/general.group_memberships_helpblock') }}</span>
|
||||
@else
|
||||
<div class="controls">
|
||||
<select
|
||||
name="groups[]"
|
||||
aria-label="groups[]"
|
||||
id="groups[]"
|
||||
multiple="multiple"
|
||||
class="form-control">
|
||||
@foreach ($groups as $id => $group)
|
||||
<option value="{{ $id }}"
|
||||
{{ ($userGroups->keys()->contains($id) ? ' selected="selected"' : '') }}>
|
||||
{{ $group }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@foreach ($groups as $id => $group)
|
||||
<option value="{{ $id }}"
|
||||
{{ ($userGroups->keys()->contains($id) ? ' selected="selected"' : '') }}>
|
||||
{{ $group }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="help-block">
|
||||
{{ trans('admin/users/table.groupnotes') }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<p>{{ trans('admin/users/table.nogroup') }} <code>{{ trans('admin/settings/general.admin_settings') }} <i class="fa fa-cogs"></i> > {{ trans('general.groups') }} <i class="fas fa-user-friends"></i></code> </p>
|
||||
@endif
|
||||
<span class="help-block">
|
||||
{{ trans('admin/users/table.groupnotes') }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<p>{{ trans('admin/users/table.nogroup') }} <code>{{ trans('admin/settings/general.admin_settings') }} <i class="fa fa-cogs"></i> > {{ trans('general.groups') }} <i class="fas fa-user-friends"></i></code> </p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue