1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 23:22:52 +01:00
invoiceninja/resources/views/invited/proposal.blade.php

39 lines
1.2 KiB
PHP
Raw Normal View History

2018-02-08 08:39:19 +01:00
@extends('public.header')
@section('content')
<script type="text/javascript">
function onApproveClick() {
$('#approveButton').prop('disabled', true);
2018-02-11 15:08:13 +01:00
location.href = "{{ url('/approve/' . $invoiceInvitation->invitation_key) }}";
2018-02-08 08:39:19 +01:00
}
function resizeIframe(obj) {
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
}
2018-02-08 09:59:39 +01:00
$(function() {
2018-02-11 19:03:48 +01:00
var content = {!! json_encode($proposal->present()->htmlDocument) !!};
2018-02-08 09:59:39 +01:00
var iFrame = document.getElementById('proposalIframe').contentWindow.document;
iFrame.write(content);
iFrame.close();
})
2018-02-08 08:39:19 +01:00
</script>
2018-02-14 10:15:24 +01:00
<div class="container" style="padding: 20px;">
<div class="pull-right">
{!! Button::normal(trans('texts.download'))->asLinkTo(url("/proposal/{$proposalInvitation->invitation_key}/download"))->large() !!}
@if (! $proposal->invoice->isApproved())
{!! Button::success(trans('texts.approve'))->withAttributes(['id' => 'approveButton', 'onclick' => 'onApproveClick()'])->large() !!}
@endif
</div>
<div class="clearfix"></div><br/>
<iframe id="proposalIframe" scrolling="no" onload="resizeIframe(this)" frameborder="0" width="100%"
style="background-color:white; border: solid 1px #DDD;"></iframe>
</div>
2018-02-08 08:39:19 +01:00
@stop