Expand firefly config.

This commit is contained in:
James Cole 2016-11-07 18:49:35 +01:00
parent a6a9794fc7
commit f653bc5f6e
14 changed files with 198 additions and 144 deletions

View File

@ -35,7 +35,6 @@ MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
SEND_REGISTRATION_MAIL=true
MUST_CONFIRM_ACCOUNT=false
SHOW_INCOMPLETE_TRANSLATIONS=false

View File

@ -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();

View File

@ -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')));

View File

@ -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;
}

View File

@ -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'));
}
/**

View File

@ -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:

View File

@ -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'));
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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,
];

View File

@ -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 <a href=":link">settings</a>.',
'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 <a href=":link">settings</a>.',
'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 <a href="https://github.com/firefly-iii/import-configurations/wiki">configuration file</a>.',
'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 <a href=":link">:description</a>.',
'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 <strong><a href="https://github.com/firefly-iii/import-configurations/wiki">import configuration center</a></strong>. 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 <a href=":link" class="label label-success" style="font-size:100%;font-weight:normal;">:tag</a>.',
'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 <a href="https://github.com/firefly-iii/import-configurations/wiki">configuration file</a>.',
'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 <a href=":link">:description</a>.',
'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 <strong><a href="https://github.com/firefly-iii/import-configurations/wiki">import configuration center</a></strong>. 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 <a href=":link" class="label label-success" style="font-size:100%;font-weight:normal;">:tag</a>.',
'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.',
];

View File

@ -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',

View File

@ -10,7 +10,7 @@
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<!-- single user mode -->
{# single user mode #}
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<div class="box box-default">
<div class="box-header with-border">
@ -24,16 +24,47 @@
</div>
</div>
</div>
{# need to activate account #}
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{ 'setting_must_confirm_account'|_ }}</h3>
</div>
<div class="box-body">
<p class="text-info">
{{ 'setting_must_confirm_account_explain'|_ }}
</p>
{{ ExpandedForm.checkbox('must_confirm_account','1', mustConfirmAccount) }}
</div>
</div>
</div>
{# installation is demo site #}
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{ 'setting_is_demo_site'|_ }}</h3>
</div>
<div class="box-body">
<p class="text-info">
{{ 'setting_is_demo_site_explain'|_ }}
</p>
{{ ExpandedForm.checkbox('is_demo_site','1', isDemoSite) }}
</div>
</div>
</div>
<!-- configuration setting block -->
<!--
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{ 'setting'|_ }}</h3>
<h3 class="box-title">{{ 'setting_x'|_ }}</h3>
</div>
<div class="box-body">
Bla bla bla
<p class="text-info">
{{ 'setting_x_explain'|_ }}
</p>
</div>
</div>
</div>

View File

@ -17,7 +17,7 @@
<div class="register-box-body">
<p class="login-box-msg">Register a new account</p>
{% if showDemoWarning %}
{% if isDemoSite %}
<p class="text-info login-box-msg">Please note that an account on this site will only
work for one (1) month.</p>
{% endif %}
@ -27,9 +27,9 @@
<div class="form-group has-feedback">
<input type="email" name="email" value="{{ email }}" class="form-control" placeholder="Email"/>
{% if showDemoWarning %}
<p class="help-block">You will receive an email from Firefly III. If your email address
is incorrect, your account may not work.</p>
{% if mustConfirmAccount %}
<p class="help-block">
You must activate your account. If your email address is incorrect, your account will not work.</p>
{% endif %}
</div>
<div class="form-group has-feedback">