fix lang bug
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
<div class="modal-content" id="print_form_data">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">
|
||||
{{ucFirst($form_data->form->name)}}
|
||||
@if(!empty($form_data->submittedBy))
|
||||
{{ ucFirst($form_data->form->name) }}
|
||||
@if (!empty($form_data->submittedBy))
|
||||
<small>
|
||||
(
|
||||
<b>@lang('messages.submitted_by'): </b>
|
||||
{{$form_data->submittedBy->name}}
|
||||
<b>@lang('messages.submitted_by'): </b>
|
||||
{{ $form_data->submittedBy->name }}
|
||||
)
|
||||
</small>
|
||||
@endif
|
||||
@@ -23,9 +23,11 @@
|
||||
<div class="modal-body">
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-6">
|
||||
@if(isset($form_data->form->schema['settings']['form_submision_ref']['is_enabled']) && $form_data->form->schema['settings']['form_submision_ref']['is_enabled'] && !empty($form_data->submission_ref))
|
||||
<b>@lang('messages.submission_numbering'):</b>
|
||||
{{$form_data->submission_ref}}
|
||||
@if (isset($form_data->form->schema['settings']['form_submision_ref']['is_enabled']) &&
|
||||
$form_data->form->schema['settings']['form_submision_ref']['is_enabled'] &&
|
||||
!empty($form_data->submission_ref))
|
||||
<b>@lang('messages.submission_numbering'):</b>
|
||||
{{ $form_data->submission_ref }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,42 +39,49 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($form_data->form->schema['form'] as $element)
|
||||
@foreach ($form_data->form->schema['form'] as $element)
|
||||
@isset($form_data->data[$element['name']])
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{$element['label']}}</strong>
|
||||
</td>
|
||||
<td>
|
||||
@if($element['type'] == 'file_upload')
|
||||
|
||||
@include('form_data.file_view', ['form_upload' => $form_data->data[$element['name']]])
|
||||
@elseif($element['type'] == 'signature')
|
||||
@if(!empty($form_data->data[$element['name']]))
|
||||
<a target="_blank" href="{{$form_data->data[$element['name']]}}"
|
||||
download="Signature">
|
||||
<img src="{{$form_data->data[$element['name']]}}" class="signature">
|
||||
</a>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>
|
||||
@if (in_array(session()->get('locale'), ['ru', 'est']) && isset($element['label_' . session()->get('locale')]))
|
||||
{{ $element['label_' . session()->get('locale')] }}
|
||||
@else
|
||||
{{ $element['label'] }}
|
||||
@endif
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
@if ($element['type'] == 'file_upload')
|
||||
@include('form_data.file_view', [
|
||||
'form_upload' => $form_data->data[$element['name']],
|
||||
])
|
||||
@elseif($element['type'] == 'signature')
|
||||
@if (!empty($form_data->data[$element['name']]))
|
||||
<a target="_blank" href="{{ $form_data->data[$element['name']] }}"
|
||||
download="Signature">
|
||||
<img src="{{ $form_data->data[$element['name']] }}" class="signature">
|
||||
</a>
|
||||
@endif
|
||||
@elseif(is_array($form_data->data[$element['name']]) && $element['type'] != 'file_upload')
|
||||
{{ implode(', ', $form_data->data[$element['name']]) }}
|
||||
@else
|
||||
{!! nl2br($form_data->data[$element['name']]) !!}
|
||||
@endif
|
||||
@elseif(is_array($form_data->data[$element['name']]) && $element['type'] != 'file_upload')
|
||||
|
||||
{{implode(', ', $form_data->data[$element['name']])}}
|
||||
|
||||
@else
|
||||
{!! nl2br($form_data->data[$element['name']]) !!}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
@endisset
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="no-print mt-4">
|
||||
<hr>
|
||||
<form id="add_comment_form" action="{{action([\App\Http\Controllers\FormDataCommentController::class, 'store'])}}" method="POST">
|
||||
<form id="add_comment_form"
|
||||
action="{{ action([\App\Http\Controllers\FormDataCommentController::class, 'store']) }}"
|
||||
method="POST">
|
||||
{{ csrf_field() }}
|
||||
<!-- hiden fields -->
|
||||
<input type="hidden" name="form_data_id" id="form_data_id" value="{{$form_data->id}}">
|
||||
<input type="hidden" name="form_data_id" id="form_data_id" value="{{ $form_data->id }}">
|
||||
<div class="form-group">
|
||||
<label for="comment">
|
||||
@lang('messages.comment'):
|
||||
@@ -104,10 +113,11 @@
|
||||
<i class="fas fa-print"></i>
|
||||
@lang('messages.print')
|
||||
</button>
|
||||
<a class="btn float-right btn-primary btn-sm m-1" target="_blank" href="{{action([\App\Http\Controllers\FormDataController::class, 'downloadPdf'], [$form_data->id])}}">
|
||||
<a class="btn float-right btn-primary btn-sm m-1" target="_blank"
|
||||
href="{{ action([\App\Http\Controllers\FormDataController::class, 'downloadPdf'], [$form_data->id]) }}">
|
||||
<i class="far fa-file-pdf" aria-hidden="true"></i>
|
||||
@lang('messages.download_pdf')
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user