Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace calls to Form::text #16082

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
6 changes: 3 additions & 3 deletions resources/views/custom_fields/fields/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{{ trans('admin/custom_fields/general.field_name') }}
</label>
<div class="col-md-8 required">
{{ Form::text('name', old('name', $field->name), array('class' => 'form-control', 'aria-label'=>'name')) }}
<input class="form-control" aria-label="name" name="name" type="text" value="{{ old('name', $field->name) }}">
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
Expand Down Expand Up @@ -98,7 +98,7 @@
{{ trans('admin/custom_fields/general.field_custom_format') }}
</label>
<div class="col-md-8 required">
{{ Form::text('custom_format', old('custom_format', (($field->format!='') && (stripos($field->format,'regex')===0)) ? $field->format : ''), array('class' => 'form-control', 'id' => 'custom_format','aria-label'=>'custom_format', 'placeholder'=>'regex:/^[0-9]{15}$/')) }}
<input class="form-control" id="custom_format" aria-label="custom_format" placeholder="regex:/^[0-9]{15}$/" name="custom_format" type="text" value="{{ old('custom_format', (($field->format!='') && (stripos($field->format,'regex')===0)) ? $field->format : '') }}">
<p class="help-block">{!! trans('admin/custom_fields/general.field_custom_format_help') !!}</p>

{!! $errors->first('custom_format', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
Expand All @@ -112,7 +112,7 @@
{{ trans('admin/custom_fields/general.help_text') }}
</label>
<div class="col-md-8">
{{ Form::text('help_text', old('help_text', $field->help_text), array('class' => 'form-control', 'aria-label'=>'help_text')) }}
<input class="form-control" aria-label="help_text" name="help_text" type="text" value=" {{ old('help_text', $field->help_text) }}">
<p class="help-block">{{ trans('admin/custom_fields/general.help_text_description') }}</p>
{!! $errors->first('help_text', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/custom_fields/fieldsets/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</div>

<div class="form-group" style="display: none;">
{{ Form::text('order', $maxid, array('aria-label'=>'order', 'maxlength'=>'3', 'size'=>'3')) }}
<input aria-label="order" maxlength="3" size="3" name="order" type="text" value="{{ $maxid }}">
<label for="order">{{ trans('admin/custom_fields/general.order') }}</label>
</div>

Expand Down
10 changes: 5 additions & 5 deletions resources/views/partials/forms/edit/address.blade.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<div class="form-group {{ $errors->has('address') ? ' has-error' : '' }}">
{{ 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')) }}
<input class="form-control" aria-label="address" maxlength="191" name="address" type="text" id="address" value="{{ old('address', $item->address) }}">
{!! $errors->first('address', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>

<div class="form-group {{ $errors->has('address2') ? ' has-error' : '' }}">
<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')) }}
<input class="form-control" aria-label="address2" maxlength="191" name="address2" type="text" value="{{ old('address2', $item->address2) }}">
{!! $errors->first('address2', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>

<div class="form-group {{ $errors->has('city') ? ' has-error' : '' }}">
{{ Form::label('city', trans('general.city'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7">
{{Form::text('city', old('city', $item->city), array('class' => 'form-control', 'aria-label'=>'city', 'maxlength'=>'191')) }}
<input class="form-control" aria-label="city" maxlength="191" name="city" type="text" id="city" value="{{ old('city', $item->city) }}">
{!! $errors->first('city', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>

<div class="form-group {{ $errors->has('state') ? ' has-error' : '' }}">
{{ Form::label('state', trans('general.state'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7">
{{Form::text('state', old('state', $item->state), array('class' => 'form-control', 'aria-label'=>'state', 'maxlength'=>'191')) }}
<input class="form-control" aria-label="state" maxlength="191" name="state" type="text" id="state" value="{{ old('state', $item->state) }}">
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}

</div>
Expand All @@ -43,7 +43,7 @@
<div class="form-group {{ $errors->has('zip') ? ' has-error' : '' }}">
{{ 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')) }}
<input class="form-control" name="zip" type="text" id="zip" value="{{ old('zip', $item->zip) }}">
{!! $errors->first('zip', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
2 changes: 1 addition & 1 deletion resources/views/partials/forms/edit/phone.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="form-group {{ $errors->has('phone') ? ' has-error' : '' }}">
{{ 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', 'maxlength'=>'191')) }}
<input class="form-control" aria-label="phone" maxlength="191" name="phone" type="text" id="phone" value="{{ old('phone', $item->phone) }}">
{!! $errors->first('phone', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
10 changes: 5 additions & 5 deletions resources/views/settings/alerts.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
{{ Form::label('alert_interval', trans('admin/settings/general.alert_interval')) }}
</div>
<div class="col-md-9">
{{ Form::text('alert_interval', old('alert_interval', $setting->alert_interval), array('class' => 'form-control','placeholder' => '30', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
<input class="form-control" placeholder="30" maxlength="3" style="width: 60px;" name="alert_interval" type="text" value="{{ old('alert_interval', $setting->alert_interval) }}" id="alert_interval">
{!! $errors->first('alert_interval', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
Expand All @@ -109,7 +109,7 @@
{{ Form::label('alert_threshold', trans('admin/settings/general.alert_inv_threshold')) }}
</div>
<div class="col-md-9">
{{ Form::text('alert_threshold', old('alert_threshold', $setting->alert_threshold), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
<input class="form-control" placeholder="5" maxlength="3" style="width: 60px;" name="alert_threshold" type="text" value="{{ old('alert_threshold', $setting->alert_threshold) }}" id="alert_threshold">
{!! $errors->first('alert_threshold', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
Expand All @@ -121,7 +121,7 @@
{{ Form::label('audit_interval', trans('admin/settings/general.audit_interval')) }}
</div>
<div class="input-group col-md-3">
{{ Form::text('audit_interval', old('audit_interval', $setting->audit_interval), array('class' => 'form-control','placeholder' => '12', 'maxlength'=>'3')) }}
<input class="form-control" placeholder="12" maxlength="3" name="audit_interval" type="text" id="audit_interval" value="{{ old('audit_interval', $setting->audit_interval) }}">
<span class="input-group-addon">{{ trans('general.months') }}</span>
</div>
<div class="col-md-9 col-md-offset-3">
Expand All @@ -136,7 +136,7 @@
{{ Form::label('audit_warning_days', trans('admin/settings/general.audit_warning_days')) }}
</div>
<div class="input-group col-md-3">
{{ Form::text('audit_warning_days', old('audit_warning_days', $setting->audit_warning_days), array('class' => 'form-control','placeholder' => '14', 'maxlength'=>'3')) }}
<input class="form-control" placeholder="14" maxlength="3" name="audit_warning_days" type="text" id="audit_warning_days" value="{{ old('audit_warning_days', $setting->audit_warning_days) }}">
<span class="input-group-addon">{{ trans('general.days') }}</span>
</div>
<div class="col-md-9 col-md-offset-3">
Expand All @@ -151,7 +151,7 @@
{{ Form::label('due_checkin_days', trans('admin/settings/general.due_checkin_days')) }}
</div>
<div class="input-group col-md-3">
{{ Form::text('due_checkin_days', old('due_checkin_days', $setting->due_checkin_days), array('class' => 'form-control','placeholder' => '14', 'maxlength'=>'3')) }}
<input class="form-control" placeholder="14" maxlength="3" name="due_checkin_days" type="text" id="due_checkin_days" value="{{ old('due_checkin_days', $setting->due_checkin_days) }}">
<span class="input-group-addon">{{ trans('general.days') }}</span>
</div>
<div class="col-md-9 col-md-offset-3">
Expand Down
8 changes: 4 additions & 4 deletions resources/views/settings/asset_tags.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{{ Form::label('next_auto_tag_base', trans('admin/settings/general.next_auto_tag_base')) }}
</div>
<div class="col-md-7">
{{ Form::text('next_auto_tag_base', old('next_auto_tag_base', $setting->next_auto_tag_base), array('class' => 'form-control', 'style'=>'width: 150px;', 'aria-label'=>'next_auto_tag_base')) }}
<input class="form-control" style="width: 150px;" aria-label="next_auto_tag_base" name="next_auto_tag_base" type="text" value="{{ old('next_auto_tag_base', $setting->next_auto_tag_base) }}" id="next_auto_tag_base">
{!! $errors->first('next_auto_tag_base', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
Expand All @@ -71,10 +71,10 @@
</div>
<div class="col-md-7">
@if ($setting->auto_increment_assets == 1)
{{ Form::text('auto_increment_prefix', old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'style'=>'width: 150px;', 'aria-label'=>'auto_increment_prefix')) }}
<input class="form-control" style="width: 150px;" aria-label="auto_increment_prefix" name="auto_increment_prefix" type="text" id="auto_increment_prefix" value="{{ old('auto_increment_prefix', $setting->auto_increment_prefix) }}">
{!! $errors->first('auto_increment_prefix', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@else
{{ Form::text('auto_increment_prefix', old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'disabled'=>'disabled', 'style'=>'width: 150px;', 'aria-label'=>'auto_increment_prefix')) }}
<input class="form-control" disabled="disabled" style="width: 150px;" aria-label="auto_increment_prefix" name="auto_increment_prefix" type="text" id="auto_increment_prefix" value="{{ old('auto_increment_prefix', $setting->auto_increment_prefix) }}">
@endif
</div>
</div>
Expand All @@ -85,7 +85,7 @@
{{ Form::label('zerofill_count', trans('admin/settings/general.zerofill_count')) }}
</div>
<div class="col-md-7">
{{ Form::text('zerofill_count', old('zerofill_count', $setting->zerofill_count), array('class' => 'form-control', 'style'=>'width: 150px;', 'aria-label'=>'zerofill_count')) }}
<input class="form-control" style="width: 150px;" aria-label="zerofill_count" name="zerofill_count" type="text" value="{{ old('zerofill_count', $setting->zerofill_count) }}" id="zerofill_count">
{!! $errors->first('zerofill_count', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions resources/views/settings/branding.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@
</div>
<div class="col-md-7 required">
@if (config('app.lock_passwords')===true)
{{ Form::text('site_name', old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Snipe-IT Asset Management')) }}
<input class="form-control" disabled="disabled" placeholder="Snipe-IT Asset Management" name="site_name" type="text" value="{{ old('site_name', $setting->site_name) }}" id="site_name">
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{{ Form::text('site_name',
old('site_name', $setting->site_name), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management', 'required' => 'required')) }}
<input class="form-control" placeholder="Snipe-IT Asset Management" required="required" name="site_name" type="text" value="{{ old('site_name', $setting->site_name) }}" id="site_name">
@endif
{!! $errors->first('site_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
Expand Down Expand Up @@ -192,7 +191,7 @@
</div>
<div class="col-md-2">
<div class="input-group header-color">
{{ Form::text('header_color', old('header_color', $setting->header_color), array('class' => 'form-control', 'style' => 'width: 100px;','placeholder' => '#FF0000', 'aria-label'=>'header_color')) }}
<input class="form-control" style="width: 100px;" placeholder="#FF0000" aria-label="header_color" name="header_color" type="text" id="header_color" value="{{ old('header_color', $setting->header_color) }}">
<div class="input-group-addon">
<i></i>
</div>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/settings/general.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
{{ Form::label('email_domain', trans('general.email_domain')) }}
</div>
<div class="col-md-9">
{{ Form::text('email_domain', old('email_domain', $setting->email_domain), array('class' => 'form-control','placeholder' => 'example.com')) }}
<input class="form-control" placeholder="example.com" name="email_domain" type="text" value="{{ old('email_domain', $setting->email_domain) }}" id="email_domain">
<span class="help-block">{{ trans('general.email_domain_help') }}</span>
{!! $errors->first('email_domain', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
Expand Down Expand Up @@ -185,7 +185,7 @@
{{ Form::label('per_page', trans('admin/settings/general.per_page')) }}
</div>
<div class="col-md-9">
{{ Form::text('per_page', old('per_page', $setting->per_page), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
<input class="form-control" placeholder="5" maxlength="3" style="width: 60px;" name="per_page" type="text" value="{{ old('per_page', $setting->per_page) }}" id="per_page">
{!! $errors->first('per_page', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
Expand All @@ -196,7 +196,7 @@
{{ Form::label('thumbnail_max_h', trans('admin/settings/general.thumbnail_max_h')) }}
</div>
<div class="col-md-9">
{{ Form::text('thumbnail_max_h', old('thumbnail_max_h', $setting->thumbnail_max_h), array('class' => 'form-control','placeholder' => '50', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
<input class="form-control" placeholder="50" maxlength="3" style="width: 60px;" name="thumbnail_max_h" type="text" value="{{ old('thumbnail_max_h', $setting->thumbnail_max_h) }}" id="thumbnail_max_h">
<p class="help-block">{{ trans('admin/settings/general.thumbnail_max_h_help') }}</p>
{!! $errors->first('thumbnail_max_h', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
Expand Down Expand Up @@ -388,9 +388,9 @@
</div>
<div class="col-md-9">
@if (config('app.lock_passwords'))
{{ Form::text('privacy_policy_link', old('privacy_policy_link', $setting->privacy_policy_link), array('class' => 'form-control disabled', 'disabled' => 'disabled')) }}
<input class="form-control disabled" disabled="disabled" name="privacy_policy_link" type="text" id="privacy_policy_link" value="{{ old('privacy_policy_link', $setting->privacy_policy_link) }}">
@else
{{ Form::text('privacy_policy_link', old('privacy_policy_link', $setting->privacy_policy_link), array('class' => 'form-control')) }}
<input class="form-control" name="privacy_policy_link" type="text" id="privacy_policy_link" value="{{ old('privacy_policy_link', $setting->privacy_policy_link) }}">

@endif

Expand Down
Loading
Loading