Merge white label fix

This commit is contained in:
Hillel Coren 2017-03-21 15:42:12 +02:00
parent ccb87c8d60
commit 754f11cb51
2 changed files with 12 additions and 10 deletions

View File

@ -41,6 +41,7 @@ class SaveClientPortalSettings extends Request
$input['client_view_css'] = HTMLUtils::sanitize($this->client_view_css);
}
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);
@ -51,6 +52,7 @@ class SaveClientPortalSettings extends Request
$input['iframe_url'] = rtrim($iframeURL, '/');
$input['subdomain'] = null;
}
}
$this->replace($input);

View File

@ -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() {