mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 22:44:30 -04:00
Working on pro plan
This commit is contained in:
parent
40ee3c8b40
commit
dfd4de33bd
@ -100,6 +100,7 @@ class AccountController extends \BaseController {
|
|||||||
$invitation = new Invitation();
|
$invitation = new Invitation();
|
||||||
$invitation->account_id = $account->id;
|
$invitation->account_id = $account->id;
|
||||||
$invitation->user_id = $account->users()->first()->id;
|
$invitation->user_id = $account->users()->first()->id;
|
||||||
|
$invitation->public_id = $publicId;
|
||||||
$invitation->invoice_id = $invoice->id;
|
$invitation->invoice_id = $invoice->id;
|
||||||
$invitation->contact_id = $client->contacts()->first()->id;
|
$invitation->contact_id = $client->contacts()->first()->id;
|
||||||
$invitation->invitation_key = str_random(RANDOM_KEY_LENGTH);
|
$invitation->invitation_key = str_random(RANDOM_KEY_LENGTH);
|
||||||
@ -134,6 +135,8 @@ class AccountController extends \BaseController {
|
|||||||
$user->password = $random;
|
$user->password = $random;
|
||||||
$user->password_confirmation = $random;
|
$user->password_confirmation = $random;
|
||||||
$user->username = $random;
|
$user->username = $random;
|
||||||
|
$user->first_name = 'Invoice';
|
||||||
|
$user->last_name = 'Ninja';
|
||||||
$user->notify_sent = false;
|
$user->notify_sent = false;
|
||||||
$user->notify_paid = false;
|
$user->notify_paid = false;
|
||||||
$account->users()->save($user);
|
$account->users()->save($user);
|
||||||
|
@ -5,6 +5,8 @@ class PaymentLibrariesSeeder extends Seeder
|
|||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
Eloquent::unguard();
|
||||||
|
|
||||||
$gateways = [
|
$gateways = [
|
||||||
array('name'=>'BeanStream', 'provider'=>'BeanStream', 'payment_library_id' => 2),
|
array('name'=>'BeanStream', 'provider'=>'BeanStream', 'payment_library_id' => 2),
|
||||||
array('name'=>'Psigate', 'provider'=>'Psigate', 'payment_library_id' => 2)
|
array('name'=>'Psigate', 'provider'=>'Psigate', 'payment_library_id' => 2)
|
||||||
|
@ -308,6 +308,6 @@ return array(
|
|||||||
|
|
||||||
'pro_plan_product' => 'Pro Plan',
|
'pro_plan_product' => 'Pro Plan',
|
||||||
'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan',
|
'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan',
|
||||||
'pro_plan_succes' => 'We\'ve sent you an invoice. Once paid the kfeatures will be enabled.',
|
'pro_plan_succes' => 'Thanks for joining! Once the invoice is paid your membership will begin.',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -25,7 +25,7 @@ class Gateway extends Eloquent
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$fields = Payment_Utility::load('config', 'drivers/'.$this->provider);
|
$fields = Payment_Utility::load('config', 'drivers/'.strtolower($this->provider));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($fields == null)
|
if($fields == null)
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
{{ Former::legend('Payment Gateway') }}
|
{{ Former::legend('Payment Gateway') }}
|
||||||
|
|
||||||
{{Former::label('Lorem Ipsum goes here.')}}
|
|
||||||
|
|
||||||
<div class="two-column">
|
<div class="two-column">
|
||||||
{{ Former::radios('recommendedGateway_id')
|
{{ Former::radios('recommendedGateway_id')
|
||||||
->label('Recommended Gateways')
|
->label('Recommended Gateways')
|
||||||
|
@ -455,16 +455,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="background-color: #fff; padding-right:20px;padding-left:20px; display:none" id="proPlanSuccessDiv">
|
<div style="background-color: #fff; padding-right:20px;padding-left:20px; display:none" id="proPlanSuccess">
|
||||||
<br/>
|
<br/>
|
||||||
<h3>{{ trans('texts.success') }}</h3>
|
<h3>{{ trans('texts.success') }}</h3>
|
||||||
{{ trans('texts.pro_plan_succes') }}<br/>
|
{{ trans('texts.pro_plan_succes') }}<br/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-footer" style="margin-top: 0px" id="proPlanFooter">
|
<div class="modal-footer" style="margin-top: 0px" id="proPlanFooter">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
||||||
<button type="button" class="btn btn-primary" data-dismiss="modal" id="proPlanButton" onclick="submitProPlan()">{{ trans('texts.sign_up') }}</button>
|
<button type="button" class="btn btn-primary" id="proPlanButton" onclick="submitProPlan()">{{ trans('texts.sign_up') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -495,7 +494,7 @@
|
|||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: '{{ URL::to('account/go_pro') }}',
|
url: '{{ URL::to('account/go_pro') }}',
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
$('#proPlanSuccessDiv, #proPlanFooter').show();
|
$('#proPlanSuccess, #proPlanFooter').show();
|
||||||
$('#proPlanWorking, #proPlanButton').hide();
|
$('#proPlanWorking, #proPlanButton').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user