remotes/origin/hotfix/shedules-fix
commit
5db7066bb2
14 changed files with 129 additions and 53 deletions
@ -0,0 +1,29 @@ |
||||
{% extends "templates/lilcity/index.html" %} |
||||
{% load static %} |
||||
{% load rupluralize from plural %} |
||||
|
||||
{% block content %} |
||||
<div class="section"> |
||||
<div class="section__center center"> |
||||
{% if school and request.user.bonus and not payment.bonus %} |
||||
{% if request.user.bonus >= payment.amount %} |
||||
<a class="btn" href="{{ request.get_full_path }}&use_bonuses=1" style="margin-bottom: 20px">Оплатить бонусами</a> |
||||
<div class="text2"><p>или купить онлайн</p></div> |
||||
{% else %} |
||||
<div class="text2"><p>Для оплаты части стоимости вы можете использовать бонусы</p></div> |
||||
<label id="use-bonuses-checkbox" class="switch" style="margin-bottom: 20px"> |
||||
<input class="switch__input" data-url="{{ request.get_full_path }}" value="true" type="checkbox"> |
||||
<span class="switch__content">Использовать {{ request.user.bonus|rupluralize:'бонус,бонуса,бонусов' }}</span> |
||||
</label> |
||||
{% endif %} |
||||
{% endif %} |
||||
<div id="pw-widget" class="pw-widget"> |
||||
{% include "./paymentwall_widget.html" %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endblock content %} |
||||
|
||||
{% block foot %} |
||||
<script type="text/javascript" src="{% static 'pay.js' %}"></script> |
||||
{% endblock foot %} |
||||
@ -1,9 +1,3 @@ |
||||
{% extends "templates/lilcity/index.html" %} {% load static %} {% block content %} |
||||
<div class="section"> |
||||
<div class="section__center center"> |
||||
{% autoescape off %} |
||||
{{ widget }} |
||||
{% endautoescape %} |
||||
</div> |
||||
</div> |
||||
{% endblock content %} |
||||
{% autoescape off %} |
||||
{{ widget }} |
||||
{% endautoescape %} |
||||
|
||||
@ -1,6 +1,6 @@ |
||||
#!/bin/sh |
||||
cd /app |
||||
chown www-data:www-data /app/media |
||||
python manage.py migrate |
||||
sudo -E -u www-data python manage.py migrate |
||||
#python manage.py loaddata /app/apps/*/fixtures/*.json |
||||
python2.7 /usr/bin/supervisord -n |
||||
|
||||
@ -0,0 +1,11 @@ |
||||
import $ from 'jquery'; |
||||
|
||||
$(document).ready(function () { |
||||
const $useBonuses = $('#use-bonuses-checkbox input'); |
||||
const $widget = $('#pw-widget'); |
||||
$useBonuses.change(e => { |
||||
$.get($useBonuses.data('url') + '&use_bonuses=' + ($useBonuses.prop('checked') ? 1 : '')).then(response => { |
||||
$widget.html(response); |
||||
}); |
||||
}); |
||||
}); |
||||
Loading…
Reference in new issue