Compare commits
13 Commits
custom_val
...
use-error-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f4548e112 | ||
|
|
12fa505972 | ||
|
|
4e4930ba62 | ||
|
|
76301bc30d | ||
|
|
964e105cf9 | ||
|
|
6fd24c7e14 | ||
|
|
231bc1e2de | ||
|
|
37d04b7176 | ||
|
|
e62a802926 | ||
|
|
69e981364a | ||
|
|
abb4221539 | ||
|
|
e4ebabdaba | ||
|
|
da1e383295 |
@@ -27,7 +27,7 @@ class LicensesController extends Controller
|
||||
$licenses = License::with('company', 'manufacturer', 'supplier','category', 'adminuser')->withCount('freeSeats as free_seats_count');
|
||||
|
||||
if ($request->filled('company_id')) {
|
||||
$licenses->where('company_id', '=', $request->input('company_id'));
|
||||
$licenses->where('licenses.company_id', '=', $request->input('company_id'));
|
||||
}
|
||||
|
||||
if ($request->filled('name')) {
|
||||
|
||||
@@ -35,11 +35,7 @@ class SaveUserRequest extends FormRequest
|
||||
$rules = [
|
||||
'department_id' => 'nullable|exists:departments,id',
|
||||
'manager_id' => 'nullable|exists:users,id',
|
||||
'company_id' => [
|
||||
'nullable',
|
||||
'exists:companies,id',
|
||||
|
||||
]
|
||||
'company_id' => ['nullable','exists:companies,id']
|
||||
];
|
||||
|
||||
switch ($this->method()) {
|
||||
|
||||
@@ -1561,7 +1561,7 @@ class Asset extends Depreciable
|
||||
$leftJoin->on('assets_dept_users.id', '=', 'assets.assigned_to')
|
||||
->where('assets.assigned_type', '=', User::class);
|
||||
})->where(function ($query) use ($search) {
|
||||
$query->where('assets_dept_users.department_id', '=', $search);
|
||||
$query->whereIn('assets_dept_users.department_id', $search);
|
||||
|
||||
})->withTrashed()->whereNull('assets.deleted_at'); //workaround for laravel bug
|
||||
}
|
||||
@@ -1811,7 +1811,9 @@ class Asset extends Depreciable
|
||||
public function scopeInCategory($query, $category_id)
|
||||
{
|
||||
return $query->join('models as category_models', 'assets.model_id', '=', 'category_models.id')
|
||||
->join('categories', 'category_models.category_id', '=', 'categories.id')->where('category_models.category_id', '=', $category_id);
|
||||
->join('categories', 'category_models.category_id', '=', 'categories.id')
|
||||
->whereIn('category_models.category_id', (!is_array($category_id) ? explode(',',$category_id): $category_id));
|
||||
//->whereIn('category_models.category_id', $category_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1825,7 +1827,7 @@ class Asset extends Depreciable
|
||||
public function scopeByManufacturer($query, $manufacturer_id)
|
||||
{
|
||||
return $query->join('models', 'assets.model_id', '=', 'models.id')
|
||||
->join('manufacturers', 'models.manufacturer_id', '=', 'manufacturers.id')->where('models.manufacturer_id', '=', $manufacturer_id);
|
||||
->join('manufacturers', 'models.manufacturer_id', '=', 'manufacturers.id')->whereIn('models.manufacturer_id', (!is_array($manufacturer_id) ? explode(',',$manufacturer_id): $manufacturer_id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Rules;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Models\User;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Contracts\Validation\DataAwareRule;
|
||||
|
||||
class UserCannotSwitchCompaniesIfItemsAssigned implements ValidationRule
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the validation rule.
|
||||
*
|
||||
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
|
||||
*/
|
||||
public function validate(string $attribute, mixed $value, Closure $fail) : void
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
$user = User::find(request()->route('user')->id);
|
||||
if (($value) && ($user->allAssignedCount() > 0) && (Setting::getSettings()->full_multiple_companies_support)) {
|
||||
|
||||
@@ -831,19 +831,36 @@ body {
|
||||
}
|
||||
.select2-selection--multiple {
|
||||
border-color: #d2d6de !important;
|
||||
height: 34px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.select2-selection__choice {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.select2-search select2-search--inline {
|
||||
height: 35px !important;
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
.select2-selection__rendered needsclick {
|
||||
color: red;
|
||||
}
|
||||
.select2-results__option {
|
||||
padding: 5px;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
margin: 0px;
|
||||
}
|
||||
img.navbar-brand-img,
|
||||
.navbar-brand > img {
|
||||
float: left;
|
||||
padding: 5px 5px 5px 0;
|
||||
max-height: 50px;
|
||||
}
|
||||
.input-daterange {
|
||||
border-radius: 0px;
|
||||
.input-daterange,
|
||||
.input-daterange input:first-child,
|
||||
.input-daterange input:last-child {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.btn.bg-maroon,
|
||||
.btn.bg-purple {
|
||||
|
||||
@@ -464,19 +464,36 @@ body {
|
||||
}
|
||||
.select2-selection--multiple {
|
||||
border-color: #d2d6de !important;
|
||||
height: 34px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.select2-selection__choice {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.select2-search select2-search--inline {
|
||||
height: 35px !important;
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
.select2-selection__rendered needsclick {
|
||||
color: red;
|
||||
}
|
||||
.select2-results__option {
|
||||
padding: 5px;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
margin: 0px;
|
||||
}
|
||||
img.navbar-brand-img,
|
||||
.navbar-brand > img {
|
||||
float: left;
|
||||
padding: 5px 5px 5px 0;
|
||||
max-height: 50px;
|
||||
}
|
||||
.input-daterange {
|
||||
border-radius: 0px;
|
||||
.input-daterange,
|
||||
.input-daterange input:first-child,
|
||||
.input-daterange input:last-child {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.btn.bg-maroon,
|
||||
.btn.bg-purple {
|
||||
|
||||
46
public/css/dist/all.css
vendored
46
public/css/dist/all.css
vendored
@@ -21803,19 +21803,36 @@ body {
|
||||
}
|
||||
.select2-selection--multiple {
|
||||
border-color: #d2d6de !important;
|
||||
height: 34px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.select2-selection__choice {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.select2-search select2-search--inline {
|
||||
height: 35px !important;
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
.select2-selection__rendered needsclick {
|
||||
color: red;
|
||||
}
|
||||
.select2-results__option {
|
||||
padding: 5px;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
margin: 0px;
|
||||
}
|
||||
img.navbar-brand-img,
|
||||
.navbar-brand > img {
|
||||
float: left;
|
||||
padding: 5px 5px 5px 0;
|
||||
max-height: 50px;
|
||||
}
|
||||
.input-daterange {
|
||||
border-radius: 0px;
|
||||
.input-daterange,
|
||||
.input-daterange input:first-child,
|
||||
.input-daterange input:last-child {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.btn.bg-maroon,
|
||||
.btn.bg-purple {
|
||||
@@ -23259,19 +23276,36 @@ body {
|
||||
}
|
||||
.select2-selection--multiple {
|
||||
border-color: #d2d6de !important;
|
||||
height: 34px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.select2-selection__choice {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.select2-search select2-search--inline {
|
||||
height: 35px !important;
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
.select2-selection__rendered needsclick {
|
||||
color: red;
|
||||
}
|
||||
.select2-results__option {
|
||||
padding: 5px;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
margin: 0px;
|
||||
}
|
||||
img.navbar-brand-img,
|
||||
.navbar-brand > img {
|
||||
float: left;
|
||||
padding: 5px 5px 5px 0;
|
||||
max-height: 50px;
|
||||
}
|
||||
.input-daterange {
|
||||
border-radius: 0px;
|
||||
.input-daterange,
|
||||
.input-daterange input:first-child,
|
||||
.input-daterange input:last-child {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.btn.bg-maroon,
|
||||
.btn.bg-purple {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"/js/build/app.js": "/js/build/app.js?id=5e9ac5c1a7e089f056fb1dba566193a6",
|
||||
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=f0b08873a06bb54daeee176a9459f4a9",
|
||||
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=f4397c717b99fce41a633ca6edd5d1f4",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=9265dbc8adc38d13abec7f8ff0374dce",
|
||||
"/css/build/app.css": "/css/build/app.css?id=76584ef562c22532ffa84748f18e3a65",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=ebd921b0b5dca37487551bcc7dc934c5",
|
||||
"/css/build/app.css": "/css/build/app.css?id=2b1b6164d02342fcd4cd303fef52e895",
|
||||
"/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=393aaa7b368b0670fc42434c8cca7dc7",
|
||||
@@ -19,7 +19,7 @@
|
||||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374",
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=0640e45bad692dcf62873c6e85904899",
|
||||
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=0978d9f0ba8d47527c248074b757b03d",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=c1cd73524bd82ddb8a4d7e8d1a504506",
|
||||
"/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",
|
||||
|
||||
@@ -500,13 +500,27 @@ body {
|
||||
|
||||
.select2-selection--multiple {
|
||||
border-color: #d2d6de !important;
|
||||
height: 34px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.select2-selection__choice {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
|
||||
.select2-search select2-search--inline {
|
||||
height: 35px !important;
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.select2-results__option {
|
||||
padding: 5px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
img.navbar-brand-img, .navbar-brand>img {
|
||||
float: left;
|
||||
@@ -514,8 +528,8 @@ img.navbar-brand-img, .navbar-brand>img {
|
||||
max-height: 50px;
|
||||
}
|
||||
|
||||
.input-daterange {
|
||||
border-radius: 0px;
|
||||
.input-daterange, .input-daterange input:first-child, .input-daterange input:last-child {
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
|
||||
.btn.bg-maroon, .btn.bg-purple{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
|
||||
'select_language' => 'Select a language',
|
||||
'select_language' => 'Select a Language',
|
||||
'languages' => [
|
||||
'en-US'=> 'English, US',
|
||||
'en-GB'=> 'English, UK',
|
||||
@@ -68,7 +68,7 @@ return [
|
||||
'zu-ZA'=> 'Zulu',
|
||||
],
|
||||
|
||||
'select_country' => 'Select a country',
|
||||
'select_country' => 'Select a Country',
|
||||
|
||||
'countries' => [
|
||||
'AC'=>'Ascension Island',
|
||||
|
||||
@@ -31,7 +31,7 @@ return [
|
||||
'accessory_name' => 'Accessory Name',
|
||||
'additional_notes' => 'Additional Notes',
|
||||
'admin_has_created' => 'An administrator has created an account for you on the :web website.',
|
||||
'asset' => 'Asse:',
|
||||
'asset' => 'Asset',
|
||||
'asset_name' => 'Asset Name',
|
||||
'asset_requested' => 'Asset requested',
|
||||
'asset_tag' => 'Asset Tag',
|
||||
|
||||
@@ -11,7 +11,7 @@ Form::macro('locales', function ($name = 'locale', $selected = null, $class = nu
|
||||
|
||||
$idclause = (!is_null($id)) ? $id : '';
|
||||
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="min-width:100%"'.$idclause.' aria-label="'.$name.'" data-placeholder="'.trans('localizations.select_language').'">';
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="width:100%"'.$idclause.' aria-label="'.$name.'" data-placeholder="'.trans('localizations.select_language').'">';
|
||||
$select .= '<option value="" role="option">'.trans('localizations.select_language').'</option>';
|
||||
|
||||
// Pull the autoglossonym array from the localizations translation file
|
||||
|
||||
6
resources/views/blade/form-error.blade.php
Normal file
6
resources/views/blade/form-error.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
@props(['name'])
|
||||
@error($name)
|
||||
<span class="alert-msg">
|
||||
<x-icon type="x"/> {{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
@@ -999,14 +999,15 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
$(inputElement).closest('.help-block').remove();
|
||||
},
|
||||
onfocusout: function(element) {
|
||||
$(element).closest().removeClass('has-error');
|
||||
return $(element).valid();
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
$.extend($.validator.messages, {
|
||||
required: "{{ trans('validation.generic.required') }}",
|
||||
email: "{{ trans('validation.generic.email') }}"
|
||||
required: '<x-icon type="x"/> {{ trans('validation.generic.required') }}',
|
||||
email: '<x-icon type="x"/> {{ trans('validation.generic.email') }}'
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{ Form::label('address', trans('general.address'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('address', old('address', $item->address), array('class' => 'form-control', 'aria-label'=>'address', 'maxlength'=>'191')) }}
|
||||
{!! $errors->first('address', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="address" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<label class="sr-only " for="address2">{{ trans('general.address') }}</label>
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
{{Form::text('address2', old('address2', $item->address2), array('class' => 'form-control', 'aria-label'=>'address2', 'maxlength'=>'191')) }}
|
||||
{!! $errors->first('address2', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="address2" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{{ Form::label('city', trans('general.city'), array('class' => 'col-md-3 control-label', 'maxlength'=>'191')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('city', old('city', $item->city), array('class' => 'form-control', 'aria-label'=>'city')) }}
|
||||
{!! $errors->first('city', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="city" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{{ Form::label('state', trans('general.state'), array('class' => 'col-md-3 control-label', 'maxlength'=>'191')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('state', old('state', $item->state), array('class' => 'form-control', 'aria-label'=>'state')) }}
|
||||
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="state" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="col-md-7">
|
||||
{!! Form::countries('country', old('country', $item->country), 'select2') !!}
|
||||
<p class="help-block">{{ trans('general.countries_manually_entered_help') }}</p>
|
||||
{!! $errors->first('country', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="country" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,6 +44,6 @@
|
||||
{{ Form::label('zip', trans('general.zip'), array('class' => 'col-md-3 control-label', 'maxlength'=>'10')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('zip', old('zip', $item->zip), array('class' => 'form-control')) }}
|
||||
{!! $errors->first('zip', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="zip" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
<option value="{{ $category_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
{{ (\App\Models\Category::find($category_id)) ? \App\Models\Category::find($category_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="" role="option">{{ trans('general.select_category') }}</option>
|
||||
@endif
|
||||
|
||||
</select>
|
||||
@@ -24,7 +22,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
|
||||
{!! $errors->first('category_type', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
<x-form-error name="category_type" />
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="category_id" class="col-md-3 control-label">{{ trans('general.category') }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'category_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('category_id', $category_list , old('category_id', $item->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('category_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="category_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ (\App\Models\Company::find($company_id)) ? \App\Models\Company::find($company_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="" role="option">{{ trans('general.select_company') }}</option>
|
||||
{!! (!isset($multiple) || ($multiple=='false')) ? '<option value="" role="option">'.trans('general.select_company').'</option>' : '' !!}
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
@@ -20,18 +20,18 @@
|
||||
<!-- 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-6">
|
||||
<div class="col-md-7">
|
||||
<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">
|
||||
{{ (\App\Models\Company::find($company_id)) ? \App\Models\Company::find($company_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="">{{ trans('general.select_company') }}</option>
|
||||
{!! (!isset($multiple) || ($multiple=='false')) ? '<option value="" role="option">'.trans('general.select_company').'</option>' : '' !!}
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@if (\App\Models\Company::isCurrentUserAuthorized())
|
||||
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 control-label">
|
||||
{{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label', 'for' => 'company_id')) }}
|
||||
<x-form-error name="company_id" />
|
||||
</div>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'company_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('company_id', $company_list , old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="company_id" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="{{ $fieldname }}" id="{{ $fieldname }}" value="{{ old($fieldname, ($item->{$fieldname}) ? date('Y-m-d', strtotime($item->{$fieldname})) : '') }}" readonly style="background-color:inherit" maxlength="10">
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,13 +8,9 @@
|
||||
<option value="{{ $department_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
{{ (\App\Models\Department::find($department_id)) ? \App\Models\Department::find($department_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="" role="option">{{ trans('general.select_department') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="depreciation_id" class="col-md-3 control-label">{{ trans('general.depreciation') }}</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('depreciation_id', $depreciation_list , old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:350px', 'aria-label'=>'depreciation_id')) }}
|
||||
{!! $errors->first('depreciation_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="depreciation_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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')) }}
|
||||
{!! $errors->first('email', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
{{ Form::text('email', old('email', $item->email), array('class' => 'form-control', 'type' => 'email')) }}
|
||||
<x-form-error name="email" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="asset_eol_date" id="asset_eol_date" readonly value="{{ old('asset_eol_date', optional($item->asset_eol_date)->format('Y-m-d') ?? $item->asset_eol_date ?? '') }}" style="background-color:inherit" />
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
</div>
|
||||
{!! $errors->first('asset_eol_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="asset_eol_date" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
{{ Form::label('fax', trans('admin/suppliers/table.fax'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('fax', old('fax', $item->fax), array('class' => 'form-control')) }}
|
||||
{!! $errors->first('fax', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="fax" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<img src="{{ Storage::disk('public')->url($image_path.e($item->{($fieldname ?? 'image')})) }}" class="img-responsive">
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
<x-form-error name="image_delete" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -34,9 +34,8 @@
|
||||
|
||||
<p class="help-block" id="uploadFile-status">{{ trans('general.image_filetypes_help', ['size' => Helper::file_upload_max_size_readable()]) }} {{ $help_text ?? '' }}</p>
|
||||
|
||||
<x-form-error name="image" />
|
||||
|
||||
|
||||
{!! $errors->first('image', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-3" aria-hidden="true">
|
||||
<img id="uploadFile-imagePreview" style="max-width: 300px; display: none;" alt="{{ trans('general.alt_uploaded_image_thumbnail') }}">
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="item_no" class="col-md-3 control-label">{{ trans('admin/consumables/general.item_no') }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'item_no')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="item_no" id="item_no" value="{{ old('item_no', $item->item_no) }}" />
|
||||
{!! $errors->first('item_no', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="item_no" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{!! $errors->first('location_id', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name="location_id" />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
<option value="{{ $location_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
{{ (\App\Models\Location::find($location_id)) ? \App\Models\Location::find($location_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="" role="option">{{ trans('general.select_location') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
@@ -22,7 +20,7 @@
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
@if (isset($help_text))
|
||||
<div class="col-md-7 col-sm-11 col-md-offset-3">
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="location_id" class="col-md-3 control-label">{{ trans('general.location') }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'location_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('location_id', $location_list , old('location_id', $item->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('location_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="location_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
</label>
|
||||
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'asset_maintenance_type')) ? ' required' : '' }}">
|
||||
{{ Form::select('asset_maintenance_type', $assetMaintenanceType , old('asset_maintenance_type', $item->asset_maintenance_type), ['class'=>'select2', 'style'=>'min-width:350px', 'aria-label'=>'asset_maintenance_type']) }}
|
||||
{!! $errors->first('asset_maintenance_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="asset_maintenance_type" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ (\App\Models\Manufacturer::find($manufacturer_id)) ? \App\Models\Manufacturer::find($manufacturer_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="" role="option">{{ trans('general.select_manufacturer') }}</option>
|
||||
{!! (!isset($multiple) || ($multiple=='false')) ? '<option value="" role="option">'.trans('general.select_manufacturer').'</option>' : '' !!}
|
||||
@endif
|
||||
|
||||
</select>
|
||||
@@ -23,7 +23,5 @@
|
||||
@endif
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="manufacturer_id" class="col-md-3 control-label">{{ trans('general.manufacturer') }}</label>
|
||||
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'manufacturer_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('manufacturer_id', $manufacturer_list , old('manufacturer_id', $item->manufacturer_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('manufacturer_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="manufacturer_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
{!! $errors->first('min_amt', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="min_amt" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
<option value="{{ $model_id }}" selected="selected">
|
||||
{{ (\App\Models\AssetModel::find($model_id)) ? \App\Models\AssetModel::find($model_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="" role="option">{{ trans('general.select_model') }}</option>
|
||||
@endif
|
||||
|
||||
</select>
|
||||
@@ -26,5 +24,5 @@
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="model_number" class="col-md-3 control-label">{{ trans('general.model_no') }}</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="model_number" aria-label="model_number" id="model_number" value="{{ old('model_number', $item->model_number) }}" />
|
||||
{!! $errors->first('model_number', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="model_number" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<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' : '' !!} />
|
||||
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (Helper::checkIfRequired($item, 'name')) ? ' required' : '' !!}/>
|
||||
<x-form-error name="name" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
<textarea class="col-md-6 form-control" id="notes" aria-label="notes" name="notes" style="min-width:100%;">{{ old('notes', $item->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="notes" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="order_number" class="col-md-3 control-label">{{ trans('general.order_number') }}</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
<input class="form-control" type="text" name="order_number" aria-label="order_number" id="order_number" value="{{ old('order_number', $item->order_number) }}" />
|
||||
{!! $errors->first('order_number', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="order_number" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
{{ Form::label('phone', trans('admin/suppliers/table.phone'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('phone', old('phone', $item->phone), array('class' => 'form-control', 'aria-label'=>'phone')) }}
|
||||
{!! $errors->first('phone', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="phone" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-9" style="padding-left: 0px;">
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="purchase_cost" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}" style="background-color:inherit">
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
</div>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="purchase_date" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<input class="form-control" maxlength="5" type="text" name="qty" aria-label="qty" id="qty" value="{{ old('qty', $item->qty) }}" {!! (Helper::checkIfRequired($item, 'qty')) ? ' required ' : '' !!}/>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-left:0px">
|
||||
{!! $errors->first('qty', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="qty" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<label for="{{ $fieldname }}" class="col-md-3 control-label">{{ trans('admin/hardware/form.serial') }} </label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'serial')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="{{ $fieldname }}" id="{{ $fieldname }}" value="{{ old((isset($old_val_name) ? $old_val_name : $fieldname), $item->serial) }}" />
|
||||
{!! $errors->first('serial', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="serial" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
<option value="{{ $status_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
{{ (\App\Models\Statuslabel::find($status_id)) ? \App\Models\Statuslabel::find($status_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="" role="option">{{ trans('general.select_status') }}</option>
|
||||
@endif
|
||||
|
||||
</select>
|
||||
@@ -24,6 +22,5 @@
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
|
||||
<div class="col-md-7 col-sm-11{{ (Helper::checkIfRequired($item, 'status_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('status_id', $statuslabel_list , old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id', 'required' => 'required')) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="status_id" />
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2 text-left">
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
<option value="{{ $supplier_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
{{ (\App\Models\Supplier::find($supplier_id)) ? \App\Models\Supplier::find($supplier_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="" role="option">{{ trans('general.select_supplier') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
@@ -22,6 +20,6 @@
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />) !!}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<label for="supplier_id" class="col-md-3 control-label">{{ trans('general.supplier') }}</label>
|
||||
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'supplier_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('supplier_id', $supplier_list , old('supplier_id', $item->supplier_id), ['class'=>'select2', 'style'=>'min-width:350px', 'id' => 'supplier_select_id']) }}
|
||||
{!! $errors->first('supplier_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="supplier_id" />
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
<span class='label label-default' id="{{ $logoId }}-info"></span>
|
||||
|
||||
{!! $errors->first($logoVariable, '<span class="alert-msg">:message</span>') !!}
|
||||
|
||||
<x-form-error name=":$logoVariable" />
|
||||
|
||||
<p class="help-block" style="!important" id="{{ $logoId }}-status">
|
||||
{{ $helpBlock }}
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<span class="input-group-addon">{{ trans('admin/hardware/form.months') }}</span>
|
||||
</div>
|
||||
<div class="col-md-9" style="padding-left: 0px;">
|
||||
{!! $errors->first('warranty_months', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="warranty_months" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -278,15 +278,60 @@
|
||||
|
||||
<br>
|
||||
|
||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'),'multiple' => 'true', 'fieldname' => 'by_company_id[]', 'hide_new' => 'true'])
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'multiple' => 'true', 'fieldname' => 'by_location_id[]', 'hide_new' => 'true'])
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/hardware/form.default_location'), 'multiple' => 'true', 'fieldname' => 'by_rtd_location_id[]', 'hide_new' => 'true'])
|
||||
@include ('partials.forms.edit.department-select', ['translated_name' => trans('general.department'), 'fieldname' => 'by_dept_id', 'hide_new' => 'true'])
|
||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'by_supplier_id[]', 'multiple' => 'true', 'hide_new' => 'true'])
|
||||
@include ('partials.forms.edit.model-select', ['translated_name' => trans('general.asset_model'), 'fieldname' => 'by_model_id[]', 'multiple' => 'true', 'hide_new' => 'true'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'by_manufacturer_id', 'hide_new' => 'true'])
|
||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'by_category_id', 'hide_new' => 'true', 'category_type' => 'asset'])
|
||||
@include ('partials.forms.edit.status-select', ['translated_name' => trans('admin/hardware/form.status'), 'fieldname' => 'by_status_id[]', 'multiple' => 'true', 'hide_new' => 'true'])
|
||||
@include ('partials.forms.edit.company-select', [
|
||||
'translated_name' => trans('general.company'),
|
||||
'fieldname' =>
|
||||
'by_company_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true'
|
||||
])
|
||||
@include ('partials.forms.edit.location-select', [
|
||||
'translated_name' => trans('general.location'),
|
||||
'fieldname' => 'by_location_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true'
|
||||
])
|
||||
@include ('partials.forms.edit.location-select', [
|
||||
'translated_name' => trans('admin/hardware/form.default_location'),
|
||||
'fieldname' => 'by_rtd_location_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true'
|
||||
])
|
||||
@include ('partials.forms.edit.department-select',[
|
||||
'translated_name' => trans('general.department'),
|
||||
'fieldname' => 'by_dept_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true'
|
||||
])
|
||||
@include ('partials.forms.edit.supplier-select', [
|
||||
'translated_name' => trans('general.supplier'),
|
||||
'fieldname' => 'by_supplier_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true'
|
||||
])
|
||||
@include ('partials.forms.edit.model-select', [
|
||||
'translated_name' => trans('general.asset_model'),
|
||||
'fieldname' => 'by_model_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true'
|
||||
])
|
||||
@include ('partials.forms.edit.manufacturer-select', [
|
||||
'translated_name' => trans('general.manufacturer'),
|
||||
'fieldname' => 'by_manufacturer_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true'
|
||||
])
|
||||
@include ('partials.forms.edit.category-select', [
|
||||
'translated_name' => trans('general.category'),
|
||||
'fieldname' => 'by_category_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true', 'category_type' => 'asset'
|
||||
])
|
||||
@include ('partials.forms.edit.status-select', [
|
||||
'translated_name' => trans('admin/hardware/form.status'),
|
||||
'fieldname' => 'by_status_id[]',
|
||||
'multiple' => 'true',
|
||||
'hide_new' => 'true'])
|
||||
|
||||
<!-- Order Number -->
|
||||
<div class="form-group">
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<form class="form-horizontal" method="post" autocomplete="off"
|
||||
<form class="form-horizontal" method="post" autocomplete="off" id="create-form"
|
||||
action="{{ (isset($user->id)) ? route('users.update', ['user' => $user->id]) : route('users.store') }}"
|
||||
enctype="multipart/form-data" id="userForm">
|
||||
{{csrf_field()}}
|
||||
@@ -89,8 +89,8 @@
|
||||
<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>') !!}
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ old('first_name', $user->first_name) }}" maxlength="191" required="required" />
|
||||
<x-form-error name="first_name" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<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>') !!}
|
||||
<x-form-error name="last_name" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
value="{{ old('username', $user->username) }}"
|
||||
autocomplete="off"
|
||||
maxlength="191"
|
||||
{{ (Helper::checkIfRequired($user, 'username')) ? ' required="required"' : '' }}
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
@@ -137,11 +138,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($errors->first('username'))
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
{!! $errors->first('username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
@endif
|
||||
<x-form-error name="username" />
|
||||
|
||||
</div>
|
||||
|
||||
@@ -167,7 +164,7 @@
|
||||
{{ trans('general.managed_ldap') }}
|
||||
@endif
|
||||
<span id="generated-password"></span>
|
||||
{!! $errors->first('password', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<x-form-error name="password" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@if ($user->ldap_import!='1')
|
||||
@@ -200,7 +197,7 @@
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
{!! $errors->first('password_confirmation', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<x-form-error name="password_confirmation" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -244,7 +241,7 @@
|
||||
<div class="col-md-6{{ (Helper::checkIfRequired($user, 'email')) ? ' required' : '' }}">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
type="email"
|
||||
name="email"
|
||||
id="email"
|
||||
maxlength="191"
|
||||
@@ -254,9 +251,9 @@
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');">
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
{!! $errors->first('email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<x-form-error name="email" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -307,7 +304,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-9">
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user