From f653bc5f6ef59438786ad161e896a736bcadae7d Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 7 Nov 2016 18:49:35 +0100 Subject: [PATCH] Expand firefly config. --- .env.example | 1 - app/Handlers/Events/UserEventHandler.php | 17 +- .../Admin/ConfigurationController.php | 9 +- app/Http/Controllers/Admin/UserController.php | 17 +- .../Controllers/Auth/RegisterController.php | 8 +- app/Http/Middleware/IsConfirmed.php | 5 +- app/Http/Middleware/IsNotConfirmed.php | 5 +- app/Http/Requests/ConfigurationRequest.php | 8 +- app/Repositories/User/UserRepository.php | 5 +- config/firefly.php | 5 +- resources/lang/en_US/firefly.php | 209 +++++++++--------- resources/lang/en_US/form.php | 8 +- .../views/admin/configuration/index.twig | 37 +++- resources/views/auth/register.twig | 8 +- 14 files changed, 198 insertions(+), 144 deletions(-) diff --git a/.env.example b/.env.example index c628064094..e8ebe3c838 100755 --- a/.env.example +++ b/.env.example @@ -35,7 +35,6 @@ MAIL_PASSWORD=null MAIL_ENCRYPTION=null SEND_REGISTRATION_MAIL=true -MUST_CONFIRM_ACCOUNT=false SHOW_INCOMPLETE_TRANSLATIONS=false diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php index 4d9651158f..c6235d0a6d 100644 --- a/app/Handlers/Events/UserEventHandler.php +++ b/app/Handlers/Events/UserEventHandler.php @@ -14,6 +14,7 @@ declare(strict_types = 1); namespace FireflyIII\Handlers\Events; use Exception; +use FireflyConfig; use FireflyIII\Events\ConfirmedUser; use FireflyIII\Events\RegisteredUser; use FireflyIII\Events\ResentConfirmation; @@ -81,10 +82,10 @@ class UserEventHandler */ public function sendConfirmationMessage(RegisteredUser $event): bool { - $user = $event->user; - $ipAddress = $event->ipAddress; - $confirmAccount = env('MUST_CONFIRM_ACCOUNT', false); - if ($confirmAccount === false) { + $user = $event->user; + $ipAddress = $event->ipAddress; + $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; + if ($mustConfirmAccount === false) { Preferences::setForUser($user, 'user_confirmed', true); Preferences::setForUser($user, 'user_confirmed_last_mail', 0); Preferences::mark(); @@ -124,10 +125,10 @@ class UserEventHandler */ function sendConfirmationMessageAgain(ResentConfirmation $event): bool { - $user = $event->user; - $ipAddress = $event->ipAddress; - $confirmAccount = env('MUST_CONFIRM_ACCOUNT', false); - if ($confirmAccount === false) { + $user = $event->user; + $ipAddress = $event->ipAddress; + $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; + if ($mustConfirmAccount === false) { Preferences::setForUser($user, 'user_confirmed', true); Preferences::setForUser($user, 'user_confirmed_last_mail', 0); Preferences::mark(); diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index 33753166d2..f64c807606 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -14,7 +14,6 @@ declare(strict_types = 1); namespace FireflyIII\Http\Controllers\Admin; -use Config; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Requests\ConfigurationRequest; use FireflyIII\Support\Facades\FireflyConfig; @@ -59,9 +58,11 @@ class ConfigurationController extends Controller // all available configuration and their default value in case // they don't exist yet. - $singleUserMode = FireflyConfig::get('single_user_mode', Config::get('firefly.configuration.single_user_mode'))->data; + $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data; + $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; + $isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data; - return view('admin.configuration.index', compact('subTitle', 'subTitleIcon', 'singleUserMode')); + return view('admin.configuration.index', compact('subTitle', 'subTitleIcon', 'singleUserMode', 'mustConfirmAccount', 'isDemoSite')); } @@ -77,6 +78,8 @@ class ConfigurationController extends Controller // store config values FireflyConfig::set('single_user_mode', $data['single_user_mode']); + FireflyConfig::set('must_confirm_account', $data['must_confirm_account']); + FireflyConfig::set('is_demo_site', $data['is_demo_site']); // flash message Session::flash('success', strval(trans('firefly.configuration_updated'))); diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 5557539f35..69a329c2c9 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -14,6 +14,7 @@ declare(strict_types = 1); namespace FireflyIII\Http\Controllers\Admin; +use FireflyConfig; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; @@ -46,20 +47,20 @@ class UserController extends Controller */ public function index(UserRepositoryInterface $repository) { - $title = strval(trans('firefly.administration')); - $mainTitleIcon = 'fa-hand-spock-o'; - $subTitle = strval(trans('firefly.user_administration')); - $subTitleIcon = 'fa-users'; - $confirmAccount = env('MUST_CONFIRM_ACCOUNT', false); - $users = $repository->all(); + $title = strval(trans('firefly.administration')); + $mainTitleIcon = 'fa-hand-spock-o'; + $subTitle = strval(trans('firefly.user_administration')); + $subTitleIcon = 'fa-users'; + $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; + $users = $repository->all(); // add meta stuff. $users->each( - function (User $user) use ($confirmAccount) { + function (User $user) use ($mustConfirmAccount) { // is user activated? $isConfirmed = Preferences::getForUser($user, 'user_confirmed', false)->data; $user->activated = true; - if ($isConfirmed === false && $confirmAccount === true) { + if ($isConfirmed === false && $mustConfirmAccount === true) { $user->activated = false; } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index e7d6dc6692..8de1eb1d63 100755 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -123,7 +123,11 @@ class RegisterController extends Controller */ public function showRegistrationForm(Request $request) { - $showDemoWarning = config('firefly.show-demo-warning', false); + // is demo site? + $isDemoSite = FireflyConfig::get('is_demo_site', Config::get('firefly.configuration.is_demo_site'))->data; + + // activate account? + $mustConfirmAccount = FireflyConfig::get('must_confirm_account', Config::get('firefly.configuration.must_confirm_account'))->data; // is allowed to? $singleUserMode = FireflyConfig::get('single_user_mode', Config::get('firefly.configuration.single_user_mode'))->data; @@ -136,7 +140,7 @@ class RegisterController extends Controller $email = $request->old('email'); - return view('auth.register', compact('showDemoWarning', 'email')); + return view('auth.register', compact('isDemoSite', 'email', 'mustConfirmAccount')); } /** diff --git a/app/Http/Middleware/IsConfirmed.php b/app/Http/Middleware/IsConfirmed.php index bd6dfa1c02..ef8e398a9e 100644 --- a/app/Http/Middleware/IsConfirmed.php +++ b/app/Http/Middleware/IsConfirmed.php @@ -14,6 +14,7 @@ declare(strict_types = 1); namespace FireflyIII\Http\Middleware; use Closure; +use FireflyConfig; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Preferences; @@ -45,11 +46,11 @@ class IsConfirmed return redirect()->guest('login'); } // must the user be confirmed in the first place? - $confirmAccount = env('MUST_CONFIRM_ACCOUNT', false); + $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; // user must be logged in, then continue: $isConfirmed = Preferences::get('user_confirmed', false)->data; - if ($isConfirmed === false && $confirmAccount === true) { + if ($isConfirmed === false && $mustConfirmAccount === true) { // user account is not confirmed, redirect to // confirmation page: diff --git a/app/Http/Middleware/IsNotConfirmed.php b/app/Http/Middleware/IsNotConfirmed.php index 62887408c0..237f28c17a 100644 --- a/app/Http/Middleware/IsNotConfirmed.php +++ b/app/Http/Middleware/IsNotConfirmed.php @@ -14,6 +14,7 @@ declare(strict_types = 1); namespace FireflyIII\Http\Middleware; use Closure; +use FireflyConfig; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Preferences; @@ -45,10 +46,10 @@ class IsNotConfirmed return redirect()->guest('login'); } // must the user be confirmed in the first place? - $confirmAccount = env('MUST_CONFIRM_ACCOUNT', false); + $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; // user must be logged in, then continue: $isConfirmed = Preferences::get('user_confirmed', false)->data; - if ($isConfirmed || $confirmAccount === false) { + if ($isConfirmed || $mustConfirmAccount === false) { // user account is confirmed, simply send them home. return redirect(route('home')); } diff --git a/app/Http/Requests/ConfigurationRequest.php b/app/Http/Requests/ConfigurationRequest.php index 2d9cc6a9a9..c2f2d3becd 100644 --- a/app/Http/Requests/ConfigurationRequest.php +++ b/app/Http/Requests/ConfigurationRequest.php @@ -36,7 +36,9 @@ class ConfigurationRequest extends Request public function getConfigurationData(): array { return [ - 'single_user_mode' => intval($this->get('single_user_mode')) === 1, + 'single_user_mode' => intval($this->get('single_user_mode')) === 1, + 'must_confirm_account' => intval($this->get('must_confirm_account')) === 1, + 'is_demo_site' => intval($this->get('is_demo_site')) === 1, ]; } @@ -46,7 +48,9 @@ class ConfigurationRequest extends Request public function rules() { $rules = [ - 'single_user_mode' => 'between:0,1|numeric', + 'single_user_mode' => 'between:0,1|numeric', + 'must_confirm_account' => 'between:0,1|numeric', + 'is_demo_site' => 'between:0,1|numeric', ]; return $rules; diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index 97642b2ea9..f7b76eb1d9 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -14,6 +14,7 @@ declare(strict_types = 1); namespace FireflyIII\Repositories\User; +use FireflyConfig; use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\Role; use FireflyIII\User; @@ -94,10 +95,10 @@ class UserRepository implements UserRepositoryInterface } // is user activated? - $confirmAccount = env('MUST_CONFIRM_ACCOUNT', false); + $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; $isConfirmed = Preferences::getForUser($user, 'user_confirmed', false)->data; $return['is_activated'] = true; - if ($isConfirmed === false && $confirmAccount === true) { + if ($isConfirmed === false && $mustConfirmAccount === true) { $return['is_activated'] = false; } diff --git a/config/firefly.php b/config/firefly.php index 40f65d62d5..a8b27f2513 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -19,7 +19,9 @@ declare(strict_types = 1); return [ 'configuration' => [ - 'single_user_mode' => true, + 'single_user_mode' => true, + 'is_demo_site' => false, + 'must_confirm_account' => false, ], 'chart' => 'chartjs', 'version' => '4.1.6', @@ -204,5 +206,4 @@ return [ ], 'default_currency' => 'EUR', 'default_language' => 'en_US', - 'show-demo-warning' => false, ]; diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index b7643c4751..57e2e48caf 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -771,112 +771,117 @@ return [ 'tags_group' => 'Tags group transactions together, which makes it possible to store reimbursements (in case you front money for others) and other "balancing acts" where expenses are summed up (the payments on your new TV) or where expenses and deposits are cancelling each other out (buying something with saved money). It\'s all up to you. Using tags the old-fashioned way is of course always possible.', 'tags_start' => 'Create a tag to get started or enter tags when creating new transactions.', - 'transaction_journal_information' => 'Transaction information', - 'transaction_journal_meta' => 'Meta information', - 'total_amount' => 'Total amount', + 'transaction_journal_information' => 'Transaction information', + 'transaction_journal_meta' => 'Meta information', + 'total_amount' => 'Total amount', // administration - 'administration' => 'Administration', - 'user_administration' => 'User administration', - 'list_all_users' => 'All users', - 'all_users' => 'All users', - 'all_blocked_domains' => 'All blocked domains', - 'blocked_domains' => 'Blocked domains', - 'no_domains_banned' => 'No domains blocked', - 'all_user_domains' => 'All user email address domains', - 'all_domains_is_filtered' => 'This list does not include already blocked domains.', - 'domain_now_blocked' => 'Domain :domain is now blocked', - 'domain_now_unblocked' => 'Domain :domain is now unblocked', - 'manual_block_domain' => 'Block a domain by hand', - 'block_domain' => 'Block domain', - 'no_domain_filled_in' => 'No domain filled in', - 'domain_already_blocked' => 'Domain :domain is already blocked', - 'domain_is_now_blocked' => 'Domain :domain is now blocked', - '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 wel, assuming they can reach it (when it is connected to the internet).', - 'store_configuration' => 'Store configuration', - 'single_user_administration' => 'User administration for :email', - 'hidden_fields_preferences' => 'Not all fields are visible right now. You must enable them in your settings.', - 'user_data_information' => 'User data', - 'user_information' => 'User information', - 'total_size' => 'total size', - 'budget_or_budgets' => 'budget(s)', - 'budgets_with_limits' => 'budget(s) with configured amount', - 'rule_or_rules' => 'rule(s)', - 'rulegroup_or_groups' => 'rule group(s)', + 'administration' => 'Administration', + 'user_administration' => 'User administration', + 'list_all_users' => 'All users', + 'all_users' => 'All users', + 'all_blocked_domains' => 'All blocked domains', + 'blocked_domains' => 'Blocked domains', + 'no_domains_banned' => 'No domains blocked', + 'all_user_domains' => 'All user email address domains', + 'all_domains_is_filtered' => 'This list does not include already blocked domains.', + 'domain_now_blocked' => 'Domain :domain is now blocked', + 'domain_now_unblocked' => 'Domain :domain is now unblocked', + 'manual_block_domain' => 'Block a domain by hand', + 'block_domain' => 'Block domain', + 'no_domain_filled_in' => 'No domain filled in', + 'domain_already_blocked' => 'Domain :domain is already blocked', + 'domain_is_now_blocked' => 'Domain :domain is now blocked', + '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 wel, assuming they can reach it (when it is connected to the internet).', + 'store_configuration' => 'Store configuration', + 'single_user_administration' => 'User administration for :email', + 'hidden_fields_preferences' => 'Not all fields are visible right now. You must enable them in your settings.', + 'user_data_information' => 'User data', + 'user_information' => 'User information', + 'total_size' => 'total size', + 'budget_or_budgets' => 'budget(s)', + 'budgets_with_limits' => 'budget(s) with configured amount', + 'rule_or_rules' => 'rule(s)', + 'rulegroup_or_groups' => 'rule group(s)', + 'setting_must_confirm_account' => 'Account confirmation', + 'setting_must_confirm_account_explain' => 'When this setting is enabled, users must activate their account before it can be used.', + '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.', // split a transaction: - 'transaction_meta_data' => 'Transaction meta-data', - 'transaction_dates' => 'Transaction dates', - 'splits' => 'Splits', - 'split_title_withdrawal' => 'Split your new withdrawal', - 'split_intro_one_withdrawal' => 'Firefly supports the "splitting" of a withdrawal.', - 'split_intro_two_withdrawal' => 'It means that the amount of money you\'ve spent is divided between several destination expense accounts, budgets or categories.', - 'split_intro_three_withdrawal' => 'For example: you could split your :total groceries so you pay :split_one from your "daily groceries" budget and :split_two from your "cigarettes" budget.', - 'split_table_intro_withdrawal' => 'Split your withdrawal in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_withdrawal' => 'Store splitted withdrawal', - 'update_splitted_withdrawal' => 'Update splitted withdrawal', - 'split_title_deposit' => 'Split your new deposit', - 'split_intro_one_deposit' => 'Firefly supports the "splitting" of a deposit.', - 'split_intro_two_deposit' => 'It means that the amount of money you\'ve earned is divided between several source revenue accounts or categories.', - 'split_intro_three_deposit' => 'For example: you could split your :total salary so you get :split_one as your base salary and :split_two as a reimbursment for expenses made.', - 'split_table_intro_deposit' => 'Split your deposit in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_deposit' => 'Store splitted deposit', - 'split_title_transfer' => 'Split your new transfer', - 'split_intro_one_transfer' => 'Firefly supports the "splitting" of a transfer.', - 'split_intro_two_transfer' => 'It means that the amount of money you\'re moving is divided between several categories or piggy banks.', - 'split_intro_three_transfer' => 'For example: you could split your :total move so you get :split_one in one piggy bank and :split_two in another.', - 'split_table_intro_transfer' => 'Split your transfer in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_transfer' => 'Store splitted transfer', - 'add_another_split' => 'Add another split', - 'split-transactions' => 'Split transactions', - 'split-new-transaction' => 'Split a new transaction', - 'do_split' => 'Do a split', - 'split_this_withdrawal' => 'Split this withdrawal', - 'split_this_deposit' => 'Split this deposit', - 'split_this_transfer' => 'Split this transfer', - 'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.', - 'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.', - 'no_edit_multiple_left' => 'You have selected no valid transactions to edit.', + 'transaction_meta_data' => 'Transaction meta-data', + 'transaction_dates' => 'Transaction dates', + 'splits' => 'Splits', + 'split_title_withdrawal' => 'Split your new withdrawal', + 'split_intro_one_withdrawal' => 'Firefly supports the "splitting" of a withdrawal.', + 'split_intro_two_withdrawal' => 'It means that the amount of money you\'ve spent is divided between several destination expense accounts, budgets or categories.', + 'split_intro_three_withdrawal' => 'For example: you could split your :total groceries so you pay :split_one from your "daily groceries" budget and :split_two from your "cigarettes" budget.', + 'split_table_intro_withdrawal' => 'Split your withdrawal in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', + 'store_splitted_withdrawal' => 'Store splitted withdrawal', + 'update_splitted_withdrawal' => 'Update splitted withdrawal', + 'split_title_deposit' => 'Split your new deposit', + 'split_intro_one_deposit' => 'Firefly supports the "splitting" of a deposit.', + 'split_intro_two_deposit' => 'It means that the amount of money you\'ve earned is divided between several source revenue accounts or categories.', + 'split_intro_three_deposit' => 'For example: you could split your :total salary so you get :split_one as your base salary and :split_two as a reimbursment for expenses made.', + 'split_table_intro_deposit' => 'Split your deposit in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', + 'store_splitted_deposit' => 'Store splitted deposit', + 'split_title_transfer' => 'Split your new transfer', + 'split_intro_one_transfer' => 'Firefly supports the "splitting" of a transfer.', + 'split_intro_two_transfer' => 'It means that the amount of money you\'re moving is divided between several categories or piggy banks.', + 'split_intro_three_transfer' => 'For example: you could split your :total move so you get :split_one in one piggy bank and :split_two in another.', + 'split_table_intro_transfer' => 'Split your transfer in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', + 'store_splitted_transfer' => 'Store splitted transfer', + 'add_another_split' => 'Add another split', + 'split-transactions' => 'Split transactions', + 'split-new-transaction' => 'Split a new transaction', + 'do_split' => 'Do a split', + 'split_this_withdrawal' => 'Split this withdrawal', + 'split_this_deposit' => 'Split this deposit', + 'split_this_transfer' => 'Split this transfer', + 'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.', + 'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.', + 'no_edit_multiple_left' => 'You have selected no valid transactions to edit.', // import - 'configuration_file_help' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file.', - 'import_data_index' => 'Index', - 'import_file_type_csv' => 'CSV (comma separated values)', - 'import_file_type_help' => 'Select the type of file you will upload', - 'import_start' => 'Start the import', - 'configure_import' => 'Further configure your import', - 'import_finish_configuration' => 'Finish configuration', - 'settings_for_import' => 'Settings', - 'import_status' => 'Import status', - 'import_status_text' => 'The import is currently running, or will start momentarily.', - 'import_complete' => 'Import configuration complete!', - 'import_complete_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.', - 'import_download_config' => 'Download configuration', - 'import_start_import' => 'Start import', - 'import_data' => 'Import data', - 'import_data_full' => 'Import data into Firefly III', - 'import' => 'Import', - 'import_file_help' => 'Select your file', - 'import_status_settings_complete' => 'The import is ready to start.', - 'import_status_import_complete' => 'The import has completed.', - 'import_status_import_running' => 'The import is currently running. Please be patient.', - 'import_status_header' => 'Import status and progress', - 'import_status_errors' => 'Import errors', - 'import_status_report' => 'Import report', - 'import_finished' => 'Import has finished', - 'import_error_single' => 'An error has occured during the import.', - 'import_error_multi' => 'Some errors occured during the import.', - 'import_error_fatal' => 'There was an error during the import routine. Please check the log files. The error seems to be:', - 'import_error_timeout' => 'The import seems to have timed out. If this error persists, please import your data using the console command.', - 'import_double' => 'Row #:row: This row has been imported before, and is stored in :description.', - 'import_finished_all' => 'The import has finished. Please check out the results below.', - 'import_with_key' => 'Import with key \':key\'', - 'import_share_configuration' => 'Please consider downloading your configuration and sharing it at the import configuration center. This will allow other users of Firefly III to import their files more easily.', - 'import_finished_report' => 'The import has finished. Please note any errors in the block above this line. All transactions imported during this particular session have been tagged, and you can check them out below. ', - 'import_finished_link' => 'The transactions imported can be found in tag :tag.', - 'need_at_least_one_account' => 'You need at least one asset account to be able to create piggy banks', - 'see_help_top_right' => 'For more information, please check out the help pages using the icon in the top right corner of the page.', + 'configuration_file_help' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file.', + 'import_data_index' => 'Index', + 'import_file_type_csv' => 'CSV (comma separated values)', + 'import_file_type_help' => 'Select the type of file you will upload', + 'import_start' => 'Start the import', + 'configure_import' => 'Further configure your import', + 'import_finish_configuration' => 'Finish configuration', + 'settings_for_import' => 'Settings', + 'import_status' => 'Import status', + 'import_status_text' => 'The import is currently running, or will start momentarily.', + 'import_complete' => 'Import configuration complete!', + 'import_complete_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.', + 'import_download_config' => 'Download configuration', + 'import_start_import' => 'Start import', + 'import_data' => 'Import data', + 'import_data_full' => 'Import data into Firefly III', + 'import' => 'Import', + 'import_file_help' => 'Select your file', + 'import_status_settings_complete' => 'The import is ready to start.', + 'import_status_import_complete' => 'The import has completed.', + 'import_status_import_running' => 'The import is currently running. Please be patient.', + 'import_status_header' => 'Import status and progress', + 'import_status_errors' => 'Import errors', + 'import_status_report' => 'Import report', + 'import_finished' => 'Import has finished', + 'import_error_single' => 'An error has occured during the import.', + 'import_error_multi' => 'Some errors occured during the import.', + 'import_error_fatal' => 'There was an error during the import routine. Please check the log files. The error seems to be:', + 'import_error_timeout' => 'The import seems to have timed out. If this error persists, please import your data using the console command.', + 'import_double' => 'Row #:row: This row has been imported before, and is stored in :description.', + 'import_finished_all' => 'The import has finished. Please check out the results below.', + 'import_with_key' => 'Import with key \':key\'', + 'import_share_configuration' => 'Please consider downloading your configuration and sharing it at the import configuration center. This will allow other users of Firefly III to import their files more easily.', + 'import_finished_report' => 'The import has finished. Please note any errors in the block above this line. All transactions imported during this particular session have been tagged, and you can check them out below. ', + 'import_finished_link' => 'The transactions imported can be found in tag :tag.', + 'need_at_least_one_account' => 'You need at least one asset account to be able to create piggy banks', + 'see_help_top_right' => 'For more information, please check out the help pages using the icon in the top right corner of the page.', ]; diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index cb264972d0..8933321f5d 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -64,12 +64,12 @@ return [ 'revenue_account_source' => 'Revenue account (source)', 'source_account_asset' => 'Source account (asset account)', 'destination_account_expense' => 'Destination account (expense account)', - 'destination_account_asset' => 'Destination account (asset account)', + 'destination_account_asset' => 'Destination account (asset account)', 'source_account_revenue' => 'Source account (revenue account)', 'type' => 'Type', 'convert_Withdrawal' => 'Convert withdrawal', - 'convert_Deposit' => 'Convert deposit', - 'convert_Transfer' => 'Convert transfer', + 'convert_Deposit' => 'Convert deposit', + 'convert_Transfer' => 'Convert transfer', 'amount' => 'Amount', @@ -150,6 +150,8 @@ return [ // admin 'domain' => 'Domain', 'single_user_mode' => 'Single user mode', + 'must_confirm_account' => 'New users must activate account', + 'is_demo_site' => 'Is demo site', // import 'import_file' => 'Import file', diff --git a/resources/views/admin/configuration/index.twig b/resources/views/admin/configuration/index.twig index 73e183c8b2..0864dfe379 100644 --- a/resources/views/admin/configuration/index.twig +++ b/resources/views/admin/configuration/index.twig @@ -10,7 +10,7 @@ - + {# single user mode #}
@@ -24,16 +24,47 @@
+ {# need to activate account #} +
+
+
+

{{ 'setting_must_confirm_account'|_ }}

+
+
+

+ {{ 'setting_must_confirm_account_explain'|_ }} +

+ {{ ExpandedForm.checkbox('must_confirm_account','1', mustConfirmAccount) }} +
+
+
+ + {# installation is demo site #} +
+
+
+

{{ 'setting_is_demo_site'|_ }}

+
+
+

+ {{ 'setting_is_demo_site_explain'|_ }} +

+ {{ ExpandedForm.checkbox('is_demo_site','1', isDemoSite) }} +
+
+