mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Make user form a little nicer looking
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
412caebf69
commit
c2f1fd4942
|
@ -3,7 +3,7 @@
|
|||
<!-- full company support is enabled and this user isn't a superadmin -->
|
||||
<div class="form-group">
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
<div class="col-md-6">
|
||||
<select class="js-data-ajax" data-endpoint="companies" data-placeholder="{{ trans('general.select_company') }}" name="{{ $fieldname }}" style="width: 100%" id="company_select" aria-label="{{ $fieldname }}">
|
||||
@if ($company_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $company_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
|
@ -20,7 +20,7 @@
|
|||
<!-- full company support is enabled or this user is a superadmin -->
|
||||
<div id="{{ $fieldname }}" class="form-group{{ $errors->has($fieldname) ? ' has-error' : '' }}">
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
<div class="col-md-6">
|
||||
<select class="js-data-ajax" data-endpoint="companies" data-placeholder="{{ trans('general.select_company') }}" name="{{ $fieldname }}" style="width: 100%" id="company_select">
|
||||
@if ($company_id = Request::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $company_id }}" selected="selected">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7">
|
||||
<div class="col-md-6">
|
||||
<select class="js-data-ajax" data-endpoint="departments" data-placeholder="{{ trans('general.select_department') }}" name="{{ $fieldname }}" style="width: 100%" id="department_select" aria-label="{{ $fieldname }}">
|
||||
@if ($department_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $department_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div id="{{ $fieldname }}" class="form-group{{ $errors->has($fieldname) ? ' has-error' : '' }}"{!! (isset($style)) ? ' style="'.e($style).'"' : '' !!}>
|
||||
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
||||
<div class="col-md-6{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('general.select_location') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}">
|
||||
@if ($location_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $location_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
||||
<div class="col-md-6{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="users" data-placeholder="{{ trans('general.select_user') }}" name="{{ $fieldname }}" style="width: 100%" id="assigned_user_select" aria-label="{{ $fieldname }}">
|
||||
@if ($user_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $user_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<!-- First Name -->
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="first_name">{{ trans('general.first_name') }}</label>
|
||||
<div class="col-md-8 {{ (\App\Helpers\Helper::checkIfRequired($user, 'first_name')) ? ' required' : '' }}">
|
||||
<div class="col-md-6{{ (\App\Helpers\Helper::checkIfRequired($user, 'first_name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ old('first_name', $user->first_name) }}" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<!-- Last Name -->
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="last_name">{{ trans('general.last_name') }} </label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'last_name')) ? ' required' : '' }}">
|
||||
<div class="col-md-6{{ (\App\Helpers\Helper::checkIfRequired($user, 'last_name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="last_name" id="last_name" value="{{ old('last_name', $user->last_name) }}" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
|
@ -105,7 +105,7 @@
|
|||
<!-- Username -->
|
||||
<div class="form-group {{ $errors->has('username') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="username">{{ trans('admin/users/table.username') }}</label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'username')) ? ' required' : '' }}">
|
||||
<div class="col-md-6{{ (\App\Helpers\Helper::checkIfRequired($user, 'username')) ? ' required' : '' }}">
|
||||
@if ($user->ldap_import!='1')
|
||||
<input
|
||||
class="form-control"
|
||||
|
@ -136,7 +136,7 @@
|
|||
<label class="col-md-3 control-label" for="password">
|
||||
{{ trans('admin/users/table.password') }}
|
||||
</label>
|
||||
<div class="col-md-5{{ (\App\Helpers\Helper::checkIfRequired($user, 'password')) ? ' required' : '' }}">
|
||||
<div class="col-md-6{{ (\App\Helpers\Helper::checkIfRequired($user, 'password')) ? ' required' : '' }}">
|
||||
@if ($user->ldap_import!='1')
|
||||
<input
|
||||
type="password"
|
||||
|
@ -154,7 +154,7 @@
|
|||
<span id="generated-password"></span>
|
||||
{!! $errors->first('password', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-2">
|
||||
@if ($user->ldap_import!='1')
|
||||
<a href="#" class="left" id="genPassword">Generate</a>
|
||||
@endif
|
||||
|
@ -167,7 +167,7 @@
|
|||
<label class="col-md-3 control-label" for="password_confirmation">
|
||||
{{ trans('admin/users/table.password_confirm') }}
|
||||
</label>
|
||||
<div class="col-md-5 {{ ((\App\Helpers\Helper::checkIfRequired($user, 'first_name')) && (!$user->id)) ? ' required' : '' }}">
|
||||
<div class="col-md-6{{ ((\App\Helpers\Helper::checkIfRequired($user, 'first_name')) && (!$user->id)) ? ' required' : '' }}">
|
||||
<input
|
||||
type="password"
|
||||
name="password_confirmation"
|
||||
|
@ -191,7 +191,7 @@
|
|||
<!-- Email -->
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="email">{{ trans('admin/users/table.email') }} </label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'email')) ? ' required' : '' }}">
|
||||
<div class="col-md-6{{ (\App\Helpers\Helper::checkIfRequired($user, 'email')) ? ' required' : '' }}">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
|
@ -233,7 +233,7 @@
|
|||
<!-- 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-8">
|
||||
<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>
|
||||
|
@ -242,7 +242,7 @@
|
|||
<!-- Employee Number -->
|
||||
<div class="form-group {{ $errors->has('employee_num') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="employee_num">{{ trans('admin/users/table.employee_num') }}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-6">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
|
@ -259,7 +259,7 @@
|
|||
<!-- 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-8">
|
||||
<div class="col-md-6">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
|
@ -285,7 +285,7 @@
|
|||
<!-- 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-4">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="phone" id="phone" value="{{ old('phone', $user->phone) }}" />
|
||||
{!! $errors->first('phone', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
|
@ -294,7 +294,7 @@
|
|||
<!-- 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-8">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="website" id="website" value="{{ old('website', $user->website) }}" />
|
||||
{!! $errors->first('website', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
|
@ -303,7 +303,7 @@
|
|||
<!-- 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-4">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="address" id="address" value="{{ old('address', $user->address) }}" />
|
||||
{!! $errors->first('address', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
|
@ -312,7 +312,7 @@
|
|||
<!-- 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-4">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="city" id="city" aria-label="city" value="{{ old('city', $user->city) }}" />
|
||||
{!! $errors->first('city', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
|
@ -321,7 +321,7 @@
|
|||
<!-- 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-4">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="state" id="state" value="{{ old('state', $user->state) }}" maxlength="3" />
|
||||
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
|
@ -330,8 +330,8 @@
|
|||
<!-- 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-4">
|
||||
{!! Form::countries('country', old('country', $user->country), 'select2') !!}
|
||||
<div class="col-md-6">
|
||||
{!! Form::countries('country', old('country', $user->country), 'col-md-6 select2') !!}
|
||||
{!! $errors->first('country', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -339,7 +339,7 @@
|
|||
<!-- 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-4">
|
||||
<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>
|
||||
|
@ -447,8 +447,8 @@
|
|||
<!-- 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-8">
|
||||
<textarea class="form-control" id="notes" name="notes">{{ old('notes', $user->notes) }}</textarea>
|
||||
<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="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -456,7 +456,7 @@
|
|||
<!-- 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-5">
|
||||
<div class="col-md-6">
|
||||
|
||||
@if ((Config::get('app.lock_passwords') || (!Auth::user()->isSuperUser())))
|
||||
|
||||
|
|
Loading…
Reference in a new issue