Issues (3)

src/views/default/create.php (1 issue)

Labels
Severity
1
<?php
2
/* @var \yii\web\View $this */
3
/* @var \ymaker\email\templates\entities\EmailTemplate $model */
4
5
use yii\helpers\Html;
6
use yii\widgets\ActiveForm;
7
use ymaker\email\templates\Module as TemplatesModule;
8
use motion\i18n\helpers\LanguageHelper;
9
use vova07\imperavi\Widget as ImperaviRedactor;
0 ignored issues
show
The type vova07\imperavi\Widget was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
11
$this->params['breadcrumbs'][] = [
12
    'label' => TemplatesModule::t('Email templates list'),
13
    'url' => ['/email-templates/default/index'],
14
];
15
$this->params['breadcrumbs'][] = TemplatesModule::t('Create email template');
16
?>
17
<div class="container">
18
    <div class="row">
19
        <div class="col-md-12">
20
            <h1>
21
                <?= TemplatesModule::t('Email templates') ?>
22
                <small><?= TemplatesModule::t('create new template') ?></small>
23
            </h1>
24
        </div>
25
        <div class="clearfix"></div>
26
        <hr>
27
        <div class="col-md-12">
28
            <?php $form = ActiveForm::begin([
29
                'fieldConfig' => [
30
                    'template' => "{label}\n{input}\n{error}",
31
                ],
32
            ]) ?>
33
            <?= $form->field($model, 'key')->textInput(['autofocus' => true]) ?>
34
            <?php foreach (LanguageHelper::getInstance()->getLocales() as $language): ?>
35
                <?php $translation = $model->getTranslation($language) ?>
36
                <?= $form->field($translation, 'subject') ?>
37
            <?php if (\class_exists(ImperaviRedactor::class)): ?>
38
                <?= $form->field($translation, 'body')
39
                    ->widget(ImperaviRedactor::class) ?>
40
            <?php else: ?>
41
                <?= $form->field($translation, 'body')->textarea() ?>
42
            <?php endif; ?>
43
                <?= $form->field($translation, 'hint') ?>
44
            <?php endforeach ?>
45
            <?= Html::submitButton(
46
                        TemplatesModule::t('Create'),
47
                        ['class' => 'btn btn-success']
48
                    ) ?>
49
            <?php $form->end() ?>
50
        </div>
51
        <?= $this->render('_issue-message') ?>
52
    </div>
53
</div>
54