mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
refactoring modals with partials and fixing misalignments
This commit is contained in:
parent
367f02af86
commit
0bc98e971f
|
@ -25,7 +25,7 @@
|
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h2 class="modal-title">{{ trans('admin/users/table.createuser') }}</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body" style="width:100%; display:block;">
|
||||
<form action="{{ route('api.users.store') }}" onsubmit="return false">
|
||||
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
|
||||
</div>
|
||||
|
@ -42,29 +42,17 @@
|
|||
<div class="dynamic-form-row">
|
||||
@include ('partials.forms.edit.location-profile-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-first_name">{{ trans('general.first_name') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='text' name="first_name" id='modal-first_name' class="form-control"></div>
|
||||
@include('partials.forms.edit.name-first', ['class' => 'col-md-8 col-xs-12', 'style' => 'width:65.5%;'])
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-last_name">{{ trans('general.last_name') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12"><input type='text' name="last_name" id='modal-last_name' class="form-control"> </div>
|
||||
@include('partials.forms.edit.name-last', ['class' => 'col-md-8 col-xs-12', 'style' => 'width:65.5%;'])
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-username">{{ trans('admin/users/table.username') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='text' name="username" id='modal-username' class="form-control"></div>
|
||||
@include('partials.forms.edit.email')
|
||||
</div>
|
||||
|
||||
<!-- User email address -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-email">{{ trans('admin/users/table.email') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
<input class="form-control" type="text" name="email" id="modal-email" autocomplete="off">
|
||||
{!! $errors->first('email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
@include('partials.forms.edit.username')
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
|
@ -92,10 +80,11 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
@include('modals.partials.footer')
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@include('modals.partials.footer')
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="form-group {{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
{{ Form::label('email', trans('admin/suppliers/table.email'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('email', old('email', $item->email), array('class' => 'form-control')) }}
|
||||
<label for="email" class="col-md-3 col-xs-12 control-label">{{ trans('admin/suppliers/table.email') }}</label>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
<input type="text" name="email" id="email" value="{{ old('email', ($item->email ?? $user->email)) }}" class="form-control" style="width:98%; display:flex;">
|
||||
{!! $errors->first('email', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
9
resources/views/partials/forms/edit/name-first.blade.php
Normal file
9
resources/views/partials/forms/edit/name-first.blade.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!-- partials/forms/edit/name-first.blade.php -->
|
||||
<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="{{$class ? $class : 'col-md-6'}}" style= "{{$style ? $style : ''}}""{{ (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) }}" maxlength="191" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- partials/forms/edit/name-first.blade.php -->
|
9
resources/views/partials/forms/edit/name-last.blade.php
Normal file
9
resources/views/partials/forms/edit/name-last.blade.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!-- partials/forms/edit/name-last.blade.php -->
|
||||
<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="{{$class ? $class : 'col-md-6'}}" style= "{{$style ? $style : ''}}""{{ (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) }}" maxlength="191" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- partials/forms/edit/name-last.blade.php -->
|
6
resources/views/partials/forms/edit/username.blade.php
Normal file
6
resources/views/partials/forms/edit/username.blade.php
Normal file
|
@ -0,0 +1,6 @@
|
|||
<!-- partials/forms/edit/username.blade.php -->
|
||||
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-username">{{ trans('admin/users/table.username') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='text' name="username" id='modal-username' class="form-control"></div>
|
||||
|
||||
<!-- partials/forms/edit/username.blade.php -->
|
|
@ -86,22 +86,10 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- 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-6{{ (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) }}" maxlength="191" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@include('partials.forms.edit.name-first')
|
||||
|
||||
<!-- 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-6{{ (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) }}" maxlength="191" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@include('partials.forms.edit.name-last')
|
||||
|
||||
<!-- Username -->
|
||||
<div class="form-group {{ $errors->has('username') ? 'has-error' : '' }}">
|
||||
|
@ -237,7 +225,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 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>
|
||||
|
|
Loading…
Reference in a new issue