Merge branch 'hotfix/LIL-639' into 'master'

LIL-639 При оплате дб выделен только тот день(урок), на который пользователь нажал 

See merge request lilcity/backend!133
remotes/origin/hotfix/LIL-661
cfwme 7 years ago
commit d8627644c4
  1. 1
      apps/school/templates/blocks/day_pay_btn.html
  2. 2
      apps/school/templates/blocks/schedule.html
  3. 15
      web/src/js/modules/popup.js

@ -1,5 +1,6 @@
<a
data-popup=".js-popup-buy"
class="timing__btn btn"
data-day="{{ school_schedule.weekday }}"
href="{% url 'school-checkout' %}?weekdays={{ school_schedule.weekday }}&add_days=true"
>купить</a>

@ -10,7 +10,7 @@
{% endfor %}
</div>
<div class="timing__foot">
<!--{% include './pay_btn.html' %}-->
{# include './pay_btn.html' #}
<a target="_blank" class="timing__print" href="{% url 'school:school_schedules-print' %}">Распечатать расписание
<span class="bold">чтобы не забыть</span>
<svg class="icon icon-print">

@ -34,7 +34,8 @@ $(document).ready(function () {
popup;
body.on('click', '[data-popup]', function(e){
let data = $(this).data('popup');
const $this = $(this);
let data = $this.data('popup');
if(! data) {
return true;
}
@ -50,7 +51,7 @@ $(document).ready(function () {
console.log('reset selected');
$('[data-day]').prop('checked', false);
if ($(this).text() === 'продлить') {
if ($this.text() === 'продлить') {
//data-purchased
//restore purchased selection
console.log('restore purchased');
@ -72,19 +73,19 @@ $(document).ready(function () {
}
}
if( data === '.js-popup-auth') {
let nextUrl = $(this).data('auth-next-url');
let nextUrl = $this.data('auth-next-url');
if(nextUrl === 'href') {
nextUrl = $(this).attr('href');
nextUrl = $this.attr('href');
}
popup.data('next-url', nextUrl);
}
if($(this).data('day')) {
let day = $(this).data('day');
if($this.data('day')) {
let day = $this.data('day');
$('[data-day='+day+']').prop('checked', true);
}
if(!is_extend && !$(this).data('day')) {
if(!is_extend && !$this.data('day')) {
console.log('check all');
$('[data-day]').each(function(){
$(this).prop('checked', true);

Loading…
Cancel
Save