Code Duplication    Length = 15-15 lines in 3 locations

src/views/price/suggested.php 1 location

@@ 24-38 (lines=15) @@
21
22
<?php if (!empty($models)) : ?>
23
    <?= $this->render('_form', compact('models', 'model', 'plan')) ?>
24
<?php else: ?>
25
    <?php $box = \hipanel\widgets\Box::begin([
26
        'title' => Yii::t('hipanel.finance.price', 'No price suggestions for this object'),
27
    ]) ?>
28
    <?= Yii::t('hipanel.finance.price', 'We could not suggest any new prices of type "{suggestionType}" for the selected object. Probably, they were already created earlier or this suggestion type is not compatible with this object type', [
29
            'suggestionType' => Yii::t('hipanel.finance.suggestionTypes', $type),
30
        ]) ?>
31
32
    <br/>
33
34
    <?= Yii::t('hipanel.finance.price', 'You can return back to plan {backToPlan}', [
35
        'backToPlan' => Html::a($plan->name, Url::to(['@plan/view', 'id' => $plan->id])),
36
    ]) ?>
37
    <?= $box->endBody(); ?>
38
<?php endif ?>
39

src/views/plan/domain/_form.php 1 location

@@ 163-177 (lines=15) @@
160
        <?php Box::end() ?>
161
        <?php ActiveForm::end(); ?>
162
    </div>
163
<?php else: ?>
164
    <?php $box = Box::begin([
165
        'title' => Yii::t('hipanel.finance.price', 'No price suggestions for this object'),
166
    ]) ?>
167
    <?= Yii::t('hipanel.finance.price', 'We could not suggest any new prices of type "{suggestionType}" for the selected object. Probably, they were already created earlier or this suggestion type is not compatible with this object type', [
168
        'suggestionType' => Yii::t('hipanel.finance.suggestionTypes', 'domain'),
169
    ]) ?>
170
171
    <br/>
172
173
    <?= Yii::t('hipanel.finance.price', 'You can return back to plan {backToPlan}', [
174
        'backToPlan' => Html::a($plan->name, Url::to(['@plan/view', 'id' => $plan->id])),
175
    ]) ?>
176
    <?= $box->endBody(); ?>
177
<?php endif ?>
178

src/views/plan/certificate/_form.php 1 location

@@ 125-139 (lines=15) @@
122
        <?php Box::end() ?>
123
        <?php ActiveForm::end(); ?>
124
    </div>
125
<?php else: ?>
126
    <?php $box = Box::begin([
127
        'title' => Yii::t('hipanel.finance.price', 'No price suggestions for this object'),
128
    ]) ?>
129
    <?= Yii::t('hipanel.finance.price', 'We could not suggest any new prices of type "{suggestionType}" for the selected object. Probably, they were already created earlier or this suggestion type is not compatible with this object type', [
130
        'suggestionType' => Yii::t('hipanel.finance.suggestionTypes', 'certificate'),
131
    ]) ?>
132
133
    <br/>
134
135
    <?= Yii::t('hipanel.finance.price', 'You can return back to plan {backToPlan}', [
136
        'backToPlan' => Html::a($plan->name, Url::to(['@plan/view', 'id' => $plan->id])),
137
    ]) ?>
138
    <?= $box->endBody(); ?>
139
<?php endif ?>
140