Small formatting fixes

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-05-19 17:53:30 -07:00
parent ad8143b0bd
commit bd384d3f10
4 changed files with 19 additions and 22 deletions

View file

@ -113,11 +113,12 @@ class AcceptanceController extends Controller
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
$sig_filename = '';
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
$display_model = '';
$pdf_view_route = '';
$pdf_filename = 'accepted-eula-'.date('Y-m-d-h-i-s').'.pdf';
$sig_filename='';
if ($request->input('asset_acceptance') == 'accepted') {
@ -160,7 +161,7 @@ class AcceptanceController extends Controller
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format($branding_settings->date_display_format),
'assigned_to' => $assigned_to,
'company_name' => $branding_settings->site_name,
'signature' => '',
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
'logo' => public_path() . '/uploads/' . $branding_settings->logo,
'date_settings' => $branding_settings->date_display_format,
];

View file

@ -7,12 +7,13 @@
<style>
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
}
</style>
</head>
<body>
@if ($signature)
@if ($logo)
<center>
<img src="{{ $logo }}">
<p>{{$company_name}}</p>
@ -22,10 +23,8 @@
<p>
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
{{ trans('general.asset_tag') }}: {{ $item_tag }}<br>
{{ trans('general.asset_model') }}: {{ $item_model }}<br>
{{ trans('general.serial') }}: {{ $item_serial }}</p>
</p>
@if ($eula)
<hr>
@ -36,15 +35,13 @@
<p>
Assigned on: {{$check_out_date}}<br>
Assigned to: {{$assigned_to}}
Assigned to: {{$assigned_to}}<br>
Accepted on: {{$accepted_date}}
</p>
@if ($signature)
<div style="width: 60%; float:left">
<img src="{{ $signature }}" style="max-width: 100%; border-bottom: black solid 1px;"><br>
{{ trans('general.signature') }}: {{$accepted_date}}
</div>
@if ($signature!='')
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
@endif
</body>
</html>

View file

@ -25,7 +25,8 @@
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
{{ trans('general.asset_tag') }}: {{ $item_tag }}<br>
{{ trans('general.asset_model') }}: {{ $item_model }}<br>
{{ trans('admin/hardware/form.serial') }}: {{ $item_serial }}</p>
{{ trans('admin/hardware/form.serial') }}: {{ $item_serial }}
</p>
@if ($eula)
@ -37,15 +38,13 @@
<p>
Assigned on: {{$check_out_date}}<br>
Assigned to: {{$assigned_to}}
Assigned to: {{$assigned_to}}<br>
Accepted on: {{$accepted_date}}
</p>
@if ($signature)
<div style="width: 60%; float:left">
<img src="{{ $signature }}" style="max-width: 100%; border-bottom: black solid 1px;"><br>
{{ trans('general.signature') }}: {{$accepted_date}}
</div>
@if ($signature!='')
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
@endif
</body>
</html>

View file

@ -46,14 +46,14 @@
<div class="col-md-12">
<div class="radio">
<label>
<input type="radio" name="asset_acceptance" id="accepted" value="accepted">
<input type="radio" name="asset_acceptance" id="accepted" value="accepted" class="minimal">
{{ trans('general.i_accept') }}
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="asset_acceptance" id="declined" value="declined">
<input type="radio" name="asset_acceptance" id="declined" value="declined" class="minimal">
{{ trans('general.i_decline') }}
</label>
</div>
@ -77,7 +77,7 @@
<input type="hidden" name="signature_output" id="signature_output">
</div>
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12 text-center">
<button type="button" class="btn btn-sm btn-default clear" data-action="clear" id="clear_button">{{ trans('general.clear_signature') }}</button>
<button type="button" class="btn btn-sm btn-primary clear" data-action="clear" id="clear_button">{{ trans('general.clear_signature') }}</button>
</div>
</div>
</div> <!-- .col-md-12.text-center-->