standardizing naming to use Template

This commit is contained in:
akemidx 2024-01-11 19:41:19 -05:00
parent d72970b5b6
commit 20bd83232e
3 changed files with 14 additions and 15 deletions

View file

@ -7,10 +7,10 @@ return [
'reminder_sent' => 'Reminder sent', 'reminder_sent' => 'Reminder sent',
'acceptance_deleted' => 'Acceptance request deleted', 'acceptance_deleted' => 'Acceptance request deleted',
'acceptance_request' => 'Acceptance request', 'acceptance_request' => 'Acceptance request',
'saved_reports' => 'Saved Reports', 'saved_templates' => 'Saved Templates',
'save_template' => 'Save Template', 'save_template' => 'Save Template',
'apply_template' => 'Apply Template', 'apply_template' => 'Apply Template',
'generate_template' => 'Generate Template', 'generate_template' => 'Generate Template',
'apply_and_generate' => 'Apply and Generate', 'apply_and_generate' => 'Apply and Generate',
'report_name' => 'Enter Report Name', 'template_name' => 'Enter Template Name',
]; ];

View file

@ -3,13 +3,13 @@
return array( return array(
'error' => 'You must select at least ONE option.', 'error' => 'You must select at least ONE option.',
'no_report_permission' => 'Template does not exist or you do not have permission to view it.', 'no_report_permission' => 'Template does not exist or you do not have permission to view it.',
'about_reports' => 'About Saved Reports', 'about_templates' => 'About Saved Templates',
'saving_reports_description' => 'Select your options, then enter the name of your report in the box above and click the \'Save Template\' button. Use the dropdown to select a previously saved report.', 'saving_templates_description' => 'Select your options, then enter the name of your template in the box above and click the \'Save Template\' button. Use the dropdown to select a previously saved template.',
'create' => [ 'create' => [
'success' => 'Report saved successfully', 'success' => 'Template saved successfully',
'needs_title' => 'Report title can not be blank.', 'needs_title' => 'Template title can not be blank.',
'duplicate' => 'Report title already exists. Please choose a different one.', 'duplicate' => 'Template title already exists. Please choose a different one.',
], ],
'delete' => [ 'delete' => [

View file

@ -452,16 +452,16 @@
{{ Form::close() }} {{ Form::close() }}
</div> </div>
<!-- Saved Reports right column -->
<div class="col-md-2"> <div class="col-md-2">
@if (! request()->routeIs('report-templates.edit')) @if (! request()->routeIs('report-templates.edit'))
<div class="form-group"> <div class="form-group">
<label for="saved_report_select">{{ trans('admin/reports/general.saved_reports') }}</label> <label for="saved_report_select">{{ trans('admin/reports/general.saved_templates') }}</label>
<select <select
id="saved_report_select" id="saved_report_select"
class="form-control select2" class="form-control select2"
data-placeholder="{{ trans('admin/reports/general.saved_reports') }}" data-placeholder="{{ trans('admin/reports/general.saved_templates') }}"
data-allow-clear="true" data-allow-clear="true">
>
<option></option> <option></option>
@foreach($report_templates as $template) @foreach($report_templates as $template)
<option value="{{ $template->id }}" @if (request()->route()->parameter('reportId') == $template->id) selected @endif> <option value="{{ $template->id }}" @if (request()->route()->parameter('reportId') == $template->id) selected @endif>
@ -478,8 +478,7 @@
@csrf @csrf
<input type="hidden" id="savetemplateform" name="options"> <input type="hidden" id="savetemplateform" name="options">
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}"> <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">{{ trans('admin/reports/general.template_name') }}</label>
<label for="name">{{ trans('admin/reports/general.report_name') }}</label>
<input class="form-control" placeholder="" name="name" type="text" id="name" value="{{ $reportTemplate->name }}"> <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>') !!} {!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div> </div>
@ -490,10 +489,10 @@
</div> </div>
<div class="box box-success"> <div class="box box-success">
<div class="box-header with-border"> <div class="box-header with-border">
<h4>{{ trans('admin/reports/message.about_reports') }}</h4> <h4>{{ trans('admin/reports/message.about_templates') }}</h4>
</div> </div>
<div class="box-body"> <div class="box-body">
<p>{!! trans('admin/reports/message.saving_reports_description') !!}</p> <p>{!! trans('admin/reports/message.saving_templates_description') !!}</p>
</div> </div>
</div> </div>
@endif @endif