Updated blade selectors

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-29 18:31:34 +01:00
parent 37d04b7176
commit 231bc1e2de
11 changed files with 8 additions and 20 deletions

View file

@ -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',

View file

@ -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

View file

@ -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>

View file

@ -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,14 +20,14 @@
<!-- 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>

View file

@ -8,8 +8,6 @@
<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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -307,7 +307,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>