A free open source IT asset/license management system
Display validation error for report name
Marcus Mooreb2d0cbb2643a
diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.phpindex 9b569f5baa..8e49672184 100644--- a/resources/views/reports/custom.blade.php+++ b/resources/views/reports/custom.blade.php@@ -420,22 +420,11 @@<div class="col-md-2">@if (! request()->routeIs('report-templates.edit'))- <div style=padding-bottom:5px>- <form method="post" id="savetemplateform" action="{{ route("report-templates.store") }}">- @csrf- <input type="hidden" id="savetemplateform" name="options">- <input type="text" id="name" name="name" value="{{ $reportTemplate->name }}" style="width: 100%; margin-bottom: 5px; height: 34px"> {{--this means that the name of a loaded report is in the input box. could lead to confusion with update--}}- <button class="btn btn-primary" style="width: 100%">- {{ trans('admin/reports/general.save_template') }}- </button>- </form>- </div>-<div style=padding-bottom:5px><selectid="saved_report_select"class="form-control select2"- data-placeholder={{ trans('admin/reports/general.saved_reports') }}+ data-placeholder="{{ trans('admin/reports/general.saved_reports') }}"data-allow-clear="true"><option></option>@@ -458,6 +447,21 @@</script>@endpush</div>+ <div style=padding-bottom:5px>+ <form method="post" id="savetemplateform" action="{{ route("report-templates.store") }}">+ @csrf+ <input type="hidden" id="savetemplateform" name="options">+ <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">+ {{--this means that the name of a loaded report is in the input box. could lead to confusion with update--}}+ <label for="name">Name</label>+ <input class="form-control" placeholder="" name="name" type="text" id="name" value="{{ $reportTemplate->name }}">+ {!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}+ </div>+ <button class="btn btn-primary" style="width: 100%">+ {{ trans('admin/reports/general.save_template') }}+ </button>+ </form>+ </div>@endif</div></div>