mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Minor fixes
This commit is contained in:
parent
5c7a15ff83
commit
706c26b4d5
@ -230,7 +230,7 @@ class AccountController extends BaseController
|
|||||||
Session::flash('message', trans('texts.updated_plan'));
|
Session::flash('message', trans('texts.updated_plan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($new_plan)) {
|
if (!empty($new_plan) && $new_plan['plan'] != PLAN_FREE) {
|
||||||
$invitation = $this->accountRepo->enablePlan($new_plan['plan'], $new_plan['term'], $credit, !empty($pending_monthly));
|
$invitation = $this->accountRepo->enablePlan($new_plan['plan'], $new_plan['term'], $credit, !empty($pending_monthly));
|
||||||
return Redirect::to('view/'.$invitation->invitation_key);
|
return Redirect::to('view/'.$invitation->invitation_key);
|
||||||
}
|
}
|
||||||
@ -1333,12 +1333,14 @@ class AccountController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$account = Auth::user()->account;
|
$account = Auth::user()->account;
|
||||||
|
$invitation = $invoice->invitations->first();
|
||||||
|
|
||||||
// replace the variables with sample data
|
// replace the variables with sample data
|
||||||
$data = [
|
$data = [
|
||||||
'account' => $account,
|
'account' => $account,
|
||||||
'invoice' => $invoice,
|
'invoice' => $invoice,
|
||||||
'invitation' => $invoice->invitations->first(),
|
'invitation' => $invitation,
|
||||||
|
'link' => $invitation->getLink(),
|
||||||
'client' => $invoice->client,
|
'client' => $invoice->client,
|
||||||
'amount' => $invoice->amount
|
'amount' => $invoice->amount
|
||||||
];
|
];
|
||||||
|
@ -40,6 +40,13 @@ class AccountGatewayController extends BaseController
|
|||||||
return $this->accountGatewayService->getDatatable(Auth::user()->account_id);
|
return $this->accountGatewayService->getDatatable(Auth::user()->account_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function show($publicId)
|
||||||
|
{
|
||||||
|
Session::reflash();
|
||||||
|
|
||||||
|
return Redirect::to("gateways/$publicId/edit");
|
||||||
|
}
|
||||||
|
|
||||||
public function edit($publicId)
|
public function edit($publicId)
|
||||||
{
|
{
|
||||||
$accountGateway = AccountGateway::scope($publicId)->firstOrFail();
|
$accountGateway = AccountGateway::scope($publicId)->firstOrFail();
|
||||||
|
@ -328,7 +328,9 @@ Route::get('/forgot', function() {
|
|||||||
Route::get('/feed', function() {
|
Route::get('/feed', function() {
|
||||||
return Redirect::to(NINJA_WEB_URL.'/feed', 301);
|
return Redirect::to(NINJA_WEB_URL.'/feed', 301);
|
||||||
});
|
});
|
||||||
|
Route::get('/comments/feed', function() {
|
||||||
|
return Redirect::to(NINJA_WEB_URL.'/comments/feed', 301);
|
||||||
|
});
|
||||||
|
|
||||||
if (!defined('CONTACT_EMAIL')) {
|
if (!defined('CONTACT_EMAIL')) {
|
||||||
define('CONTACT_EMAIL', Config::get('mail.from.address'));
|
define('CONTACT_EMAIL', Config::get('mail.from.address'));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@extends('header')
|
@extends('header')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@parent
|
@parent
|
||||||
|
|
||||||
@include('accounts.nav', ['selected' => ACCOUNT_MANAGEMENT])
|
@include('accounts.nav', ['selected' => ACCOUNT_MANAGEMENT])
|
||||||
@ -134,10 +134,10 @@
|
|||||||
<div class="modal-footer" style="margin-top: 0px">
|
<div class="modal-footer" style="margin-top: 0px">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.go_back') }}</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.go_back') }}</button>
|
||||||
@if ($planDetails && $planDetails['active'])
|
@if ($planDetails && $planDetails['active'])
|
||||||
<button type="button" class="btn btn-primary" onclick="confirmChangePlan()">{{ trans('texts.plan_change') }}</button>
|
<button type="button" class="btn btn-primary" onclick="confirmChangePlan()">{{ trans('texts.plan_change') }}</button>
|
||||||
@else
|
@else
|
||||||
<button type="button" class="btn btn-success" onclick="confirmChangePlan()">{{ trans('texts.plan_upgrade') }}</button>
|
<button type="button" class="btn btn-success" onclick="confirmChangePlan()">{{ trans('texts.plan_upgrade') }}</button>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -165,12 +165,12 @@
|
|||||||
|
|
||||||
<div style="background-color: #fff; padding-left: 16px; padding-right: 16px">
|
<div style="background-color: #fff; padding-left: 16px; padding-right: 16px">
|
||||||
<p>{{ trans('texts.cancel_account_message') }}</p>
|
<p>{{ trans('texts.cancel_account_message') }}</p>
|
||||||
<p>{!! Former::textarea('reason')->placeholder(trans('texts.reason_for_canceling'))->raw() !!}</p>
|
<p>{!! Former::textarea('reason')->placeholder(trans('texts.reason_for_canceling'))->raw() !!}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer" style="margin-top: 0px">
|
<div class="modal-footer" style="margin-top: 0px">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.go_back') }}</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.go_back') }}</button>
|
||||||
<button type="button" class="btn btn-danger" onclick="confirmCancel()">{{ trans('texts.cancel_account') }}</button>
|
<button type="button" class="btn btn-danger" onclick="confirmCancel()">{{ trans('texts.cancel_account') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -182,7 +182,7 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function showChangePlan() {
|
function showChangePlan() {
|
||||||
$('#changePlanModel').modal('show');
|
$('#changePlanModel').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmChangePlan() {
|
function confirmChangePlan() {
|
||||||
@ -190,13 +190,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showConfirm() {
|
function showConfirm() {
|
||||||
$('#confirmCancelModal').modal('show');
|
$('#confirmCancelModal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmCancel() {
|
function confirmCancel() {
|
||||||
$('form.cancel-account').submit();
|
$('form.cancel-account').submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ($account->company->pending_plan)
|
@if ($account->company->pending_plan)
|
||||||
function cancelPendingChange(){
|
function cancelPendingChange(){
|
||||||
$('#plan').val('{{ $planDetails['plan'] }}')
|
$('#plan').val('{{ $planDetails['plan'] }}')
|
||||||
@ -205,12 +205,12 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
function updatePlanModal() {
|
function updatePlanModal() {
|
||||||
var plan = $('#plan').val();
|
var plan = $('#plan').val();
|
||||||
$('#plan_term').closest('.form-group').toggle(plan!='free');
|
$('#plan_term').closest('.form-group').toggle(plan!='free');
|
||||||
|
|
||||||
if(plan=='{{PLAN_PRO}}'){
|
if(plan=='{{PLAN_PRO}}'){
|
||||||
$('#plan_term option[value=month]').text({!! json_encode(trans('texts.plan_price_monthly', ['price'=>PLAN_PRICE_PRO_MONTHLY])) !!});
|
$('#plan_term option[value=month]').text({!! json_encode(trans('texts.plan_price_monthly', ['price'=>PLAN_PRICE_PRO_MONTHLY])) !!});
|
||||||
$('#plan_term option[value=year]').text({!! json_encode(trans('texts.plan_price_yearly', ['price'=>PLAN_PRICE_PRO_YEARLY])) !!});
|
$('#plan_term option[value=year]').text({!! json_encode(trans('texts.plan_price_yearly', ['price'=>PLAN_PRICE_PRO_YEARLY])) !!});
|
||||||
@ -221,11 +221,15 @@
|
|||||||
}
|
}
|
||||||
$('#plan_term, #plan').change(updatePlanModal);
|
$('#plan_term, #plan').change(updatePlanModal);
|
||||||
updatePlanModal();
|
updatePlanModal();
|
||||||
|
|
||||||
if(window.location.hash) {
|
if(window.location.hash) {
|
||||||
var hash = window.location.hash;
|
var hash = window.location.hash;
|
||||||
$(hash).modal('toggle');
|
$(hash).modal('toggle');
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
@if (Request::input('upgrade'))
|
||||||
|
showChangePlan();
|
||||||
|
@endif
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@stop
|
@stop
|
||||||
|
@ -423,7 +423,7 @@
|
|||||||
@if (!Auth::user()->registered)
|
@if (!Auth::user()->registered)
|
||||||
{!! Button::success(trans('texts.sign_up'))->withAttributes(array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal', 'style' => 'max-width:100px;;overflow:hidden'))->small() !!}
|
{!! Button::success(trans('texts.sign_up'))->withAttributes(array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal', 'style' => 'max-width:100px;;overflow:hidden'))->small() !!}
|
||||||
@elseif (Utils::isNinjaProd() && (!Auth::user()->isPro() || Auth::user()->isTrial()))
|
@elseif (Utils::isNinjaProd() && (!Auth::user()->isPro() || Auth::user()->isTrial()))
|
||||||
{!! Button::success(trans('texts.go_pro'))->withAttributes(array('id' => 'proPlanButton', 'onclick' => 'showProPlan("")', 'style' => 'max-width:100px;overflow:hidden'))->small() !!}
|
{!! Button::success(trans('texts.plan_upgrade'))->asLinkTo(url('/settings/account_management?upgrade=true'))->withAttributes(array('style' => 'max-width:100px;overflow:hidden'))->small() !!}
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user