mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
166a700342
|
@ -11,19 +11,10 @@
|
|||
{{ csrf_field() }}
|
||||
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12 required">
|
||||
<input type='text' name='name' id='modal-name' class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
@include('modals.partials.name')
|
||||
<input type="hidden" name='category_type' id="modal-category_type" value="{{ request('category_type') }}" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
|
||||
</div>
|
||||
@include('modals.partials.footer')
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -9,11 +9,7 @@
|
|||
<form action="{{ route('api.locations.store') }}" onsubmit="return false">
|
||||
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='text' name="name" id='modal-name' class="form-control"></div>
|
||||
</div>
|
||||
@include('modals.partials.name', ['item' => new \App\Models\Location(), 'required' => 'true'])
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-city">{{ trans('general.city') }}:</label></div>
|
||||
|
@ -26,10 +22,6 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
|
||||
</div>
|
||||
@include('modals.partials.footer')
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -8,20 +8,13 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('api.manufacturers.store') }}" onsubmit="return false">
|
||||
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12 required">
|
||||
<input type='text' name="name" id='modal-name' class="form-control">
|
||||
</div>
|
||||
@include('partials.forms.edit.name', ['item' => new \App\Models\Manufacturer(), 'translated_name' => trans('admin/manufacturers/table.name')])
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
|
||||
<div class="dynamic-form-row">
|
||||
@include('modals.partials.footer')
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -9,40 +9,13 @@
|
|||
<form action="{{ route('api.models.store') }}" onsubmit="return false">
|
||||
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='text' name="name" id='modal-name' class="form-control"></div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-category_id">{{ trans('general.category') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12 required">
|
||||
<select class="js-data-ajax" data-endpoint="categories/asset" name="category_id" style="width: 100%" id="modal-category_id"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-manufacturer_id">{{ trans('general.manufacturer') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
<select class="js-data-ajax" data-endpoint="manufacturers" name="manufacturer_id" style="width: 100%" id="modal-manufacturer_id"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-modelno">{{ trans('general.model_no') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12"><input type='text' name="model_number" id='modal-model_number' class="form-control"></div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-fieldset_id">{{ trans('admin/models/general.fieldset') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12">{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:350px')) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
|
||||
@include('modals.partials.name', ['required' => 'true'])
|
||||
@include('modals.partials.categories-select', ['required' => 'true'])
|
||||
@include('modals.partials.manufacturer-select')
|
||||
@include('modals.partials.model-number')
|
||||
@include('modals.partials.fieldset-select')
|
||||
</form>
|
||||
</div>
|
||||
@include('modals.partials.footer')
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
11
resources/views/modals/partials/categories-select.blade.php
Normal file
11
resources/views/modals/partials/categories-select.blade.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!-- modals/partials/categories-select.blade.php -->
|
||||
@php
|
||||
$required = $required ?? '';
|
||||
@endphp
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-category_id">{{ trans('general.category') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12 required">
|
||||
<select class="js-data-ajax" data-endpoint="categories/asset" name="category_id" style="width: 100%" id="modal-category_id" {{$required ? 'required' : ''}}></select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modals/partials/categories-select.blade.php -->
|
|
@ -0,0 +1,6 @@
|
|||
<!-- partials/modals/partials/fieldset-select.blade.php -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-fieldset_id">{{ trans('admin/models/general.fieldset') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12">{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:100%;')) }}</div>
|
||||
</div>
|
||||
<!-- partials/modals/partials/fieldset-select.blade.php -->
|
6
resources/views/modals/partials/footer.blade.php
Normal file
6
resources/views/modals/partials/footer.blade.php
Normal file
|
@ -0,0 +1,6 @@
|
|||
<!-- partials/modals/partials/footer.blade.php -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary pull-right" id="modal-save">{{ trans('general.save') }}</button>
|
||||
</div>
|
||||
<!-- partials/modals/partials/footer.blade.php -->
|
|
@ -0,0 +1,8 @@
|
|||
<!-- partials/modals/partials/model-number.blade.php -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-manufacturer_id">{{ trans('general.manufacturer') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
<select class="js-data-ajax" data-endpoint="manufacturers" name="manufacturer_id" style="width: 100%" id="modal-manufacturer_id"></select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- partials/modals/partials/model-number.blade.php -->
|
6
resources/views/modals/partials/model-number.blade.php
Normal file
6
resources/views/modals/partials/model-number.blade.php
Normal file
|
@ -0,0 +1,6 @@
|
|||
<!-- partials/modals/partials/model-number.blade.php -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-modelno">{{ trans('general.model_no') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12"><input type='text' name="model_number" id='modal-model_number' class="form-control"></div>
|
||||
</div>
|
||||
<!-- partials/modals/partials/model-number.blade.php -->
|
10
resources/views/modals/partials/name.blade.php
Normal file
10
resources/views/modals/partials/name.blade.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!-- modals/partials/name.blade.php -->
|
||||
@php
|
||||
$required = $required ?? '';
|
||||
@endphp
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12"><input type='text' name="name" id='modal-name' class="form-control" {{$required ? 'required' : ''}}></div>
|
||||
</div>
|
||||
<!-- modals/partials/name.blade.php -->
|
|
@ -10,21 +10,18 @@
|
|||
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='text' name="name" id='modal-name' class="form-control"></div>
|
||||
@include('partials.forms.edit.name', ['required' => 'true', 'item' => new \App\Models\Statuslabel(),'translated_name' => trans('admin/statuslabels/table.name') ])
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-type">{{ trans('admin/statuslabels/table.status_type') }}:
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-type">{{ trans('admin/statuslabels/table.status_type') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12 required">{{ Form::select('type', $statuslabel_types, '', array('class'=>'select2', 'style'=>'width:90%','id' =>'modal-type')) }}</div>
|
||||
<div class="col-md-8 col-xs-12">{{ Form::select('type', $statuslabel_types, '', array('class'=>'select2', 'style'=>'width:100%','id' =>'modal-type', 'required',)) }}</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
|
||||
<div class="dynamic-form-row">
|
||||
@include('modals.partials.footer')
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -10,15 +10,12 @@
|
|||
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='text' name="name" id='modal-name' class="form-control"></div>
|
||||
@include('partials.forms.edit.name', [ 'item' => new \App\Models\Supplier(), 'translated_name' => trans('admin/suppliers/table.name')])
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
|
||||
<div class="dynamic-form-row">
|
||||
@include('modals.partials.footer')
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -25,11 +25,10 @@
|
|||
<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>
|
||||
|
||||
<!-- Setup of default company, taken from asset creator -->
|
||||
@if ($user->company)
|
||||
<input type="hidden" name="company_id" id='modal-company' value='{{ $user->company->id }}' class="form-control">
|
||||
|
@ -42,63 +41,60 @@
|
|||
<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', [ 'required' => 'true', 'class' => 'col-md-8 col-xs-12-pull', 'style' => 'width:67%;'])
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
@include('partials.forms.edit.name-last', ['required' => 'true', 'class' => 'col-md-8 col-xs-12-pull', 'style' => 'width:67%;'])
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
@include('partials.forms.edit.email')
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
@include('partials.forms.edit.username', [ 'required' => 'true'])
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-password">{{ trans('admin/users/table.password') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='password' name="password" id='modal-password' class="form-control">
|
||||
<a href="#" class="left" id="modal-genPassword">Generate</a>
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 col-xs-12">
|
||||
<label class="control-label" for="modal-password">{{ trans('admin/users/table.password') }}:</label>
|
||||
</div>
|
||||
<div class="col-md-8 col-xs-12 " style="margin-bottom:5px;">
|
||||
<input type='password' name="password" id='modal-password' class="form-control" required>
|
||||
<a href="#" class="left" id="modal-genPassword">Generate</a>
|
||||
<div id="modal-generated-password"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-password_confirmation">{{ trans('admin/users/table.password_confirm') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12 required"><input type='password' name="password_confirmation" id='modal-password_confirmation' class="form-control">
|
||||
<div id="modal-generated-password"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 col-xs-12 ">
|
||||
<label class="control-label" for="modal-password_confirmation">{{ trans('admin/users/table.password_confirm') }}:</label>
|
||||
</div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
<input class="form-control" type='password' name="password_confirmation" id='modal-password_confirmation' required>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Checkbox for activation new user, by default set for activated -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-offset-3 col-md-8 col-xs-12">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="activated" id="modal-activated" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} aria-label="activated">
|
||||
{{ trans('general.login_enabled') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-8 col-xs-12">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="activated" id="modal-activated" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} aria-label="activated">
|
||||
{{ trans('general.login_enabled') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
@include('modals.partials.footer')
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
{{ $file->note }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<td style="white-space: nowrap">
|
||||
@if (($file->filename) && (Storage::exists('private_uploads/assetmodels/'.$file->filename)))
|
||||
<a href="{{ route('show/modelfile', [$model->id, $file->id]) }}" class="btn btn-sm btn-default">
|
||||
<i class="fas fa-download" aria-hidden="true"></i>
|
||||
|
|
|
@ -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-8">
|
||||
<select class="js-data-ajax" data-endpoint="companies" data-placeholder="{{ trans('general.select_company') }}" name="{{ $fieldname }}" style="width: 100%" id="company_select"{{ (isset($multiple) && ($multiple=='true')) ? " multiple='multiple'" : '' }}>
|
||||
@if ($company_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $company_id }}" selected="selected">
|
||||
|
|
|
@ -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:100%; 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>
|
|
@ -2,7 +2,7 @@
|
|||
<div id="location_id" class="form-group{{ $errors->has('location_id') ? ' has-error' : '' }}"{!! (isset($style)) ? ' style="'.e($style).'"' : '' !!}>
|
||||
|
||||
{{ Form::label('location_id', $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
<div class="col-md-8">
|
||||
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('general.select_location') }}" name="location_id" style="width: 100%" id="location_id_location_select" aria-label="location_id">
|
||||
@if ($location_id = old('location_id', (isset($user)) ? $user->location_id : ''))
|
||||
<option value="{{ $location_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
|
|
14
resources/views/partials/forms/edit/name-first.blade.php
Normal file
14
resources/views/partials/forms/edit/name-first.blade.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!-- partials/forms/edit/name-first.blade.php -->
|
||||
@php
|
||||
$class = $class ?? 'col-md-6';
|
||||
$style = $style ?? '';
|
||||
$required = $required ?? '';
|
||||
@endphp
|
||||
<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}}""{{ (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) }}" {{$required ? 'required' : ''}} maxlength="191" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- partials/forms/edit/name-first.blade.php -->
|
14
resources/views/partials/forms/edit/name-last.blade.php
Normal file
14
resources/views/partials/forms/edit/name-last.blade.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!-- partials/forms/edit/name-last.blade.php -->
|
||||
@php
|
||||
$class = $class ?? 'col-md-6';
|
||||
$style = $style ?? '';
|
||||
$required = $required ?? '';
|
||||
@endphp
|
||||
<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}}" 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 -->
|
|
@ -1,8 +1,8 @@
|
|||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ $translated_name }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (Helper::checkIfRequired($item, 'name')) ? ' required' : '' !!} />
|
||||
<div class="col-md-8 col-sm-12{{ (Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
|
||||
<input class="form-control" style="width:100%;" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (Helper::checkIfRequired($item, 'name')) ? ' required' : '' !!} />
|
||||
{!! $errors->first('name', '<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/username.blade.php
Normal file
9
resources/views/partials/forms/edit/username.blade.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!-- partials/forms/edit/username.blade.php -->
|
||||
@php
|
||||
$required = $required ?? '';
|
||||
@endphp
|
||||
<div class="form-group">
|
||||
<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" {{$required ? 'required' : ''}}></div>
|
||||
</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>
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
<tbody>
|
||||
@foreach ($show_user->assets as $asset)
|
||||
@php
|
||||
if ($asset->model->category->getEula()) $eulas[] = $asset->model->category->getEula()
|
||||
if (($asset->model->category) && ($asset->model->category->getEula())) $eulas[] = $asset->model->category->getEula()
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
|
|
Loading…
Reference in a new issue