mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for contact login
This commit is contained in:
parent
17e787f816
commit
5fdb5a61dc
@ -47,8 +47,12 @@ class ContactLoginController extends Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$company && strpos($request->getHost(), 'invoicing.co') !== false) {
|
if($company){
|
||||||
|
$account = $company->account;
|
||||||
|
}
|
||||||
|
elseif (!$company && strpos($request->getHost(), 'invoicing.co') !== false) {
|
||||||
$subdomain = explode('.', $request->getHost())[0];
|
$subdomain = explode('.', $request->getHost())[0];
|
||||||
|
nlog("subdomain = {$subdomain}");
|
||||||
|
|
||||||
MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]);
|
MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]);
|
||||||
|
|
||||||
|
@ -110,14 +110,14 @@
|
|||||||
document.getElementById('handlePlanChange').addEventListener('click', function() {
|
document.getElementById('handlePlanChange').addEventListener('click', function() {
|
||||||
|
|
||||||
if(document.getElementById("newPlan").value.length > 1)
|
if(document.getElementById("newPlan").value.length > 1)
|
||||||
location.href = 'http://devhosted.test:8000/client/subscriptions/{{ $current_recurring_id }}/plan_switch/' + document.getElementById("newPlan").value + '';
|
location.href = 'https://invoiceninja.invoicing.co/client/subscriptions/{{ $current_recurring_id }}/plan_switch/' + document.getElementById("newPlan").value + '';
|
||||||
|
|
||||||
});
|
});
|
||||||
@else
|
@else
|
||||||
document.getElementById('handleNewPlan').addEventListener('click', function() {
|
document.getElementById('handleNewPlan').addEventListener('click', function() {
|
||||||
|
|
||||||
if(document.getElementById("newPlan").value.length > 1)
|
if(document.getElementById("newPlan").value.length > 1)
|
||||||
location.href = 'http://devhosted.test:8000/client/subscriptions/' + document.getElementById("newPlan").value + '/purchase';
|
location.href = 'https://invoiceninja.invoicing.co/client/subscriptions/' + document.getElementById("newPlan").value + '/purchase';
|
||||||
|
|
||||||
});
|
});
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user