Skip to content

Commit d871c52

Browse files
committed
fix input max, and help block position
1 parent 7c2c5ea commit d871c52

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

app/Http/Controllers/SettingsController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use App\Http\Requests\StoreSecuritySettings;
1515
use App\Models\CustomField;
1616
use App\Models\Group;
17+
use App\Models\Labels\Label as LabelModel;
1718
use App\Models\Setting;
1819
use App\Models\Asset;
1920
use App\Models\User;
@@ -750,6 +751,7 @@ public function getLabels() : View
750751
return view('settings.labels')
751752
->with('setting', Setting::getSettings())
752753
->with('is_gd_installed', $is_gd_installed)
754+
->with('template', LabelModel::find(Setting::getSettings()->label2_template))
753755
->with('customFields', CustomField::where('field_encrypted', '=', 0)->get());
754756
}
755757

resources/views/settings/labels.blade.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -313,26 +313,24 @@ class="col-md-4"
313313
<p class="help-block">{{ trans('admin/settings/general.label2_2d_target_help') }}</p>
314314
</div>
315315
</div>
316-
<!-- Title -->
316+
<!-- Field offset -->
317317
<div class="form-group{{ $errors->has('label2_empty_row_count') ? ' has-error' : '' }}">
318318
<div class="col-md-3 text-right">
319-
<label for="label2_empty_row_count" class="control-label">{{trans('admin/settings/general.empty_row_count')}}</label>
319+
<label for="label2_empty_row_count" class="control-label">{{ trans('admin/settings/general.empty_row_count') }}</label>
320320
</div>
321-
<div class="form-group row">
322-
<div class="col-md-2">
321+
<div class="col-md-9">
323322
<input
324-
class="form-control"
323+
class="form-control col-md-2"
325324
aria-label="Empty Row Count"
326325
name="label2_empty_row_count"
327326
type="number"
328327
id="label2_empty_row_count"
329328
min="0"
330-
value="{{ old('label2_empty_row_count', $setting->label2_empty_row_count) }}">
331-
</div>
332-
<div class="col-md-7">
333-
{!! $errors->first('empty_row_count', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
334-
<p class="help-block">{!! trans('admin/settings/general.empty_row_count_help') !!}</p>
335-
</div>
329+
max="{{ $template->getSupportFields() }}"
330+
value="{{ old('label2_empty_row_count', $setting->label2_empty_row_count) }}"
331+
>
332+
{!! $errors->first('label2_empty_row_count', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
333+
<p class="help-block">{!! trans('admin/settings/general.empty_row_count_help') !!}</p>
336334
</div>
337335
</div>
338336
<div class="col-md-9 col-md-offset-3" style="margin-bottom: 10px;">

0 commit comments

Comments
 (0)