fix lang bug
This commit is contained in:
parent
a46ec03369
commit
157a5a1939
@ -16,7 +16,8 @@
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#printSection, #printSection * {
|
#printSection,
|
||||||
|
#printSection * {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,11 +54,13 @@
|
|||||||
|
|
||||||
<form action="{{ @route('form-data.show', ['id' => $form->id]) }}" class="form row mt-3 mx-2 mb-0">
|
<form action="{{ @route('form-data.show', ['id' => $form->id]) }}" class="form row mt-3 mx-2 mb-0">
|
||||||
<div class="form-group mb-0 col-1">
|
<div class="form-group mb-0 col-1">
|
||||||
<input type="date" class="form-control" name="start_date" value="{{ request()->get('start_date') ?? \Carbon\Carbon::now()->subDays(7)->toDateString() }}">
|
<input type="date" class="form-control" name="start_date"
|
||||||
|
value="{{ request()->get('start_date') ?? \Carbon\Carbon::now()->subDays(7)->toDateString() }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group mb-0 col-1">
|
<div class="form-group mb-0 col-1">
|
||||||
<input type="date" class="form-control" name="end_date" value="{{ request()->get('end_date') ?? \Carbon\Carbon::now()->toDateString() }}">
|
<input type="date" class="form-control" name="end_date"
|
||||||
|
value="{{ request()->get('end_date') ?? \Carbon\Carbon::now()->toDateString() }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group mb-0 col-2 d-flex">
|
<div class="form-group mb-0 col-2 d-flex">
|
||||||
@ -67,7 +70,10 @@
|
|||||||
|
|
||||||
@php
|
@php
|
||||||
$is_enabled_sub_ref_no = false;
|
$is_enabled_sub_ref_no = false;
|
||||||
if(isset($form->schema['settings']['form_submision_ref']['is_enabled']) && $form->schema['settings']['form_submision_ref']['is_enabled']) {
|
if (
|
||||||
|
isset($form->schema['settings']['form_submision_ref']['is_enabled']) &&
|
||||||
|
$form->schema['settings']['form_submision_ref']['is_enabled']
|
||||||
|
) {
|
||||||
$is_enabled_sub_ref_no = true;
|
$is_enabled_sub_ref_no = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +99,12 @@
|
|||||||
@foreach ($schema as $element)
|
@foreach ($schema as $element)
|
||||||
@if (in_array($element['name'], $col_visible))
|
@if (in_array($element['name'], $col_visible))
|
||||||
<th>
|
<th>
|
||||||
|
{{-- $element['label'] --}}
|
||||||
|
@if (in_array(session()->get('locale'), ['ru', 'est']) && isset($element['label_' . session()->get('locale')]))
|
||||||
|
{{ $element['label_' . session()->get('locale')] }}
|
||||||
|
@else
|
||||||
{{ $element['label'] }}
|
{{ $element['label'] }}
|
||||||
|
@endif
|
||||||
</th>
|
</th>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@ -107,7 +118,8 @@
|
|||||||
@if (auth()->user()->hasRole([\App\Enums\User\RoleEnum::SUPERVISOR->value, \App\Enums\User\RoleEnum::ADMIN->value], 'web'))
|
@if (auth()->user()->hasRole([\App\Enums\User\RoleEnum::SUPERVISOR->value, \App\Enums\User\RoleEnum::ADMIN->value], 'web'))
|
||||||
<td>
|
<td>
|
||||||
@if (in_array('view', $btn_enabled))
|
@if (in_array('view', $btn_enabled))
|
||||||
<button type="button" class="btn btn-info btn-sm view_form_data m-1"
|
<button type="button"
|
||||||
|
class="btn btn-info btn-sm view_form_data m-1"
|
||||||
data-href="{{ action([\App\Http\Controllers\FormDataController::class, 'viewData'], [$row->id]) }}"
|
data-href="{{ action([\App\Http\Controllers\FormDataController::class, 'viewData'], [$row->id]) }}"
|
||||||
data-toggle="modal">
|
data-toggle="modal">
|
||||||
<i class="fa fa-eye" aria-hidden="true"></i>
|
<i class="fa fa-eye" aria-hidden="true"></i>
|
||||||
@ -146,8 +158,10 @@
|
|||||||
<td>
|
<td>
|
||||||
@isset($row->data[$row_element['name']])
|
@isset($row->data[$row_element['name']])
|
||||||
@if ($row_element['type'] == 'file_upload')
|
@if ($row_element['type'] == 'file_upload')
|
||||||
|
@include('form_data.file_view', [
|
||||||
@include('form_data.file_view', ['form_upload' => $row->data[$row_element['name']]])
|
'form_upload' =>
|
||||||
|
$row->data[$row_element['name']],
|
||||||
|
])
|
||||||
@elseif($row_element['type'] == 'signature')
|
@elseif($row_element['type'] == 'signature')
|
||||||
@if (!empty($row->data[$row_element['name']]))
|
@if (!empty($row->data[$row_element['name']]))
|
||||||
<a target="_blank"
|
<a target="_blank"
|
||||||
@ -162,7 +176,6 @@
|
|||||||
@else
|
@else
|
||||||
{!! nl2br($row->data[$row_element['name']]) !!}
|
{!! nl2br($row->data[$row_element['name']]) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@endisset
|
@endisset
|
||||||
</td>
|
</td>
|
||||||
@endif
|
@endif
|
||||||
|
@ -23,7 +23,9 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-md-6">
|
<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))
|
@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>
|
<b>@lang('messages.submission_numbering'):</b>
|
||||||
{{ $form_data->submission_ref }}
|
{{ $form_data->submission_ref }}
|
||||||
@endif
|
@endif
|
||||||
@ -41,12 +43,19 @@
|
|||||||
@isset($form_data->data[$element['name']])
|
@isset($form_data->data[$element['name']])
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<strong>{{$element['label']}}</strong>
|
<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>
|
||||||
<td>
|
<td>
|
||||||
@if ($element['type'] == 'file_upload')
|
@if ($element['type'] == 'file_upload')
|
||||||
|
@include('form_data.file_view', [
|
||||||
@include('form_data.file_view', ['form_upload' => $form_data->data[$element['name']]])
|
'form_upload' => $form_data->data[$element['name']],
|
||||||
|
])
|
||||||
@elseif($element['type'] == 'signature')
|
@elseif($element['type'] == 'signature')
|
||||||
@if (!empty($form_data->data[$element['name']]))
|
@if (!empty($form_data->data[$element['name']]))
|
||||||
<a target="_blank" href="{{ $form_data->data[$element['name']] }}"
|
<a target="_blank" href="{{ $form_data->data[$element['name']] }}"
|
||||||
@ -55,9 +64,7 @@
|
|||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@elseif(is_array($form_data->data[$element['name']]) && $element['type'] != 'file_upload')
|
@elseif(is_array($form_data->data[$element['name']]) && $element['type'] != 'file_upload')
|
||||||
|
|
||||||
{{ implode(', ', $form_data->data[$element['name']]) }}
|
{{ implode(', ', $form_data->data[$element['name']]) }}
|
||||||
|
|
||||||
@else
|
@else
|
||||||
{!! nl2br($form_data->data[$element['name']]) !!}
|
{!! nl2br($form_data->data[$element['name']]) !!}
|
||||||
@endif
|
@endif
|
||||||
@ -69,7 +76,9 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="no-print mt-4">
|
<div class="no-print mt-4">
|
||||||
<hr>
|
<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() }}
|
{{ csrf_field() }}
|
||||||
<!-- hiden fields -->
|
<!-- 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 }}">
|
||||||
@ -104,7 +113,8 @@
|
|||||||
<i class="fas fa-print"></i>
|
<i class="fas fa-print"></i>
|
||||||
@lang('messages.print')
|
@lang('messages.print')
|
||||||
</button>
|
</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>
|
<i class="far fa-file-pdf" aria-hidden="true"></i>
|
||||||
@lang('messages.download_pdf')
|
@lang('messages.download_pdf')
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user