mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add ability to invite users
This commit is contained in:
@@ -33,6 +33,10 @@ return [
|
||||
'admin_test_subject' => 'A test message from your Firefly III installation',
|
||||
'admin_test_body' => 'This is a test message from your Firefly III instance. It was sent to :email.',
|
||||
|
||||
// invite
|
||||
'invitation_created_subject' => 'An invitation has been created',
|
||||
'invitation_created_body' => 'Admin user ":email" created a user invitation which can be used by whoever is behind email address ":invitee". The invite will be valid for 48hrs.',
|
||||
|
||||
// new IP
|
||||
'login_from_new_ip' => 'New login on Firefly III',
|
||||
'slack_login_from_new_ip' => 'New Firefly III login from IP :ip (:host)',
|
||||
|
@@ -2221,62 +2221,70 @@ return [
|
||||
'updated_tag' => 'Updated tag ":tag"',
|
||||
'created_tag' => 'Tag ":tag" has been created!',
|
||||
|
||||
'transaction_journal_information' => 'Transaction information',
|
||||
'transaction_journal_meta' => 'Meta information',
|
||||
'transaction_journal_more' => 'More information',
|
||||
'basic_journal_information' => 'Basic transaction information',
|
||||
'transaction_journal_extra' => 'Extra information',
|
||||
'att_part_of_journal' => 'Stored under ":journal"',
|
||||
'total_amount' => 'Total amount',
|
||||
'number_of_decimals' => 'Number of decimals',
|
||||
'transaction_journal_information' => 'Transaction information',
|
||||
'transaction_journal_meta' => 'Meta information',
|
||||
'transaction_journal_more' => 'More information',
|
||||
'basic_journal_information' => 'Basic transaction information',
|
||||
'transaction_journal_extra' => 'Extra information',
|
||||
'att_part_of_journal' => 'Stored under ":journal"',
|
||||
'total_amount' => 'Total amount',
|
||||
'number_of_decimals' => 'Number of decimals',
|
||||
|
||||
// administration
|
||||
'administration' => 'Administration',
|
||||
'user_administration' => 'User administration',
|
||||
'list_all_users' => 'All users',
|
||||
'all_users' => 'All users',
|
||||
'instance_configuration' => 'Configuration',
|
||||
'firefly_instance_configuration' => 'Configuration options for Firefly III',
|
||||
'setting_single_user_mode' => 'Single user mode',
|
||||
'setting_single_user_mode_explain' => 'By default, Firefly III only accepts one (1) registration: you. This is a security measure, preventing others from using your instance unless you allow them to. Future registrations are blocked. When you uncheck this box, others can use your instance as well, assuming they can reach it (when it is connected to the internet).',
|
||||
'store_configuration' => 'Store configuration',
|
||||
'single_user_administration' => 'User administration for :email',
|
||||
'edit_user' => 'Edit user :email',
|
||||
'hidden_fields_preferences' => 'You can enable more transaction options in your <a href="preferences">preferences</a>.',
|
||||
'user_data_information' => 'User data',
|
||||
'user_information' => 'User information',
|
||||
'total_size' => 'total size',
|
||||
'budget_or_budgets' => ':count budget|:count budgets',
|
||||
'budgets_with_limits' => ':count budget with configured amount|:count budgets with configured amount',
|
||||
'nr_of_rules_in_total_groups' => ':count_rules rule(s) in :count_groups rule group(s)',
|
||||
'tag_or_tags' => ':count tag|:count tags',
|
||||
'configuration_updated' => 'The configuration has been updated',
|
||||
'setting_is_demo_site' => 'Demo site',
|
||||
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
|
||||
'block_code_bounced' => 'Email message(s) bounced',
|
||||
'block_code_expired' => 'Demo account expired',
|
||||
'no_block_code' => 'No reason for block or user not blocked',
|
||||
'block_code_email_changed' => 'User has not yet confirmed new email address',
|
||||
'admin_update_email' => 'Contrary to the profile page, the user will NOT be notified their email address has changed!',
|
||||
'update_user' => 'Update user',
|
||||
'updated_user' => 'User data has been changed.',
|
||||
'delete_user' => 'Delete user :email',
|
||||
'user_deleted' => 'The user has been deleted',
|
||||
'send_test_email' => 'Send test email message',
|
||||
'send_test_email_text' => 'To see if your installation is capable of sending email or posting Slack messages, please press this button. You will not see an error here (if any), <strong>the log files will reflect any errors</strong>. You can press this button as many times as you like. There is no spam control. The message will be sent to <code>:email</code> and should arrive shortly.',
|
||||
'send_message' => 'Send message',
|
||||
'send_test_triggered' => 'Test was triggered. Check your inbox and the log files.',
|
||||
'give_admin_careful' => 'Users who are given admin rights can take away yours. Be careful.',
|
||||
'admin_maintanance_title' => 'Maintenance',
|
||||
'admin_maintanance_expl' => 'Some nifty buttons for Firefly III maintenance',
|
||||
'admin_maintenance_clear_cache' => 'Clear cache',
|
||||
'admin_notifications' => 'Admin notifications',
|
||||
'admin_notifications_expl' => 'The following notifications can be enabled or disabled by the administrator. If you want to get these messages over Slack as well, set the "incoming webhook" URL.',
|
||||
'admin_notification_check_user_new_reg' => 'User gets post-registration welcome message',
|
||||
'admin_notification_check_admin_new_reg' => 'Administrator(s) get new user registration notification',
|
||||
'admin_notification_check_new_version' => 'A new version is available',
|
||||
'save_notification_settings' => 'Save settings',
|
||||
'notification_settings_saved' => 'The notification settings have been saved',
|
||||
'invite_new_user_title' => 'Invite new user',
|
||||
'invite_new_user_text' => 'As an administrator, you can invite users to register on your Firefly III administration. Using the direct link you can share with them, they will be able to register an account. The invited user and their invite link will appear in the table below. You are free to share the invitation link with them.',
|
||||
'invited_user_mail' => 'Email address',
|
||||
'invite_user' => 'Invite user',
|
||||
'user_is_invited' => 'Email address ":address" was invited to Firefly III',
|
||||
'administration' => 'Administration',
|
||||
'code_already_used' => 'Invite code has been used',
|
||||
'user_administration' => 'User administration',
|
||||
'list_all_users' => 'All users',
|
||||
'all_users' => 'All users',
|
||||
'instance_configuration' => 'Configuration',
|
||||
'firefly_instance_configuration' => 'Configuration options for Firefly III',
|
||||
'setting_single_user_mode' => 'Single user mode',
|
||||
'setting_single_user_mode_explain' => 'By default, Firefly III only accepts one (1) registration: you. This is a security measure, preventing others from using your instance unless you allow them to. Future registrations are blocked. When you uncheck this box, others can use your instance as well, assuming they can reach it (when it is connected to the internet).',
|
||||
'store_configuration' => 'Store configuration',
|
||||
'single_user_administration' => 'User administration for :email',
|
||||
'edit_user' => 'Edit user :email',
|
||||
'hidden_fields_preferences' => 'You can enable more transaction options in your <a href="preferences">preferences</a>.',
|
||||
'user_data_information' => 'User data',
|
||||
'user_information' => 'User information',
|
||||
'total_size' => 'total size',
|
||||
'budget_or_budgets' => ':count budget|:count budgets',
|
||||
'budgets_with_limits' => ':count budget with configured amount|:count budgets with configured amount',
|
||||
'nr_of_rules_in_total_groups' => ':count_rules rule(s) in :count_groups rule group(s)',
|
||||
'tag_or_tags' => ':count tag|:count tags',
|
||||
'configuration_updated' => 'The configuration has been updated',
|
||||
'setting_is_demo_site' => 'Demo site',
|
||||
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
|
||||
'block_code_bounced' => 'Email message(s) bounced',
|
||||
'block_code_expired' => 'Demo account expired',
|
||||
'no_block_code' => 'No reason for block or user not blocked',
|
||||
'block_code_email_changed' => 'User has not yet confirmed new email address',
|
||||
'admin_update_email' => 'Contrary to the profile page, the user will NOT be notified their email address has changed!',
|
||||
'update_user' => 'Update user',
|
||||
'updated_user' => 'User data has been changed.',
|
||||
'delete_user' => 'Delete user :email',
|
||||
'user_deleted' => 'The user has been deleted',
|
||||
'send_test_email' => 'Send test email message',
|
||||
'send_test_email_text' => 'To see if your installation is capable of sending email or posting Slack messages, please press this button. You will not see an error here (if any), <strong>the log files will reflect any errors</strong>. You can press this button as many times as you like. There is no spam control. The message will be sent to <code>:email</code> and should arrive shortly.',
|
||||
'send_message' => 'Send message',
|
||||
'send_test_triggered' => 'Test was triggered. Check your inbox and the log files.',
|
||||
'give_admin_careful' => 'Users who are given admin rights can take away yours. Be careful.',
|
||||
'admin_maintanance_title' => 'Maintenance',
|
||||
'admin_maintanance_expl' => 'Some nifty buttons for Firefly III maintenance',
|
||||
'admin_maintenance_clear_cache' => 'Clear cache',
|
||||
'admin_notifications' => 'Admin notifications',
|
||||
'admin_notifications_expl' => 'The following notifications can be enabled or disabled by the administrator. If you want to get these messages over Slack as well, set the "incoming webhook" URL.',
|
||||
'admin_notification_check_user_new_reg' => 'User gets post-registration welcome message',
|
||||
'admin_notification_check_admin_new_reg' => 'Administrator(s) get new user registration notification',
|
||||
'admin_notification_check_new_version' => 'A new version is available',
|
||||
'admin_notification_check_invite_created' => 'A user is invited to Firefly III',
|
||||
'admin_notification_check_invite_redeemed' => 'A user invitation is redeemed',
|
||||
'save_notification_settings' => 'Save settings',
|
||||
'notification_settings_saved' => 'The notification settings have been saved',
|
||||
|
||||
|
||||
'split_transaction_title' => 'Description of the split transaction',
|
||||
|
@@ -43,6 +43,10 @@ return [
|
||||
'lastActivity' => 'Last activity',
|
||||
'balanceDiff' => 'Balance difference',
|
||||
'other_meta_data' => 'Other meta data',
|
||||
'invited_at' => 'Invited at',
|
||||
'expires' => 'Invitation expires',
|
||||
'invited_by' => 'Invited by',
|
||||
'invite_link' => 'Invite link',
|
||||
'account_type' => 'Account type',
|
||||
'created_at' => 'Created at',
|
||||
'account' => 'Account',
|
||||
|
@@ -4,6 +4,31 @@
|
||||
{{ Breadcrumbs.render }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if allowInvites %}
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<form action="{{ route('admin.users.invite') }}" method="post">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'invite_new_user_title'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ 'invite_new_user_text'|_ }}
|
||||
</p>
|
||||
{{ ExpandedForm.text('invited_user',null, {'type': 'email', 'label' : 'invited_user_mail'|_}) }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">
|
||||
{{ ('invite_user')|_ }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box box-primary">
|
||||
@@ -29,8 +54,10 @@
|
||||
<tr>
|
||||
<td class="hidden-xs" data-value="{{ user.id }}">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a class="btn btn-default" href="{{ route('admin.users.edit',user.id) }}"><span class="fa fa-pencil"></span></a>
|
||||
<a class="btn btn-danger" href="{{ route('admin.users.delete',user.id) }}"><span class="fa fa-trash"></span></a>
|
||||
<a class="btn btn-default" href="{{ route('admin.users.edit',user.id) }}"><span
|
||||
class="fa fa-pencil"></span></a>
|
||||
<a class="btn btn-danger" href="{{ route('admin.users.delete',user.id) }}"><span
|
||||
class="fa fa-trash"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-xs" data-value="{{ user.id }}">#{{ user.id }}</td>
|
||||
@@ -60,9 +87,11 @@
|
||||
</td>
|
||||
<td data-value="{% if user.blocked %}1{% else %}0{% endif %}">
|
||||
{% if user.blocked == 1 %}
|
||||
<small class="text-danger"><span class="fa fa-fw fa-check" title="{{ 'yes'|_ }}"></span></small>
|
||||
<small class="text-danger"><span class="fa fa-fw fa-check"
|
||||
title="{{ 'yes'|_ }}"></span></small>
|
||||
{% else %}
|
||||
<small class="text-success"><span class="fa fa-fw fa-times" title="{{ 'no'|_ }}"></span></small>
|
||||
<small class="text-success"><span class="fa fa-fw fa-times"
|
||||
title="{{ 'no'|_ }}"></span></small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="hidden-xs">
|
||||
@@ -84,10 +113,71 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if invitedUsers.count > 0 %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'all_invited_users'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-responsive table-condensed sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsign="_19" class="hidden-xs" colspan="1"> </th>
|
||||
<th data-defaultsign="az">{{ trans('list.email') }}</th>
|
||||
<th data-defaultsign="month" class="hidden-xs">{{ trans('list.invited_at') }}</th>
|
||||
<th data-defaultsign="month" class="hidden-xs">{{ trans('list.expires') }}</th>
|
||||
<th class="hidden-xs">{{ trans('list.invited_by') }}</th>
|
||||
<th>{{ trans('list.invite_link') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for invitee in invitedUsers %}
|
||||
<tr>
|
||||
<td class="hidden-xs" data-value="{{ user.id }}">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a class="btn btn-danger" href="{{ route('admin.users.delete-invite', invitee.id) }}"><span
|
||||
class="fa fa-trash"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ invitee.email }}
|
||||
</td>
|
||||
<td class="hidden-xs">
|
||||
{{ invitee.created_at.isoFormat(monthAndDayFormat) }}
|
||||
{{ invitee.created_at.format('H:i') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ invitee.expires.isoFormat(monthAndDayFormat) }}
|
||||
{{ invitee.expires.format('H:i') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ invitee.user.email }}
|
||||
</td>
|
||||
<td>
|
||||
{% if invitee.redeemed %}
|
||||
<em><s>{{ 'code_already_used'|_ }}</s></em>
|
||||
{% else %}
|
||||
<input type="text" class="form-control" readonly value="{{ route('invite', [invitee.invite_code]) }}">
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="v1/css/bootstrap-sortable.css?v={{ FF_VERSION }}" type="text/css" media="all" nonce="{{ JS_NONCE }}">
|
||||
<link rel="stylesheet" href="v1/css/bootstrap-sortable.css?v={{ FF_VERSION }}" type="text/css" media="all"
|
||||
nonce="{{ JS_NONCE }}">
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="v1/js/lib/bootstrap-sortable.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" src="v1/js/lib/bootstrap-sortable.js?v={{ FF_VERSION }}"
|
||||
nonce="{{ JS_NONCE }}"></script>
|
||||
{% endblock %}
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
<form action="{{ route('register') }}" method="post">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="invite_code" value="{{ inviteCode }}">
|
||||
<div class="input-group mb-3">
|
||||
<input type="email" name="email" value="{{ email }}" class="form-control"
|
||||
placeholder="{{ trans('form.email') }}"/>
|
||||
|
3
resources/views/emails/invitation-created.blade.php
Normal file
3
resources/views/emails/invitation-created.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
@component('mail::message')
|
||||
{{ trans('email.invitation_created_body', ['email' => $email,'invitee' => $invitee]) }}
|
||||
@endcomponent
|
Reference in New Issue
Block a user