1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Merge "Buy now" button "Payment" landing page does not work with iframe client portal

This commit is contained in:
Hillel Coren 2018-04-15 22:29:20 +03:00
parent d4cd12fdf1
commit e55e9977d4
2 changed files with 6 additions and 4 deletions

View File

@ -42,7 +42,7 @@ trait Inviteable
} }
if ($iframe_url && ! $forceOnsite) { if ($iframe_url && ! $forceOnsite) {
return "{$iframe_url}?{$this->invitation_key}"; return "{$iframe_url}?{$this->invitation_key}/{$type}";
} elseif ($this->account->subdomain && ! $forcePlain) { } elseif ($this->account->subdomain && ! $forcePlain) {
$url = Utils::replaceSubdomain($url, $account->subdomain); $url = Utils::replaceSubdomain($url, $account->subdomain);
} }

View File

@ -345,11 +345,13 @@
<p>{{ trans('texts.iframe_url_help1') }}</p> <p>{{ trans('texts.iframe_url_help1') }}</p>
<pre>&lt;center&gt; <pre>&lt;center&gt;
&lt;iframe id="invoiceIFrame" width="100%" height="1200" style="max-width:1000px"&gt;&lt;/iframe&gt; &lt;iframe id="invoiceIFrame" width="100%" height="1200" style="max-width:1000px"&gt;&lt;/iframe&gt;
&lt;center&gt; &lt;/center&gt;
&lt;script language="javascript"&gt; &lt;script language="javascript"&gt;
var iframe = document.getElementById('invoiceIFrame'); var iframe = document.getElementById('invoiceIFrame');
iframe.src = '{{ rtrim(SITE_URL ,'/') }}/view/' var search = window.location.search + '//';
+ window.location.search.substring(1, 33); var silent = search.indexOf('silent') > 0;
var parts = search.replace('?silent=true', '').split('/');
iframe.src = '{{ rtrim(SITE_URL ,'/') }}/' + parts[1] + '/' + parts[0].substring(1, 33) + '/' + parts[2] + (silent ? '?silent=true' : '');
&lt;/script&gt;</pre> &lt;/script&gt;</pre>
<p>{{ trans('texts.iframe_url_help2') }}</p> <p>{{ trans('texts.iframe_url_help2') }}</p>
<p><b>{{ trans('texts.iframe_url_help3') }}</b></p> <p><b>{{ trans('texts.iframe_url_help3') }}</b></p>