mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Users: Send invitation only #1333
This commit is contained in:
parent
fa4ab4bf9a
commit
631a401e8c
@ -210,7 +210,7 @@ class UserController extends BaseController
|
|||||||
|
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
if (! $user->confirmed) {
|
if (! $user->confirmed && Input::get('action') === 'email') {
|
||||||
$this->userMailer->sendConfirmation($user, Auth::user());
|
$this->userMailer->sendConfirmation($user, Auth::user());
|
||||||
$message = trans('texts.sent_invite');
|
$message = trans('texts.sent_invite');
|
||||||
} else {
|
} else {
|
||||||
|
@ -354,7 +354,7 @@ $LANG = array(
|
|||||||
'charge_taxes' => 'Charge taxes',
|
'charge_taxes' => 'Charge taxes',
|
||||||
'user_management' => 'User Management',
|
'user_management' => 'User Management',
|
||||||
'add_user' => 'Add User',
|
'add_user' => 'Add User',
|
||||||
'send_invite' => 'Send invitation',
|
'send_invite' => 'Send Invitation',
|
||||||
'sent_invite' => 'Successfully sent invitation',
|
'sent_invite' => 'Successfully sent invitation',
|
||||||
'updated_user' => 'Successfully updated user',
|
'updated_user' => 'Successfully updated user',
|
||||||
'invitation_message' => 'You\'ve been invited by :invitor. ',
|
'invitation_message' => 'You\'ve been invited by :invitor. ',
|
||||||
@ -2388,6 +2388,8 @@ $LANG = array(
|
|||||||
'created_payment_term' => 'Successfully created payment term',
|
'created_payment_term' => 'Successfully created payment term',
|
||||||
'updated_payment_term' => 'Successfully updated payment term',
|
'updated_payment_term' => 'Successfully updated payment term',
|
||||||
'archived_payment_term' => 'Successfully archived payment term',
|
'archived_payment_term' => 'Successfully archived payment term',
|
||||||
|
'resend_invite' => 'Resend Invitation',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return $LANG;
|
return $LANG;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
@parent
|
@parent
|
||||||
@include('accounts.nav', ['selected' => ACCOUNT_USER_MANAGEMENT])
|
@include('accounts.nav', ['selected' => ACCOUNT_USER_MANAGEMENT])
|
||||||
|
|
||||||
{!! Former::open($url)->method($method)->addClass('warn-on-exit')->rules(array(
|
{!! Former::open($url)->method($method)->addClass('warn-on-exit user-form')->rules(array(
|
||||||
'first_name' => 'required',
|
'first_name' => 'required',
|
||||||
'last_name' => 'required',
|
'last_name' => 'required',
|
||||||
'email' => 'required|email',
|
'email' => 'required|email',
|
||||||
@ -18,6 +18,10 @@
|
|||||||
{{ Former::populateField('permissions[edit_all]', intval($user->hasPermission('edit_all'))) }}
|
{{ Former::populateField('permissions[edit_all]', intval($user->hasPermission('edit_all'))) }}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
<div style="display:none">
|
||||||
|
{!! Former::text('action') !!}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">{!! trans('texts.user_details') !!}</h3>
|
<h3 class="panel-title">{!! trans('texts.user_details') !!}</h3>
|
||||||
@ -39,7 +43,7 @@
|
|||||||
|
|
||||||
@if ( ! Utils::hasFeature(FEATURE_USER_PERMISSIONS))
|
@if ( ! Utils::hasFeature(FEATURE_USER_PERMISSIONS))
|
||||||
<div class="alert alert-warning">{{ trans('texts.upgrade_for_permissions') }}</div>
|
<div class="alert alert-warning">{{ trans('texts.upgrade_for_permissions') }}</div>
|
||||||
<script>
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$('input[type=checkbox]').prop('disabled', true);
|
$('input[type=checkbox]').prop('disabled', true);
|
||||||
})
|
})
|
||||||
@ -75,11 +79,21 @@
|
|||||||
|
|
||||||
{!! Former::actions(
|
{!! Former::actions(
|
||||||
Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/settings/user_management'))->appendIcon(Icon::create('remove-circle'))->large(),
|
Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/settings/user_management'))->appendIcon(Icon::create('remove-circle'))->large(),
|
||||||
Button::success(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->submit()->large()->appendIcon(Icon::create($user && $user->confirmed ? 'floppy-disk' : 'send'))
|
($user) ? Button::success(trans('texts.save'))->withAttributes(['onclick' => 'submitAction("save")'])->large()->appendIcon(Icon::create('floppy-disk')) : false,
|
||||||
|
(! $user || ! $user->confirmed) ? Button::info(trans($user ? 'texts.resend_invite' : 'texts.send_invite'))->withAttributes(['onclick' => 'submitAction("email")'])->large()->appendIcon(Icon::create('send')) : false
|
||||||
)!!}
|
)!!}
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function submitAction(value) {
|
||||||
|
$('#action').val(value);
|
||||||
|
$('.user-form').submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('onReady')
|
@section('onReady')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user