Commit df427d0a5a622f34701e8584efa926b38291f949

Authored by Eugeny Galkovskiy
1 parent 15f4b017

button classes

frontend/views/layouts/main.php
... ... @@ -665,7 +665,7 @@
665 665 <?php
666 666 }
667 667 ?>
668   - <a href="#" class="btn btn-template-transparent-primary" data-toggle="modal" data-target="#feedback-modal"><?php echo \Yii::t(
  668 + <a href="#" class="btn btn-template-transparent-primary press-callback" data-toggle="modal" data-target="#feedback-modal"><?php echo \Yii::t(
669 669 'app',
670 670 'Contact us'
671 671 ); ?></a>
... ...
frontend/views/site/index.php
... ... @@ -46,7 +46,7 @@ JS;
46 46 <div class="box-simple">
47 47 <a
48 48 href="#"
49   - class="btn button1 icon_phone modaled init-button-consultation"
  49 + class="btn button1 icon_phone modaled init-button-consultation press-consultation"
50 50 data-title="<?= \Yii::t('app', 'green_get') ?> <?= \Yii::t('app', 'green_get2') ?>"
51 51 data-toggle="modal"
52 52 data-target="#feedback-modal"
... ... @@ -128,8 +128,8 @@ JS;
128 128 <div class="col-md-12 col-xs-12">
129 129 <div class="row">
130 130 <div class="box-simple">
131   - <a href="#" class="btn button1 icon_car modaled init-button-consultation" data-title="<?=\Yii::t('app', 'index_data1')?>" data-toggle="modal" data-target="#feedback-modal"><?=\Yii::t('app', 'index_modal1')?> <span><?=\Yii::t('app', 'index_modal2')?></span></a>
132   - <a href="#" class="btn button1 icon_calc modaled init-button-consultation" data-toggle="modal" data-target="#calculate-modal"><?=\Yii::t('app', 'index_modal3')?> <span><?=\Yii::t('app', 'index_modal4')?></span></a>
  131 + <a href="#" class="btn button1 icon_car modaled init-button-consultation press-specialist" data-title="<?=\Yii::t('app', 'index_data1')?>" data-toggle="modal" data-target="#feedback-modal"><?=\Yii::t('app', 'index_modal1')?> <span><?=\Yii::t('app', 'index_modal2')?></span></a>
  132 + <a href="#" class="btn button1 icon_calc modaled init-button-consultation press-calculate" data-toggle="modal" data-target="#calculate-modal"><?=\Yii::t('app', 'index_modal3')?> <span><?=\Yii::t('app', 'index_modal4')?></span></a>
133 133 </div>
134 134 </div>
135 135 </div>
... ... @@ -288,7 +288,7 @@ JS;
288 288 'alias' => $object->lang->alias,
289 289 ]
290 290 ) ?>" class="sqre_btn blue_arrow" alt="<?=$object->lang->object_name?>"></a>
291   - <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate" data-title="<?= \Yii::t('app', 'modal1') ?>" data-toggle="modal" data-target="#feedback-modal">
  291 + <a href="#" class="btn sqre_btn yellow_calc modaled init-button-сalculate press-consultation" data-title="<?= \Yii::t('app', 'modal1') ?>" data-toggle="modal" data-target="#feedback-modal">
292 292 <div class="phone_hint"><?= \Yii::t('app', 'get_consult') ?></div>
293 293 </a>
294 294 </td>
... ... @@ -385,7 +385,7 @@ JS;
385 385 </div>
386 386 </div>
387 387 <div class="col-md-12 col-xs-12" style="text-align:center;margin-bottom:40px;">
388   - <a href="#" class="btn button1 icon_stat modaled init-button-order" data-title="<?= \Yii::t('app', 'modalstation') ?>" data-toggle="modal" data-target="#feedback-modal"><?=\Yii::t('app', 'index_economy15')?> <span><?=\Yii::t('app', 'index_economy16')?></span></a>
  388 + <a href="#" class="btn button1 icon_stat modaled init-button-order press-order" data-title="<?= \Yii::t('app', 'modalstation') ?>" data-toggle="modal" data-target="#feedback-modal"><?=\Yii::t('app', 'index_economy15')?> <span><?=\Yii::t('app', 'index_economy16')?></span></a>
389 389 </div>
390 390 </div>
391 391 </div>
... ...
frontend/web/js/script.js
... ... @@ -111,5 +111,69 @@ $(
111 111 return false;
112 112 }
113 113 );
  114 +
  115 + $(".close").on('click', function(){
  116 + $(".send-form").removeClass("specialist");
  117 + $(".send-form").removeClass("calculate");
  118 + $(".send-form").removeClass("order");
  119 + $(".send-form").removeClass("call");
  120 + $(".send-form").removeClass("callback");
  121 + $(".send-form").removeClass("consultation");
  122 + $("#feedback-form")['0'].reset();
  123 + });
  124 + $(".press-consultation").on('click',function(){
  125 + $("#feedback-form")['0'].reset();
  126 + $(".send-form").removeClass("specialist");
  127 + $(".send-form").removeClass("calculate");
  128 + $(".send-form").removeClass("order");
  129 + $(".send-form").removeClass("call");
  130 + $(".send-form").removeClass("callback");
  131 + $(".send-form").addClass("consultation");
  132 + });
  133 + $(".press-specialist").on('click',function(){
  134 + $("#feedback-form")['0'].reset();
  135 + $(".send-form").addClass("specialist");
  136 + $(".send-form").removeClass("calculate");
  137 + $(".send-form").removeClass("order");
  138 + $(".send-form").removeClass("call");
  139 + $(".send-form").removeClass("callback");
  140 + $(".send-form").removeClass("consultation");
  141 + });
  142 + $(".press-calculate").on('click',function(){
  143 + $("#feedback-form")['0'].reset();
  144 + $(".send-form").removeClass("specialist");
  145 + $(".send-form").addClass("calculate");
  146 + $(".send-form").removeClass("order");
  147 + $(".send-form").removeClass("call");
  148 + $(".send-form").removeClass("callback");
  149 + $(".send-form").removeClass("consultation");
  150 + });
  151 + $(".press-order").on('click',function(){
  152 + $("#feedback-form")['0'].reset();
  153 + $(".send-form").removeClass("specialist");
  154 + $(".send-form").removeClass("calculate");
  155 + $(".send-form").addClass("order");
  156 + $(".send-form").removeClass("call");
  157 + $(".send-form").removeClass("callback");
  158 + $(".send-form").removeClass("consultation");
  159 + });
  160 + $(".press-call").on('click',function(){
  161 + $("#feedback-form")['0'].reset();
  162 + $(".send-form").removeClass("specialist");
  163 + $(".send-form").removeClass("calculate");
  164 + $(".send-form").removeClass("order");
  165 + $(".send-form").addClass("call");
  166 + $(".send-form").removeClass("callback");
  167 + $(".send-form").removeClass("consultation");
  168 + });
  169 + $(".press-callback").on('click',function(){
  170 + $("#feedback-form")['0'].reset();
  171 + $(".send-form").removeClass("specialist");
  172 + $(".send-form").removeClass("calculate");
  173 + $(".send-form").removeClass("order");
  174 + $(".send-form").removeClass("call");
  175 + $(".send-form").addClass("callback");
  176 + $(".send-form").removeClass("consultation");
  177 + });
114 178 }
115 179 );
116 180 \ No newline at end of file
... ...