mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Move cancel account to new account management page
This commit is contained in:
parent
fb9a2de240
commit
51cd82cba8
@ -148,6 +148,8 @@ class AccountController extends BaseController
|
|||||||
return self::showInvoiceSettings();
|
return self::showInvoiceSettings();
|
||||||
} elseif ($section == ACCOUNT_IMPORT_EXPORT) {
|
} elseif ($section == ACCOUNT_IMPORT_EXPORT) {
|
||||||
return View::make('accounts.import_export', ['title' => trans('texts.import_export')]);
|
return View::make('accounts.import_export', ['title' => trans('texts.import_export')]);
|
||||||
|
} elseif ($section == ACCOUNT_MANAGEMENT) {
|
||||||
|
return self::showAccountManagement();
|
||||||
} elseif ($section == ACCOUNT_INVOICE_DESIGN || $section == ACCOUNT_CUSTOMIZE_DESIGN) {
|
} elseif ($section == ACCOUNT_INVOICE_DESIGN || $section == ACCOUNT_CUSTOMIZE_DESIGN) {
|
||||||
return self::showInvoiceDesign($section);
|
return self::showInvoiceDesign($section);
|
||||||
} elseif ($section == ACCOUNT_CLIENT_PORTAL) {
|
} elseif ($section == ACCOUNT_CLIENT_PORTAL) {
|
||||||
@ -231,6 +233,16 @@ class AccountController extends BaseController
|
|||||||
return View::make('accounts.details', $data);
|
return View::make('accounts.details', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function showAccountManagement()
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'account' => Auth::user()->account,
|
||||||
|
'title' => trans('texts.acount_management'),
|
||||||
|
];
|
||||||
|
|
||||||
|
return View::make('accounts.management', $data);
|
||||||
|
}
|
||||||
|
|
||||||
public function showUserDetails()
|
public function showUserDetails()
|
||||||
{
|
{
|
||||||
$oauthLoginUrls = [];
|
$oauthLoginUrls = [];
|
||||||
|
@ -354,6 +354,7 @@ if (!defined('CONTACT_EMAIL')) {
|
|||||||
define('ACCOUNT_LOCALIZATION', 'localization');
|
define('ACCOUNT_LOCALIZATION', 'localization');
|
||||||
define('ACCOUNT_NOTIFICATIONS', 'notifications');
|
define('ACCOUNT_NOTIFICATIONS', 'notifications');
|
||||||
define('ACCOUNT_IMPORT_EXPORT', 'import_export');
|
define('ACCOUNT_IMPORT_EXPORT', 'import_export');
|
||||||
|
define('ACCOUNT_MANAGEMENT', 'account_management');
|
||||||
define('ACCOUNT_PAYMENTS', 'online_payments');
|
define('ACCOUNT_PAYMENTS', 'online_payments');
|
||||||
define('ACCOUNT_BANKS', 'bank_accounts');
|
define('ACCOUNT_BANKS', 'bank_accounts');
|
||||||
define('ACCOUNT_IMPORT_EXPENSES', 'import_expenses');
|
define('ACCOUNT_IMPORT_EXPENSES', 'import_expenses');
|
||||||
|
@ -57,6 +57,7 @@ class Account extends Eloquent
|
|||||||
ACCOUNT_PRODUCTS,
|
ACCOUNT_PRODUCTS,
|
||||||
ACCOUNT_NOTIFICATIONS,
|
ACCOUNT_NOTIFICATIONS,
|
||||||
ACCOUNT_IMPORT_EXPORT,
|
ACCOUNT_IMPORT_EXPORT,
|
||||||
|
ACCOUNT_MANAGEMENT,
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $advancedSettings = [
|
public static $advancedSettings = [
|
||||||
|
@ -81,7 +81,7 @@ $LANG = array(
|
|||||||
'company_details' => 'Company Details',
|
'company_details' => 'Company Details',
|
||||||
'online_payments' => 'Online Payments',
|
'online_payments' => 'Online Payments',
|
||||||
'notifications' => 'Email Notifications',
|
'notifications' => 'Email Notifications',
|
||||||
'import_export' => 'Import | Export | Cancel',
|
'import_export' => 'Import | Export',
|
||||||
'done' => 'Done',
|
'done' => 'Done',
|
||||||
'save' => 'Save',
|
'save' => 'Save',
|
||||||
'create' => 'Create',
|
'create' => 'Create',
|
||||||
@ -368,7 +368,7 @@ $LANG = array(
|
|||||||
'confirm_email_invoice' => 'Are you sure you want to email this invoice?',
|
'confirm_email_invoice' => 'Are you sure you want to email this invoice?',
|
||||||
'confirm_email_quote' => 'Are you sure you want to email this quote?',
|
'confirm_email_quote' => 'Are you sure you want to email this quote?',
|
||||||
'confirm_recurring_email_invoice' => 'Are you sure you want this invoice emailed?',
|
'confirm_recurring_email_invoice' => 'Are you sure you want this invoice emailed?',
|
||||||
'cancel_account' => 'Cancel Account',
|
'cancel_account' => 'Delete Account',
|
||||||
'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.',
|
'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.',
|
||||||
'go_back' => 'Go Back',
|
'go_back' => 'Go Back',
|
||||||
'data_visualizations' => 'Data Visualizations',
|
'data_visualizations' => 'Data Visualizations',
|
||||||
@ -1126,6 +1126,13 @@ $LANG = array(
|
|||||||
'enable_client_portal_help' => 'Show/hide the client portal.',
|
'enable_client_portal_help' => 'Show/hide the client portal.',
|
||||||
'enable_client_portal_dashboard' => 'Dashboard',
|
'enable_client_portal_dashboard' => 'Dashboard',
|
||||||
'enable_client_portal_dashboard_help' => 'Show/hide the dashboard page in the client portal.',
|
'enable_client_portal_dashboard_help' => 'Show/hide the dashboard page in the client portal.',
|
||||||
|
|
||||||
|
'account_management' => 'Account Management',
|
||||||
|
'plan_status' => 'Plan Status',
|
||||||
|
|
||||||
|
'plan_free' => 'Free',
|
||||||
|
'plan_pro' => 'Pro',
|
||||||
|
'plan_enterprise' => 'Enterprise'
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -73,51 +73,7 @@
|
|||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
|
|
||||||
{!! Former::open('settings/cancel_account')->addClass('cancel-account') !!}
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title">{!! trans('texts.cancel_account') !!}</h3>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
{!! Former::actions( Button::danger(trans('texts.cancel_account'))->large()->withAttributes(['onclick' => 'showConfirm()'])->appendIcon(Icon::create('trash'))) !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal fade" id="confirmCancelModal" tabindex="-1" role="dialog" aria-labelledby="confirmCancelModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog" style="min-width:150px">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
||||||
<h4 class="modal-title" id="confirmCancelModalLabel">{!! trans('texts.cancel_account') !!}</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="background-color: #fff; padding-left: 16px; padding-right: 16px">
|
|
||||||
<p>{{ trans('texts.cancel_account_message') }}</p>
|
|
||||||
<p>{!! Former::textarea('reason')->placeholder(trans('texts.reason_for_canceling'))->raw() !!}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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-danger" onclick="confirmCancel()">{{ trans('texts.cancel_account') }}</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{!! Former::close() !!}
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function showConfirm() {
|
|
||||||
$('#confirmCancelModal').modal('show');
|
|
||||||
}
|
|
||||||
|
|
||||||
function confirmCancel() {
|
|
||||||
$('form.cancel-account').submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setEntityTypesVisible() {
|
function setEntityTypesVisible() {
|
||||||
var selector = '.entity-types input[type=checkbox]';
|
var selector = '.entity-types input[type=checkbox]';
|
||||||
if ($('#format').val() === 'JSON') {
|
if ($('#format').val() === 'JSON') {
|
||||||
|
70
resources/views/accounts/management.blade.php
Normal file
70
resources/views/accounts/management.blade.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
@extends('header')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
@parent
|
||||||
|
|
||||||
|
@include('accounts.nav', ['selected' => ACCOUNT_MANAGEMENT])
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<!--<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">{!! trans('texts.plan_status') !!}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form class="form-horizontal">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">Plan</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<p class="form-control-static">{{ trans('texts.plan_'.$account->plan) }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>-->
|
||||||
|
|
||||||
|
{!! Former::open('settings/cancel_account')->addClass('cancel-account') !!}
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">{!! trans('texts.cancel_account') !!}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{!! Former::actions( Button::danger(trans('texts.cancel_account'))->large()->withAttributes(['onclick' => 'showConfirm()'])->appendIcon(Icon::create('trash'))) !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="confirmCancelModal" tabindex="-1" role="dialog" aria-labelledby="confirmCancelModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog" style="min-width:150px">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h4 class="modal-title" id="confirmCancelModalLabel">{!! trans('texts.cancel_account') !!}</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="background-color: #fff; padding-left: 16px; padding-right: 16px">
|
||||||
|
<p>{{ trans('texts.cancel_account_message') }}</p>
|
||||||
|
<p>{!! Former::textarea('reason')->placeholder(trans('texts.reason_for_canceling'))->raw() !!}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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-danger" onclick="confirmCancel()">{{ trans('texts.cancel_account') }}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{!! Former::close() !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function showConfirm() {
|
||||||
|
$('#confirmCancelModal').modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirmCancel() {
|
||||||
|
$('form.cancel-account').submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@stop
|
Loading…
x
Reference in New Issue
Block a user