Passed
Push — master ( 29baaf...069627 )
by Mihail
06:51
created

Apps/View/Admin/default/main/settings.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/** @var $model object */
4
/** @var $this object */
5
use Ffcms\Core\Helper\HTML\Form;
6
use Ffcms\Core\Helper\Url;
7
8
$this->breadcrumbs = [
9
    Url::to('main/index') => __('Main'),
10
    __('Settings')
11
];
12
$this->title = __('Settings');
13
14
?>
15
16
<h1><?= __('Settings') ?></h1>
17
<hr />
18
19
<?php
20
21
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post']);
22
echo $form->start();
0 ignored issues
show
The method start() does not seem to exist on object<Ffcms\Core\Helper\HTML\Form>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
23
$baseTab = $form->field('basePath', 'text', ['class' => 'form-control'], __('FFCMS installation sub-directory, used if installed not in root. Example: /subdir/'));
24
$baseTab .= $form->field('adminEmail', 'email', ['class' => 'form-control'], __('Define administrator email. Used in mailing functions. Other mail settings in /Private/Config/Object.php'));
25
$baseTab .= $form->field('debug.all', 'checkbox', null, __('Enable debug bar panel for all visitors? Recommended only on development environment'));
26
27
$themeTab = $form->field('theme.Front', 'select', ['class' => 'form-control', 'options' => $model->getAvailableThemes('Front')]);
28
$themeTab .= $form->field('theme.Admin', 'select', ['class' => 'form-control', 'options' => $model->getAvailableThemes('Admin')]);
29
30
$debugTab = '<p>' . __('The key-value of cookie to enable debugging on website') . '. ' . __('If user got this cookie he can see debug bar') . '. ' .
31
    Url::link(['main/debugcookie'], __('Set cookie for me')) . '</p>';
32
$debugTab .= $form->field('debug.cookie.key', 'text', ['class' => 'form-control'], __('Set cookie name(key) for enable debug bar panel'));
33
$debugTab .= $form->field('debug.cookie.value', 'text', ['class' => 'form-control'], __('Set cookie value for enable debug bar panel'));
34
35
$langTab = $form->field('singleLanguage', 'select', ['class' => 'form-control', 'options' => \App::$Translate->getAvailableLangs()], __('Default language of website'));
36
$langTab .= $form->field('multiLanguage', 'checkbox', null, __('Must we use multi language system in site pathway'));
37
$langTab .= $form->field('baseLanguage', 'text', ['class' => 'form-control', 'disabled' => null], __('Website base script language. Do not change it'));
38
$langTab .= $form->field('languages', 'checkboxes', ['options' => ['ru', 'en']], __('Website available languages'));
39
40
$databaseTab = '<p>' . __('Do not change any information in this tab if you not sure what you do!') . '</p>';
41
$databaseTab .= $form->field('database.driver', 'select', ['class' => 'form-control', 'options' => ['mysql', 'sqlite', 'pgsql']], __('Database connection driver'));
42
$databaseTab .= $form->field('database.host', 'text', ['class' => 'form-control'], __('Database connection host name'));
43
$databaseTab .= $form->field('database.database', 'text', ['class' => 'form-control'], __('Database name or path to sqlite created file database'));
44
$databaseTab .= $form->field('database.username', 'text', ['class' => 'form-control'], __('User name for database connection'));
45
$databaseTab .= $form->field('database.password', 'text', ['class' => 'form-control'], __('Password for user of database connection'));
46
$databaseTab .= $form->field('database.charset', 'text', ['class' => 'form-control']);
47
$databaseTab .= $form->field('database.collation', 'text', ['class' => 'form-control']);
48
$databaseTab .= $form->field('database.prefix', 'text', ['class' => 'form-control'], __('Database tables prefix'));
49
50
?>
51
52
<?php echo \Ffcms\Core\Helper\HTML\Bootstrap\Nav::display([
53
    'property' => ['class' => 'nav-tabs'],
54
    'tabAnchor' => 'obj-settings',
55
    'items' => [
56
        ['type' => 'tab', 'text' => __('Base'), 'content' => $baseTab, 'html' => true, '!secure' => true],
57
        ['type' => 'tab', 'text' => __('Themes'), 'content' => $themeTab, 'html' => true, '!secure' => true],
58
        ['type' => 'tab', 'text' => __('Localization'), 'content' => $langTab, 'html' => true, '!secure' => true],
59
        ['type' => 'tab', 'text' => __('Database'), 'content' => $databaseTab, 'html' => true, '!secure' => true],
60
        ['type' => 'tab', 'text' => __('Debug'), 'content' => $debugTab, 'html' => true, '!secure' => true],
61
        ['type' => 'tab', 'text' => __('Other'), 'content' => 'This is an other content of other tab!']
62
    ]
63
]); ?>
64
65
    <div class="col-md-9 col-md-offset-3"><?= $form->submitButton(__('Save'), ['class' => 'btn btn-primary']) ?></div>
66
67
<?= $form->finish() ?>