mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge white label fix
This commit is contained in:
parent
ccb87c8d60
commit
754f11cb51
@ -41,15 +41,17 @@ class SaveClientPortalSettings extends Request
|
||||
$input['client_view_css'] = HTMLUtils::sanitize($this->client_view_css);
|
||||
}
|
||||
|
||||
if ($this->custom_link == 'subdomain') {
|
||||
$subdomain = substr(strtolower($input['subdomain']), 0, MAX_SUBDOMAIN_LENGTH);
|
||||
$input['subdomain'] = preg_replace('/[^a-zA-Z0-9_\-\.]/', '', $subdomain);
|
||||
$input['iframe_url'] = null;
|
||||
} else {
|
||||
$iframeURL = substr(strtolower($input['iframe_url']), 0, MAX_IFRAME_URL_LENGTH);
|
||||
$iframeURL = preg_replace('/[^a-zA-Z0-9_\-\:\/\.]/', '', $iframeURL);
|
||||
$input['iframe_url'] = rtrim($iframeURL, '/');
|
||||
$input['subdomain'] = null;
|
||||
if (Utils::isNinja()) {
|
||||
if ($this->custom_link == 'subdomain') {
|
||||
$subdomain = substr(strtolower($input['subdomain']), 0, MAX_SUBDOMAIN_LENGTH);
|
||||
$input['subdomain'] = preg_replace('/[^a-zA-Z0-9_\-\.]/', '', $subdomain);
|
||||
$input['iframe_url'] = null;
|
||||
} else {
|
||||
$iframeURL = substr(strtolower($input['iframe_url']), 0, MAX_IFRAME_URL_LENGTH);
|
||||
$iframeURL = preg_replace('/[^a-zA-Z0-9_\-\:\/\.]/', '', $iframeURL);
|
||||
$input['iframe_url'] = rtrim($iframeURL, '/');
|
||||
$input['subdomain'] = null;
|
||||
}
|
||||
}
|
||||
|
||||
$this->replace($input);
|
||||
|
@ -84,7 +84,7 @@
|
||||
}
|
||||
|
||||
function buyProduct(affiliateKey, productId) {
|
||||
window.open('{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/buy_now/?account_key=AsFmBAeLXF0IKf7tmi0eiyZfmWW9hxMT&product_id=' + productId + '&contact_key={{ Auth::user()->primaryAccount()->account_key }}' + '&redirect_url=' + window.location);
|
||||
window.open('{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/buy_now/?account_key={{ NINJA_LICENSE_ACCOUNT_KEY }}&product_id=' + productId + '&contact_key={{ Auth::user()->primaryAccount()->account_key }}' + '&redirect_url=' + window.location.href);
|
||||
}
|
||||
|
||||
function showApplyLicense() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user