Issues (3)

src/views/default/update.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('Update email template - {key}', [
16
    'key' => $model->key,
17
]);
18
?>
19
<div class="container">
20
    <div class="row">
21
        <div class="col-md-12">
22
            <h1>
23
                <?= TemplatesModule::t('Email templates') ?>
24
                <small><?= TemplatesModule::t('update template') ?></small>
25
            </h1>
26
        </div>
27
        <div class="clearfix"></div>
28
        <hr>
29
        <div class="col-md-12">
30
            <?php $form = ActiveForm::begin() ?>
31
            <?= $form->field($model, 'key')
32
                ->textInput(['disabled' => true]) ?>
33
            <?php foreach (LanguageHelper::getInstance()->getLocales() as $language): ?>
34
                <?php $translation = $model->getTranslation($language) ?>
35
                <?= $form->field($translation, 'subject')
36
                    ->textInput() ?>
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
                    ->textInput(['disabled' => true]) ?>
45
            <?php endforeach ?>
46
            <?= Html::submitButton(
47
                        TemplatesModule::t('Save'),
48
                        ['class' => 'btn btn-success']
49
                    ) ?>
50
            <?php $form->end() ?>
51
        </div>
52
        <?= $this->render('_issue-message') ?>
53
    </div>
54
</div>
55