Skip to content

Commit b8fa583

Browse files
committed
fix reset to default settings url
1 parent a6d2ff2 commit b8fa583

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/actions/CookieSettingsAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function run()
4444
return $this->controller->render($this->viewFilePath, [
4545
'model' => $form,
4646
'categories' => $component->getCategories(),
47+
'resetLink' => $component->urlSettings,
4748
]);
4849
}
4950

src/actions/views/cookie-settings.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/** @var $this \yii\web\View */
33
/** @var $form \albertborsos\cookieconsent\domains\forms\CookieSettingsForm */
44
/** @var $categories array */
5+
/** @var $resetLink array */
56
?>
67
<?php $form = \yii\bootstrap\ActiveForm::begin([
78
'id' => 'cookie-settings',
@@ -40,7 +41,7 @@
4041
<div class="row">
4142
<div class="col-xs-offset-3 col-xs-9">
4243
<?= \yii\helpers\Html::submitButton(Yii::t('cookieconsent/widget', 'Save'), ['class' => 'btn btn-success']) ?>
43-
<?= \yii\helpers\Html::a(Yii::t('cookieconsent/widget', 'Reset to default'), \yii\helpers\Url::to(['/cookie-beallitasok'], true), [
44+
<?= \yii\helpers\Html::a(Yii::t('cookieconsent/widget', 'Reset to default'), \yii\helpers\Url::to($resetLink, true), [
4445
'class' => 'btn btn-default cc-revoke-custom',
4546
]) ?>
4647
</div>

0 commit comments

Comments
 (0)