@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** @var array $url */ |
| 8 | 8 | /** @var array $properties */ |
| 9 | 9 | |
| 10 | -$rndId = 'btn_selectize_submit_' . mt_rand(999, 999999); |
|
| 10 | +$rndId = 'btn_selectize_submit_'.mt_rand(999, 999999); |
|
| 11 | 11 | $properties['id'] = $rndId; |
| 12 | 12 | |
| 13 | 13 | echo (new \Ffcms\Templex\Helper\Html\Dom())->button(function() use ($text) { |
@@ -13,11 +13,14 @@ |
||
| 13 | 13 | |
| 14 | 14 | <?php if (App::$Captcha->isFull()): ?> |
| 15 | 15 | <div class="col-md-9 offset-md-3"><?= $html ?></div> |
| 16 | -<?php else: ?> |
|
| 16 | +<?php else { |
|
| 17 | + : ?> |
|
| 17 | 18 | <div class="row"> |
| 18 | 19 | <div class="col-md-9 offset-md-3"> |
| 19 | 20 | <img src="<?= $html ?>" alt="captcha" onClick="this.src='<?=$html?>&rnd='+Math.random()" /> |
| 20 | 21 | </div> |
| 21 | 22 | </div> |
| 22 | 23 | <?= $form->fieldset()->text($name, null, __('Enter data from security image to prove that you are human. If you can\'t read symbols - click on image to reload')) ?> |
| 23 | -<?php endif; ?> |
|
| 24 | 24 | \ No newline at end of file |
| 25 | +<?php endif; |
|
| 26 | +} |
|
| 27 | +?> |
|
| 25 | 28 | \ No newline at end of file |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 89 | 89 | SOFTWARE.</textarea> |
| 90 | 90 | <br /> |
| 91 | -<?php if($model->checkAll()): ?> |
|
| 91 | +<?php if ($model->checkAll()): ?> |
|
| 92 | 92 | <div class="row"> |
| 93 | 93 | <div class="col-3" style="padding-top: 5px;padding-left: 25px;"> |
| 94 | 94 | <input type="checkbox" id="agree-license" /> <label for="agree-license"><?= __('Accept license') ?></label> |
@@ -97,9 +97,12 @@ |
||
| 97 | 97 | <a href="#license" class="btn btn-success btn-block disabled" id="install-link"><?= __('Start install') ?></a> |
| 98 | 98 | </div> |
| 99 | 99 | </div> |
| 100 | -<?php else: ?> |
|
| 100 | +<?php else { |
|
| 101 | + : ?> |
|
| 101 | 102 | <?= \Ffcms\Templex\Url\Url::a(['main/index'], __('Check again'), ['class' => 'btn btn-warning btn-block']) ?> |
| 102 | -<?php endif; ?> |
|
| 103 | +<?php endif; |
|
| 104 | +} |
|
| 105 | +?> |
|
| 103 | 106 | <script> |
| 104 | 107 | $(document).ready(function () { |
| 105 | 108 | $('#agree-license').change(function () { |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | var script_lang = '<?= \App::$Request->getLanguage() ?>'; |
| 26 | 26 | var site_url = '<?= \App::$Alias->baseUrl ?>'; |
| 27 | 27 | </script> |
| 28 | - <?php if (!isset($fullgrid)){ $fullgrid = false; } ?> |
|
| 28 | + <?php if (!isset($fullgrid)) { $fullgrid = false; } ?> |
|
| 29 | 29 | </head> |
| 30 | 30 | |
| 31 | 31 | <body> |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $allCfg['adminEmail'] = $email; |
| 125 | 125 | $allCfg['baseDomain'] = $domain; |
| 126 | 126 | $output->writeln('Generate security cookies for debug panel'); |
| 127 | - $allCfg['debug']['cookie']['key'] = 'fdebug_' . Crypt::randomString(mt_rand(8, 32)); |
|
| 127 | + $allCfg['debug']['cookie']['key'] = 'fdebug_'.Crypt::randomString(mt_rand(8, 32)); |
|
| 128 | 128 | $allCfg['debug']['cookie']['value'] = Crypt::randomString(mt_rand(32, 128)); |
| 129 | 129 | // write config data |
| 130 | 130 | $writeCfg = Console::$Properties->writeConfig('default', $allCfg); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | return; |
| 134 | 134 | } |
| 135 | 135 | File::write('/Private/Install/install.lock', 'Install is locked'); |
| 136 | - $output->writeln('Congratulations! FFCMS are successful installed. Used version: ' . Version::VERSION . ' since ' . Version::DATE); |
|
| 136 | + $output->writeln('Congratulations! FFCMS are successful installed. Used version: '.Version::VERSION.' since '.Version::DATE); |
|
| 137 | 137 | $output->writeln(''); |
| 138 | 138 | $output->writeln('> Please, use "php console.php main:adduser" to add admin account(set role=4) or you are unavailable to manage cms.'); |
| 139 | 139 | } |
@@ -105,14 +105,14 @@ |
||
| 105 | 105 | $cfg['baseDomain'] = $this->baseDomain; |
| 106 | 106 | $cfg['database'] = $this->db; |
| 107 | 107 | $cfg['singleLanguage'] = $this->singleLanguage; |
| 108 | - $cfg['multiLanguage'] = (bool)$this->multiLanguage; |
|
| 109 | - $cfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$'; |
|
| 110 | - $cfg['debug']['cookie']['key'] = 'fdebug_' . Crypt::randomString(mt_rand(4, 16)); |
|
| 108 | + $cfg['multiLanguage'] = (bool) $this->multiLanguage; |
|
| 109 | + $cfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$'; |
|
| 110 | + $cfg['debug']['cookie']['key'] = 'fdebug_'.Crypt::randomString(mt_rand(4, 16)); |
|
| 111 | 111 | $cfg['debug']['cookie']['value'] = Crypt::randomString(mt_rand(32, 128)); |
| 112 | 112 | $cfg['mail'] = $this->mail; |
| 113 | 113 | |
| 114 | 114 | // initialize migrations table |
| 115 | - App::$Database->getConnection('install')->getSchemaBuilder()->create('migrations', function ($table) { |
|
| 115 | + App::$Database->getConnection('install')->getSchemaBuilder()->create('migrations', function($table) { |
|
| 116 | 116 | $table->increments('id'); |
| 117 | 117 | $table->string('migration', 128)->unique(); |
| 118 | 118 | $table->timestamps(); |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | <?php |
| 8 | 8 | $menu = $this->bootstrap()->nav('ul', ['class' => 'nav-tabs nav-fill']) |
| 9 | 9 | ->menu(['text' => __('User list'), 'link' => ['user/index']]); |
| 10 | -if ((int)$configs['registrationType'] === 0) { |
|
| 10 | +if ((int) $configs['registrationType'] === 0) { |
|
| 11 | 11 | $menu->menu(['text' => __('Invitation list'), 'link' => ['user/invitelist']]); |
| 12 | 12 | } |
| 13 | 13 | $menu->menu(['text' => __('Role management'), 'link' => ['user/rolelist']]) |
@@ -23,54 +23,54 @@ |
||
| 23 | 23 | |
| 24 | 24 | <?= $this->bootstrap()->nav('ul', ['class' => 'nav-tabs']) |
| 25 | 25 | ->menu(['text' => __('Base'), 'tab' => function() use ($form) { |
| 26 | - return $form->fieldset()->text('baseDomain', ['class' => 'form-control'], __('Main domain of website. Use only in console or cron tasks, if domain cannot be defined from request string')) . |
|
| 27 | - $form->fieldset()->radio('baseProto', ['options' => ['http', 'https']], __('Main website transfer protocol. Use only if request data is not available in console or cron tasks')) . |
|
| 28 | - $form->fieldset()->text('basePath', ['class' => 'form-control'], __('FFCMS installation sub-directory, used if installed not in root. Example: /subdir/')) . |
|
| 29 | - $form->fieldset()->select('timezone', ['class' => 'form-control', 'options' => DateTimeZone::listIdentifiers()], __('Define website default timezone id')) . |
|
| 30 | - $form->fieldset()->boolean('userCron', null, __('Initialize cron manager when user load website? Enable this option if you are not configured cron tasks in your operation system')) . |
|
| 31 | - $form->fieldset()->boolean('debug.all', null, __('Enable debug bar panel for all visitors? Recommended only on development environment')) . |
|
| 26 | + return $form->fieldset()->text('baseDomain', ['class' => 'form-control'], __('Main domain of website. Use only in console or cron tasks, if domain cannot be defined from request string')). |
|
| 27 | + $form->fieldset()->radio('baseProto', ['options' => ['http', 'https']], __('Main website transfer protocol. Use only if request data is not available in console or cron tasks')). |
|
| 28 | + $form->fieldset()->text('basePath', ['class' => 'form-control'], __('FFCMS installation sub-directory, used if installed not in root. Example: /subdir/')). |
|
| 29 | + $form->fieldset()->select('timezone', ['class' => 'form-control', 'options' => DateTimeZone::listIdentifiers()], __('Define website default timezone id')). |
|
| 30 | + $form->fieldset()->boolean('userCron', null, __('Initialize cron manager when user load website? Enable this option if you are not configured cron tasks in your operation system')). |
|
| 31 | + $form->fieldset()->boolean('debug.all', null, __('Enable debug bar panel for all visitors? Recommended only on development environment')). |
|
| 32 | 32 | $form->fieldset()->boolean('testSuite', null, __('Enable codeception test suite adapter? Use this option ONLY to run codeception tests! Disable this option on production')); |
| 33 | 33 | }, 'tabActive' => true]) |
| 34 | 34 | ->menu(['text' => __('Themes'), 'tab' => function() use ($form, $model) { |
| 35 | - return $form->fieldset()->select('theme.Front', ['class' => 'form-control', 'options' => $model->getAvailableThemes('Front')], __('Set theme for user part of website')) . |
|
| 35 | + return $form->fieldset()->select('theme.Front', ['class' => 'form-control', 'options' => $model->getAvailableThemes('Front')], __('Set theme for user part of website')). |
|
| 36 | 36 | $form->fieldset()->select('theme.Admin', ['class' => 'form-control', 'options' => $model->getAvailableThemes('Admin')], __('Set theme for admin panel')); |
| 37 | 37 | }]) |
| 38 | 38 | ->menu(['text' => __('Mail'), 'tab' => function() use ($form) { |
| 39 | - return '<p>' . __('Configure sendmail over smtp server. You should set host:port and auth data for your smtp server') . '</p>' . |
|
| 40 | - $form->fieldset()->text('mail.host', ['class' => 'form-control'], __('Set SMTP hostname or ip')) . |
|
| 41 | - $form->fieldset()->text('mail.port', ['class' => 'form-control'], __('Set SMTP connection port')) . |
|
| 42 | - $form->fieldset()->select('mail.encrypt', ['class' => 'form-control', 'options' => ['tls', 'ssl', 'none']], __('Set encryption method for your smtp server. For remote service we are strongly recommend use tls/ssl encryption')) . |
|
| 43 | - $form->fieldset()->text('mail.user', ['class' => 'form-control'], __('Set auth user name if required')) . |
|
| 39 | + return '<p>'.__('Configure sendmail over smtp server. You should set host:port and auth data for your smtp server').'</p>'. |
|
| 40 | + $form->fieldset()->text('mail.host', ['class' => 'form-control'], __('Set SMTP hostname or ip')). |
|
| 41 | + $form->fieldset()->text('mail.port', ['class' => 'form-control'], __('Set SMTP connection port')). |
|
| 42 | + $form->fieldset()->select('mail.encrypt', ['class' => 'form-control', 'options' => ['tls', 'ssl', 'none']], __('Set encryption method for your smtp server. For remote service we are strongly recommend use tls/ssl encryption')). |
|
| 43 | + $form->fieldset()->text('mail.user', ['class' => 'form-control'], __('Set auth user name if required')). |
|
| 44 | 44 | $form->fieldset()->text('mail.password', ['class' => 'form-control'], __('Set auth user password if exist')); |
| 45 | 45 | }]) |
| 46 | 46 | ->menu(['text' => __('Localization'), 'tab' => function() use ($form) { |
| 47 | - return $form->fieldset()->select('singleLanguage', ['class' => 'form-control', 'options' => \App::$Translate->getAvailableLangs()], __('Default language of website')) . |
|
| 48 | - $form->fieldset()->boolean('multiLanguage', null, __('Must we use multi language system in site pathway')) . |
|
| 49 | - $form->fieldset()->text('baseLanguage', ['class' => 'form-control', 'disabled' => null], __('Website base script language. Do not change it')) . |
|
| 47 | + return $form->fieldset()->select('singleLanguage', ['class' => 'form-control', 'options' => \App::$Translate->getAvailableLangs()], __('Default language of website')). |
|
| 48 | + $form->fieldset()->boolean('multiLanguage', null, __('Must we use multi language system in site pathway')). |
|
| 49 | + $form->fieldset()->text('baseLanguage', ['class' => 'form-control', 'disabled' => null], __('Website base script language. Do not change it')). |
|
| 50 | 50 | $form->fieldset()->checkboxes('languages', ['options' => App::$Translate->getAvailableLangs()], __('Website available languages')); |
| 51 | 51 | |
| 52 | 52 | }]) |
| 53 | 53 | ->menu(['text' => __('Database'), 'tab' => function() use ($form) { |
| 54 | - return '<p>' . __('Do not change any information in this tab if you not sure what you do!') . '</p>' . |
|
| 55 | - $form->fieldset()->select('database.driver', ['class' => 'form-control', 'options' => ['mysql', 'sqlite', 'pgsql']], __('Database connection driver')) . |
|
| 56 | - $form->fieldset()->text('database.host', ['class' => 'form-control'], __('Database connection host name')) . |
|
| 57 | - $form->fieldset()->text('database.database', ['class' => 'form-control'], __('Database name or path to sqlite created file database')) . |
|
| 58 | - $form->fieldset()->text('database.username', ['class' => 'form-control'], __('User name for database connection')) . |
|
| 59 | - $form->fieldset()->text('database.password', ['class' => 'form-control'], __('Password for user of database connection')) . |
|
| 60 | - $form->fieldset()->text('database.charset', ['class' => 'form-control']) . |
|
| 61 | - $form->fieldset()->text('database.collation', ['class' => 'form-control']) . |
|
| 54 | + return '<p>'.__('Do not change any information in this tab if you not sure what you do!').'</p>'. |
|
| 55 | + $form->fieldset()->select('database.driver', ['class' => 'form-control', 'options' => ['mysql', 'sqlite', 'pgsql']], __('Database connection driver')). |
|
| 56 | + $form->fieldset()->text('database.host', ['class' => 'form-control'], __('Database connection host name')). |
|
| 57 | + $form->fieldset()->text('database.database', ['class' => 'form-control'], __('Database name or path to sqlite created file database')). |
|
| 58 | + $form->fieldset()->text('database.username', ['class' => 'form-control'], __('User name for database connection')). |
|
| 59 | + $form->fieldset()->text('database.password', ['class' => 'form-control'], __('Password for user of database connection')). |
|
| 60 | + $form->fieldset()->text('database.charset', ['class' => 'form-control']). |
|
| 61 | + $form->fieldset()->text('database.collation', ['class' => 'form-control']). |
|
| 62 | 62 | $form->fieldset()->text('database.prefix', ['class' => 'form-control'], __('Database tables prefix')); |
| 63 | 63 | }]) |
| 64 | 64 | ->menu(['text' => __('Debug'), 'tab' => function() use ($form){ |
| 65 | - return '<p>' . __('The key-value of cookie to enable debugging on website') . '. ' . __('If user got this cookie he can see debug bar') . '. ' . |
|
| 66 | - Url::a(['main/debugcookie'], __('Set cookie for me')) . '</p>' . |
|
| 67 | - $form->fieldset()->text('debug.cookie.key', ['class' => 'form-control'], __('Set cookie name(key) for enable debug bar panel')) . |
|
| 65 | + return '<p>'.__('The key-value of cookie to enable debugging on website').'. '.__('If user got this cookie he can see debug bar').'. '. |
|
| 66 | + Url::a(['main/debugcookie'], __('Set cookie for me')).'</p>'. |
|
| 67 | + $form->fieldset()->text('debug.cookie.key', ['class' => 'form-control'], __('Set cookie name(key) for enable debug bar panel')). |
|
| 68 | 68 | $form->fieldset()->text('debug.cookie.value', ['class' => 'form-control'], __('Set cookie value for enable debug bar panel')); |
| 69 | 69 | }]) |
| 70 | 70 | ->menu(['text' => __('Other'), 'tab' => function() use ($form){ |
| 71 | - return '<p>' . __('There you can change specified configs depends of other platforms. GA = google analytics.') . '</p>' . |
|
| 72 | - $form->fieldset()->text('gaClientId', ['class' => 'form-control'], __('Google oAuth2 client id. This id will be used to display google.analytics info. Client ID looks like: xxxxxx.apps.googleusercontent.com')) . |
|
| 73 | - $form->fieldset()->text('gaTrackId', ['class' => 'form-control'], __('Set google analytics tracking id for your website. Track id looks like: UA-XXXXXX-Y')) . |
|
| 71 | + return '<p>'.__('There you can change specified configs depends of other platforms. GA = google analytics.').'</p>'. |
|
| 72 | + $form->fieldset()->text('gaClientId', ['class' => 'form-control'], __('Google oAuth2 client id. This id will be used to display google.analytics info. Client ID looks like: xxxxxx.apps.googleusercontent.com')). |
|
| 73 | + $form->fieldset()->text('gaTrackId', ['class' => 'form-control'], __('Set google analytics tracking id for your website. Track id looks like: UA-XXXXXX-Y')). |
|
| 74 | 74 | $form->fieldset()->text('trustedProxy', ['class' => 'form-control'], __('Set trusted proxy list to accept X-FORWARDED data. Example: 103.21.244.15,103.22.200.0/22')); |
| 75 | 75 | }]) |
| 76 | 76 | ->display(); ?> |
@@ -48,10 +48,10 @@ |
||
| 48 | 48 | $table->row([ |
| 49 | 49 | ['text' => $row->id], |
| 50 | 50 | ['text' => $row->getLocaled('name')], |
| 51 | - ['text' => '<span class="' . $labelClass . '">' . $row->type . '</span>', 'html' => true], |
|
| 52 | - ['text' => '<code>' . ($row->reg_cond == 0 ? '!' : null) . 'preg_match("' . $row->reg_exp . '", input)' . '</code>', 'html' => true], |
|
| 51 | + ['text' => '<span class="'.$labelClass.'">'.$row->type.'</span>', 'html' => true], |
|
| 52 | + ['text' => '<code>'.($row->reg_cond == 0 ? '!' : null).'preg_match("'.$row->reg_exp.'", input)'.'</code>', 'html' => true], |
|
| 53 | 53 | [ |
| 54 | - 'text' => Url::a(['profile/fieldupdate', [$row->id]], '<i class="fa fa-pencil fa-lg"></i> ', ['html' => true]) . |
|
| 54 | + 'text' => Url::a(['profile/fieldupdate', [$row->id]], '<i class="fa fa-pencil fa-lg"></i> ', ['html' => true]). |
|
| 55 | 55 | Url::a(['profile/fielddelete', [$row->id]], '<i class="fa fa-trash-o fa-lg"></i>', ['html' => true]), |
| 56 | 56 | 'html' => true, |
| 57 | 57 | 'properties' => ['class' => 'text-center'] |