Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/modules/admin/views/page/ |
Upload File : |
<?php use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\ActiveForm; use dosamigos\tinymce\TinyMce; use yii\web\JsExpression; use yii\web\View; /* @var $this yii\web\View */ /* @var $model app\models\Page */ /* @var $form yii\widgets\ActiveForm */ $this->registerJsFile(Yii::getAlias('@web/js/tinymce/tinymce.min.js')); $js = <<< JS var settings = { selector: '#edit_tinymce', language_url : '/js/tinymce/langs/uk_UA.js', plugins: [ "advlist autolink lists link image charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen", "insertdatetime media nonbreaking save table directionality", "emoticons template paste" ], menubar: false, toolbar1: "save | undo redo | styleselect fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image table", toolbar2: "bold italic | fontselect | fontsizeselect | forecolor backcolor | print preview media | forecolor backcolor emoticons | code", fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt", image_advtab: true, statusbar: false, external_filemanager_path:"/filemanager/", filemanager_title:"Менеджер файлів" , external_plugins: { filemanager : "/filemanager/plugin.min.js", responsivefilemanager: '/js/tinymce/plugins/responsivefilemanager/plugin.min.js', }, realative_urls: false }; tinymce.init(settings); document.querySelectorAll('[name=look-radio]').forEach(function(el) { el.addEventListener('change', function() { if (this.value === '1') { tinymce.remove('#edit_tinymce'); } else { tinymce.init(settings); } }); }); JS; $this->registerJs($js, View::POS_END); ?> <div class="page-form"> <?php $form = ActiveForm::begin(); ?> <div class="row"> <div class="col-sm-6"> <?= Html::radioList('look-radio', '0', ['0' => 'Вигляд', '1' => 'Код']) ?> </div> <div class="col-sm-6"> <div class="form-group"> <?= Html::submitButton('Зберегти', ['class' => 'btn btn-primary']) ?> </div> </div> </div> <?php // echo $form->field($model, 'lang')->textInput(['maxlength' => true]) ?> <?php // echo $form->field($model, 'action')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'text')->textarea(['id' => 'edit_tinymce', 'rows' => 60])->label(false) ?> <?php /* echo $form->field($model, 'text')->widget(TinyMce::className(), [ 'options' => ['rows' => 60, 'id' => 'edit_tinymce'], 'language' => 'uk_UA', 'clientOptions' => [ 'convert_urls' => false, // 'forced_root_block' => false, 'plugins' => [ "advlist autolink lists link image charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen", "insertdatetime media nonbreaking save table directionality", "emoticons template paste" ], 'menubar' => false, 'toolbar1' => "save | undo redo | styleselect fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image table", 'toolbar2' => "bold italic | fontselect | fontsizeselect | forecolor backcolor | print preview media | forecolor backcolor emoticons | code", 'fontsize_formats' => "8pt 10pt 12pt 14pt 18pt 24pt 36pt", 'image_advtab' => true, 'statusbar' => false, // 'plugins' => ['filemanager'], // 'external_filemanager_path' => '/filemanager/', // 'filemanager_title' => "Filemanager", // 'filemanager_access_key' => 'Aerux4lakakaex', // 'external_plugins' => [ // 'filemanager' => '/filemanager/tinymce/plugins/responsivefilemanager/plugin.min.js', // 'responsivefilemanager' => '/filemanager/tinymce/plugins/responsivefilemanager/plugin.min.js', // ], // 'relative_urls' => false, 'images_upload_url' => Url::to(['upload']), ] ])->label(false); */?> <?php ActiveForm::end(); ?> </div>