1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Localize system settings page

This commit is contained in:
Hillel Coren 2017-06-13 20:38:52 +03:00
parent fb0d448099
commit b8fd656349
2 changed files with 34 additions and 20 deletions

View File

@ -2266,6 +2266,20 @@ $LANG = array(
'analytics_key' => 'Analytics Key',
'analytics_key_help' => 'Track payments using :link',
'start_date_required' => 'The start date is required',
'application_settings' => 'Application Settings',
'database_connection' => 'Database Connection',
'driver' => 'Driver',
'host' => 'Host',
'database' => 'Database',
'test_connection' => 'Test connection',
'from_name' => 'From Name',
'from_address' => 'From Address',
'port' => 'Port',
'encryption' => 'Encryption',
'mailgun_domain' => 'Mailgun Domain',
'mailgun_private_key' => 'Mailgun Private Key',
'send_test_email' => 'Send test email',
);

View File

@ -1,6 +1,6 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Application Settings</h3>
<h3 class="panel-title">{{ trans('texts.application_settings') }}</h3>
</div>
<div class="panel-body form-padding-right">
{!! Former::text('app[url]')->label(trans('texts.url'))->value(isset($_ENV['APP_URL']) ? $_ENV['APP_URL'] : Request::root()) !!}
@ -12,52 +12,52 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Database Connection</h3>
<h3 class="panel-title">{{ trans('texts.database_connection') }}</h3>
</div>
<div class="panel-body form-padding-right">
{{--- Former::select('database[default]')->label('Driver')->options(['mysql' => 'MySQL', 'pgsql' => 'PostgreSQL', 'sqlite' => 'SQLite'])
{{--- Former::select('database[default]')->label('driver')->options(['mysql' => 'MySQL', 'pgsql' => 'PostgreSQL', 'sqlite' => 'SQLite'])
->value(isset($_ENV['DB_TYPE']) ? $_ENV['DB_TYPE'] : 'mysql') ---}}
{!! Former::plaintext('Driver')->value('MySQL') !!}
{!! Former::text('database[type][host]')->label('Host')->value(isset($_ENV['DB_HOST']) ? $_ENV['DB_HOST'] : 'localhost') !!}
{!! Former::text('database[type][database]')->label('Database')->value(isset($_ENV['DB_DATABASE']) ? $_ENV['DB_DATABASE'] : 'ninja') !!}
{!! Former::text('database[type][username]')->label('Username')->value(isset($_ENV['DB_USERNAME']) ? $_ENV['DB_USERNAME'] : 'ninja') !!}
{!! Former::password('database[type][password]')->label('Password')->value(isset($_ENV['DB_PASSWORD']) ? $_ENV['DB_PASSWORD'] : 'ninja') !!}
{!! Former::actions( Button::primary('Test connection')->small()->withAttributes(['onclick' => 'testDatabase()']), '&nbsp;&nbsp;<span id="dbTestResult"/>' ) !!}
{!! Former::text('database[type][host]')->label('host')->value(isset($_ENV['DB_HOST']) ? $_ENV['DB_HOST'] : 'localhost') !!}
{!! Former::text('database[type][database]')->label('database')->value(isset($_ENV['DB_DATABASE']) ? $_ENV['DB_DATABASE'] : 'ninja') !!}
{!! Former::text('database[type][username]')->label('username')->value(isset($_ENV['DB_USERNAME']) ? $_ENV['DB_USERNAME'] : 'ninja') !!}
{!! Former::password('database[type][password]')->label('password')->value(isset($_ENV['DB_PASSWORD']) ? $_ENV['DB_PASSWORD'] : 'ninja') !!}
{!! Former::actions( Button::primary(trans('texts.test_connection'))->small()->withAttributes(['onclick' => 'testDatabase()']), '&nbsp;&nbsp;<span id="dbTestResult"/>' ) !!}
</div>
</div>
@if (!isset($_ENV['POSTMARK_API_TOKEN']))
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Email Settings</h3>
<h3 class="panel-title">{{ trans('texts.email_settings') }}</h3>
</div>
<div class="panel-body form-padding-right">
{!! Former::select('mail[driver]')->label('Driver')->options(['smtp' => 'SMTP', 'mail' => 'Mail', 'sendmail' => 'Sendmail', 'mailgun' => 'Mailgun'])
{!! Former::select('mail[driver]')->label('driver')->options(['smtp' => 'SMTP', 'mail' => 'Mail', 'sendmail' => 'Sendmail', 'mailgun' => 'Mailgun'])
->value(isset($_ENV['MAIL_DRIVER']) ? $_ENV['MAIL_DRIVER'] : 'smtp')->setAttributes(['onchange' => 'mailDriverChange()']) !!}
{!! Former::text('mail[from][name]')->label('From Name')
{!! Former::text('mail[from][name]')->label('from_name')
->value(isset($_ENV['MAIL_FROM_NAME']) ? $_ENV['MAIL_FROM_NAME'] : '') !!}
{!! Former::text('mail[from][address]')->label('From Address')
{!! Former::text('mail[from][address]')->label('from_address')
->value(isset($_ENV['MAIL_FROM_ADDRESS']) ? $_ENV['MAIL_FROM_ADDRESS'] : '') !!}
{!! Former::text('mail[username]')->label('Username')
{!! Former::text('mail[username]')->label('username')
->value(isset($_ENV['MAIL_USERNAME']) ? $_ENV['MAIL_USERNAME'] : '') !!}
<div id="standardMailSetup">
{!! Former::text('mail[host]')->label('Host')
{!! Former::text('mail[host]')->label('host')
->value(isset($_ENV['MAIL_HOST']) ? $_ENV['MAIL_HOST'] : '') !!}
{!! Former::text('mail[port]')->label('Port')
{!! Former::text('mail[port]')->label('port')
->value(isset($_ENV['MAIL_PORT']) ? $_ENV['MAIL_PORT'] : '587') !!}
{!! Former::select('mail[encryption]')->label('Encryption')
{!! Former::select('mail[encryption]')->label('encryption')
->options(['tls' => 'TLS', 'ssl' => 'SSL', '' => 'None'])
->value(isset($_ENV['MAIL_ENCRYPTION']) ? $_ENV['MAIL_ENCRYPTION'] : 'tls') !!}
{!! Former::password('mail[password]')->label('Password')
{!! Former::password('mail[password]')->label('password')
->value(isset($_ENV['MAIL_PASSWORD']) ? $_ENV['MAIL_PASSWORD'] : '') !!}
</div>
<div id="mailgunMailSetup">
{!! Former::text('mail[mailgun_domain]')->label('Mailgun Domain')
{!! Former::text('mail[mailgun_domain]')->label('mailgun_domain')
->value(isset($_ENV['MAILGUN_DOMAIN']) ? $_ENV['MAILGUN_DOMAIN'] : '') !!}
{!! Former::text('mail[mailgun_secret]')->label('Mailgun Private Key')
{!! Former::text('mail[mailgun_secret]')->label('mailgun_private_key')
->value(isset($_ENV['MAILGUN_SECRET']) ? $_ENV['MAILGUN_SECRET'] : '') !!}
</div>
{!! Former::actions( Button::primary('Send test email')->small()->withAttributes(['onclick' => 'testMail()']), '&nbsp;&nbsp;<span id="mailTestResult"/>' ) !!}
{!! Former::actions( Button::primary(trans('texts.send_test_email'))->small()->withAttributes(['onclick' => 'testMail()']), '&nbsp;&nbsp;<span id="mailTestResult"/>' ) !!}
</div>
</div>
@endif