mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Shortening pro plan process
This commit is contained in:
parent
80d0d7693a
commit
f0a52a1bf7
@ -123,13 +123,13 @@
|
||||
->addOption(trans('texts.plan_free'), PLAN_FREE)!!}
|
||||
@else
|
||||
{!! Former::select('plan')
|
||||
->addOption(trans('texts.plan_enterprise'), PLAN_ENTERPRISE)
|
||||
->addOption(trans('texts.plan_pro'), PLAN_PRO)!!}
|
||||
->addOption(trans('texts.plan_pro'), PLAN_PRO)
|
||||
->addOption(trans('texts.plan_enterprise'), PLAN_ENTERPRISE) !!}
|
||||
@endif
|
||||
{!! Former::select('plan_term')
|
||||
->addOption(trans('texts.plan_term_yearly'), PLAN_TERM_YEARLY)
|
||||
->addOption(trans('texts.plan_term_monthly'), PLAN_TERM_MONTHLY)
|
||||
->inlineHelp(trans('texts.enterprise_plan_features', ['link' => link_to(NINJA_WEB_URL . '/plans-pricing', trans('texts.click_here'), ['target' => '_blank'])])) !!}
|
||||
->addOption(trans('texts.plan_term_yearly'), PLAN_TERM_YEARLY)
|
||||
->inlineHelp(trans('texts.enterprise_plan_features', ['link' => link_to(NINJA_WEB_URL . '/plans-pricing', trans('texts.click_here'), ['target' => '_blank'])])) !!}
|
||||
</div>
|
||||
<div class="modal-footer" style="margin-top: 0px">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.go_back') }}</button>
|
||||
|
@ -1,7 +1,7 @@
|
||||
@if (!Utils::isPro() && isset($advanced) && $advanced)
|
||||
<div class="alert alert-warning" style="font-size:larger;">
|
||||
<center>
|
||||
{!! trans('texts.pro_plan_advanced_settings', ['link'=>'<a href="#" onclick="showProPlan(\''.$selected.'\')">'.trans('texts.pro_plan_remove_logo_link').'</a>']) !!}
|
||||
{!! trans('texts.pro_plan_advanced_settings', ['link'=>link_to('/settings/account_management?upgrade=true', trans('texts.pro_plan_remove_logo_link'))]) !!}
|
||||
</center>
|
||||
</div>
|
||||
@endif
|
||||
|
@ -169,41 +169,10 @@
|
||||
$('#signUpModal').modal('hide');
|
||||
}
|
||||
|
||||
NINJA.proPlanFeature = '';
|
||||
function showProPlan(feature) {
|
||||
$('#proPlanModal').modal('show');
|
||||
fbq('track', 'InitiateCheckout');
|
||||
trackEvent('/account', '/show_pro_plan/' + feature);
|
||||
NINJA.proPlanFeature = feature;
|
||||
}
|
||||
|
||||
function hideProPlan() {
|
||||
$('#proPlanModal').modal('hide');
|
||||
}
|
||||
|
||||
function buyProduct(affiliateKey, productId) {
|
||||
window.open('{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/license?affiliate_key=' + affiliateKey + '&product_id=' + productId + '&return_url=' + window.location);
|
||||
}
|
||||
|
||||
@if (Auth::check() && (!Auth::user()->isPro() || Auth::user()->isTrial()))
|
||||
function submitProPlan() {
|
||||
fbq('track', 'AddPaymentInfo');
|
||||
trackEvent('/account', '/submit_pro_plan/' + NINJA.proPlanFeature);
|
||||
if (NINJA.isRegistered) {
|
||||
if (window.showChangePlan) {
|
||||
$('#proPlanModal').modal('hide');
|
||||
showChangePlan();
|
||||
} else {
|
||||
window.location = '/settings/account_management#changePlanModel';
|
||||
}
|
||||
} else {
|
||||
$('#proPlanModal').modal('hide');
|
||||
$('#go_pro').val('true');
|
||||
showSignUp();
|
||||
}
|
||||
}
|
||||
@endif
|
||||
|
||||
function hideMessage() {
|
||||
$('.alert-info').fadeOut();
|
||||
$.get('/hide_message', function(response) {
|
||||
@ -717,48 +686,6 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (Auth::check() && (!Auth::user()->isPro() || Auth::user()->isTrial()))
|
||||
<div class="modal fade" id="proPlanModal" tabindex="-1" role="dialog" aria-labelledby="proPlanModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog large-dialog">
|
||||
<div class="modal-content pro-plan-modal">
|
||||
|
||||
<div class="pull-right">
|
||||
<img onclick="hideProPlan()" class="close" src="{{ asset('images/pro_plan/close.png') }}"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-7 left-side">
|
||||
<center>
|
||||
<h2>{{ trans('texts.pro_plan_title') }}</h2>
|
||||
<img class="img-responsive price" alt="Only $50 Per Year" src="{{ asset('images/pro_plan/price.png') }}"/>
|
||||
@if (Auth::user()->isEligibleForTrial(PLAN_PRO))
|
||||
<a class="button" href="{{ URL::to('start_trial/'.PLAN_PRO) }}">{{ trans('texts.trial_call_to_action') }}</a>
|
||||
@else
|
||||
<a class="button" href="#" onclick="submitProPlan()">{{ trans('texts.pro_plan_call_to_action') }}</a>
|
||||
@endif
|
||||
</center>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<ul>
|
||||
<li>{{ trans('texts.pro_plan_feature1') }}</li>
|
||||
<li>{{ trans('texts.pro_plan_feature2') }}</li>
|
||||
<li>{{ trans('texts.pro_plan_feature3') }}</li>
|
||||
<li>{{ trans('texts.pro_plan_feature4') }}</li>
|
||||
<li>{{ trans('texts.pro_plan_feature5') }}</li>
|
||||
<li>{{ trans('texts.pro_plan_feature6') }}</li>
|
||||
<li>{{ trans('texts.pro_plan_feature7') }}</li>
|
||||
<li>{{ trans('texts.pro_plan_feature8') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<div class="container">
|
||||
@ -766,7 +693,7 @@
|
||||
@if (Auth::check() && Auth::user()->isTrial())
|
||||
{!! trans(Auth::user()->account->getCountTrialDaysLeft() == 0 ? 'texts.trial_footer_last_day' : 'texts.trial_footer', [
|
||||
'count' => Auth::user()->account->getCountTrialDaysLeft(),
|
||||
'link' => '<a href="javascript:submitProPlan()">' . trans('texts.click_here') . '</a>'
|
||||
'link' => link_to('/settings/account_management?upgrade=true', trans('texts.click_here'))
|
||||
]) !!}
|
||||
@endif
|
||||
@else
|
||||
|
@ -556,7 +556,7 @@
|
||||
|
||||
@if (!Auth::user()->account->isPro())
|
||||
<div style="font-size:larger">
|
||||
{!! trans('texts.pro_plan_remove_logo', ['link'=>'<a href="#" onclick="showProPlan(\'remove_logo\')">'.trans('texts.pro_plan_remove_logo_link').'</a>']) !!}
|
||||
{!! trans('texts.pro_plan_remove_logo', ['link'=>link_to('/settings/account_management?upgrade=true', trans('texts.pro_plan_remove_logo_link'))]) !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
|
||||
|
||||
@if (Utils::isNinjaProd())
|
||||
<button type="button" class="btn btn-primary" onclick="showProPlan('invoice_designs')">{{ trans('texts.go_pro') }}</button>
|
||||
<a class="btn btn-primary" href="{{ url('/settings/account_management?upgrade=true') }}">{{ trans('texts.go_pro') }}</a>
|
||||
@else
|
||||
<button type="button" class="btn btn-primary" onclick="buyProduct('{{ INVOICE_DESIGNS_AFFILIATE_KEY }}', '{{ PRODUCT_INVOICE_DESIGNS }}')">{{ trans('texts.buy') }}</button>
|
||||
@endif
|
||||
|
Loading…
Reference in New Issue
Block a user