Skip to content

Commit

Permalink
Add toggled chebox on the checkout page
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Nov 19, 2015
1 parent 8684813 commit 59e0dca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
14 changes: 11 additions & 3 deletions src/views/cart/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,20 @@
</div>
<div class="col-xs-8"><span class="pull-right">
<?php if ($module->termsPage) : ?>
<?php \hiqdev\assets\icheck\iCheckAsset::register($this) ?>
<?php $this->registerJs("
jQuery('input').iCheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal'
}).on('ifToggled', function() {
jQuery('#make-order-button').toggleClass('disabled');
});"); ?>
<label>
<input type="checkbox">
<?= Yii::t('cart', 'I have read and agree to the') ?> <?= Html::a(Yii::t('cart', 'terms of use'), $module->termsPage) ?>
<input type="checkbox" id="term-of-use">
&nbsp;<?= Yii::t('cart', 'I have read and agree to the') ?> <?= Html::a(Yii::t('cart', 'terms of use'), $module->termsPage) ?>
</label> &nbsp; &nbsp;
<?php endif ?>
<?= Html::a('<i class="fa fa-credit-card"></i> ' . Yii::t('cart', 'Make order'), ['clear'], ['class' => 'btn btn-success']); ?>
<?= Html::a('<i class="fa fa-credit-card"></i> ' . Yii::t('cart', 'Make order'), ['clear'], ['id' => 'make-order-button', 'class' => ($module->termsPage) ? 'btn btn-success disabled' : 'btn btn-success']); ?>
</span></div>
</div>
</section>
1 change: 0 additions & 1 deletion src/widgets/views/QuantityCell_view.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

use yii\helpers\Html;
\yii\helpers\VarDumper::dump($model->quantity, 10, true);
?>

<?= Html::beginForm('update-quantity', 'post', ['id' => $model->id]) ?>
Expand Down

0 comments on commit 59e0dca

Please sign in to comment.