Commit ab7f8024 authored by Ruslan Karimov's avatar Ruslan Karimov

#3460. Важно (срочно) - внести правки в верстку сайта

parent e0746356
...@@ -59,7 +59,7 @@ use common\modules\bids\models\Bid; ...@@ -59,7 +59,7 @@ use common\modules\bids\models\Bid;
'checked' => false, 'checked' => false,
'required' => true, 'required' => true,
'class' => 'footer_form__check', 'class' => 'footer_form__check',
'oninvalid' => "this.setCustomValidity('" . Yii::t('form', 'Accept the terms') . "')" 'data-required-message' => Yii::t('form', 'Accept the terms')
], ],
false false
)->label(Yii::t('form', 'I agree to') . " ". Html::a(\Yii::t('form', 'the terms of using personal data'), '/uploads/personal_data_processing_art_project.pdf', ['target' => '_blank'])); )->label(Yii::t('form', 'I agree to') . " ". Html::a(\Yii::t('form', 'the terms of using personal data'), '/uploads/personal_data_processing_art_project.pdf', ['target' => '_blank']));
......
...@@ -59,7 +59,7 @@ use common\modules\bids\models\Bid; ...@@ -59,7 +59,7 @@ use common\modules\bids\models\Bid;
'checked' => false, 'checked' => false,
'required' => true, 'required' => true,
'class' => 'footer_form__check', 'class' => 'footer_form__check',
'oninvalid' => "this.setCustomValidity('" . Yii::t('form', 'Accept the terms') . "')" 'data-required-message' => Yii::t('form', 'Accept the terms')
], ],
false false
)->label(Yii::t('form', 'I agree to') . ' ' . Html::a(\Yii::t('form', 'the terms of using personal data'), '/uploads/personal_data_processing_art_project.pdf', ['target' => '_blank'])); )->label(Yii::t('form', 'I agree to') . ' ' . Html::a(\Yii::t('form', 'the terms of using personal data'), '/uploads/personal_data_processing_art_project.pdf', ['target' => '_blank']));
......
...@@ -82,7 +82,7 @@ FileUploadBundle::register($this); ...@@ -82,7 +82,7 @@ FileUploadBundle::register($this);
'checked' => false, 'checked' => false,
'required' => true, 'required' => true,
'class' => 'footer_form__check', 'class' => 'footer_form__check',
'oninvalid' => "this.setCustomValidity('" . Yii::t('form', 'Accept the terms') . "')" 'data-required-message' => Yii::t('form', 'Accept the terms')
], ],
false false
)->label(Yii::t('form', 'I agree to') . " ". Html::a(\Yii::t('form', 'the terms of using personal data'), '/uploads/personal_data_processing_art_project.pdf', ['target' => '_blank'])); )->label(Yii::t('form', 'I agree to') . " ". Html::a(\Yii::t('form', 'the terms of using personal data'), '/uploads/personal_data_processing_art_project.pdf', ['target' => '_blank']));
......
...@@ -171,7 +171,7 @@ $lang = Languages::getCurrent(); ...@@ -171,7 +171,7 @@ $lang = Languages::getCurrent();
])->label(false); ?> ])->label(false); ?>
<div class="form-group field-bid-check"> <div class="form-group field-bid-check">
<input class="footer_form__check" type="checkbox" id="check" required oninvalid="this.setCustomValidity(' <?= Yii::t('form', 'Accept the terms') ?>')"> <input class="footer_form__check" type="checkbox" id="check" required data-required-message="<?= Yii::t('form', 'Accept the terms') ?>">
<label for="check"> <label for="check">
<?= Yii::t('form', 'I agree to') . " ". Html::a(\Yii::t('form', 'the terms of using personal data'), '/uploads/personal_data_processing_art_project.pdf', ['target' => '_blank']) ?> <?= Yii::t('form', 'I agree to') . " ". Html::a(\Yii::t('form', 'the terms of using personal data'), '/uploads/personal_data_processing_art_project.pdf', ['target' => '_blank']) ?>
</label> </label>
......
...@@ -146,4 +146,11 @@ $('form.bids-form').on('beforeSubmit', function(e) { ...@@ -146,4 +146,11 @@ $('form.bids-form').on('beforeSubmit', function(e) {
// } // }
}).on('submit', function(e){ }).on('submit', function(e){
return false; return false;
});
$('.footer_form__check').on('invalid', function () {
var $this = $(this);
this.setCustomValidity($this.data('required-message'));
}).on('change', function () {
this.setCustomValidity('');
}); });
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment