Clarify deleting company vs account

This commit is contained in:
Hillel Coren 2017-08-24 20:06:12 +03:00
parent d16d27f939
commit b18811f678
3 changed files with 10 additions and 8 deletions

View File

@ -2414,6 +2414,10 @@ $LANG = array(
'item_tax1' => 'Item Tax1',
'item_tax2' => 'Item Tax2',
'delete_company' => 'Delete Company',
'delete_company_help' => 'Permanently delete the company along with all data and setting.',
'delete_company_message' => 'Warning: This will permanently delete your company, there is no undo.',
);
return $LANG;

View File

@ -274,10 +274,10 @@
{!! Former::close() !!}
{!! Former::open('settings/cancel_account')->addClass('cancel-account') !!}
{!! Former::actions( Button::danger(trans('texts.cancel_account'))->large()->withAttributes(['onclick' => 'showCancelConfirm()'])->appendIcon(Icon::create('trash'))) !!}
{!! Former::actions( Button::danger($account->hasMultipleAccounts() ? trans('texts.delete_company') : trans('texts.cancel_account'))->large()->withAttributes(['onclick' => 'showCancelConfirm()'])->appendIcon(Icon::create('trash'))) !!}
<div class="form-group">
<div class="col-lg-8 col-sm-8 col-lg-offset-4 col-sm-offset-4">
<span class="help-block">{{ trans('texts.cancel_account_help')}}</span>
<span class="help-block">{{ $account->hasMultipleAccounts() ? trans('texts.delete_company_help') : trans('texts.cancel_account_help') }}</span>
</div>
</div>
<div class="modal fade" id="confirmCancelModal" tabindex="-1" role="dialog" aria-labelledby="confirmCancelModalLabel" aria-hidden="true">
@ -285,12 +285,12 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="confirmCancelModalLabel">{!! trans('texts.cancel_account') !!}</h4>
<h4 class="modal-title" id="confirmCancelModalLabel">{{ $account->hasMultipleAccounts() ? trans('texts.delete_company') : trans('texts.cancel_account') }}</h4>
</div>
<div class="container" style="width: 100%; padding-bottom: 0px !important">
<div class="panel panel-default">
<div class="panel-body">
<p><b>{{ trans('texts.cancel_account_message') }}</b></p><br/>
<p><b>{{ $account->hasMultipleAccounts() ? trans('texts.delete_company_message') : trans('texts.cancel_account_message') }}</b></p><br/>
<p>{!! Former::textarea('reason')
->placeholder(trans('texts.reason_for_canceling'))
->raw()
@ -301,7 +301,7 @@
</div>
<div class="modal-footer" style="margin-top: 2px">
<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()">{{ $account->hasMultipleAccounts() ? trans('texts.delete_company') : trans('texts.cancel_account') }}</button>
</div>
</div>
</div>

View File

@ -298,9 +298,7 @@
@endif
<li class="divider"></li>
@if (Utils::isAdmin() && Auth::user()->confirmed && Utils::getResllerType() != RESELLER_ACCOUNT_COUNT)
@if (count(session(SESSION_USER_ACCOUNTS)) > 1)
<li>{!! link_to('/manage_companies', trans('texts.manage_companies')) !!}</li>
@elseif (!session(SESSION_USER_ACCOUNTS) || count(session(SESSION_USER_ACCOUNTS)) < 5)
@if (!session(SESSION_USER_ACCOUNTS) || count(session(SESSION_USER_ACCOUNTS)) < 5)
<li>{!! link_to('#', trans('texts.add_company'), ['onclick' => 'showSignUp()']) !!}</li>
@endif
@endif