13 changed files with 136 additions and 51 deletions
-
8abonapp/forms.py
-
9abonapp/locale/ru/LC_MESSAGES/django.po
-
21abonapp/migrations/0013_abongroup_tariffs.py
-
3abonapp/models.py
-
6abonapp/templates/abonapp/buy_tariff.html
-
19abonapp/templates/abonapp/group_list.html
-
33abonapp/templates/abonapp/group_tariffs.html
-
27abonapp/templates/abonapp/peoples.html
-
1abonapp/urls_abon.py
-
37abonapp/views.py
-
13agent/mod_mikrotik.py
-
1bugs.txt
-
9clientsideapp/views.py
@ -0,0 +1,21 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.9 on 2017-03-21 11:30 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('tariff_app', '0002_tariff_descr'), |
||||
|
('abonapp', '0012_auto_20170227_1718'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AddField( |
||||
|
model_name='abongroup', |
||||
|
name='tariffs', |
||||
|
field=models.ManyToManyField(blank=True, related_name='tariff_groups', to='tariff_app.Tariff'), |
||||
|
), |
||||
|
] |
||||
@ -0,0 +1,33 @@ |
|||||
|
{% extends request.is_ajax|yesno:'bajax.html,base.html' %} |
||||
|
{% load i18n %} |
||||
|
{% block main %} |
||||
|
|
||||
|
<ol class="breadcrumb"> |
||||
|
<li><span class="glyphicon glyphicon-home"></span></li> |
||||
|
<li><a href="{% url 'abonapp:group_list' %}">{% trans 'User groups' %}</a></li> |
||||
|
<li><a href="{% url 'abonapp:people_list' abon_group.id %}">{{ abon_group.title }}</a></li> |
||||
|
<li class="active">{% trans 'Belonging services for groups' %}</li> |
||||
|
</ol> |
||||
|
|
||||
|
{% include 'message_block.html' %} |
||||
|
|
||||
|
<legend>{% trans 'Belonging services for groups' %}</legend> |
||||
|
<form action="{% url 'abonapp:ch_group_tariff' abon_group.pk %}" method="post" role="form">{% csrf_token %} |
||||
|
{% for tariff in tariffs %} |
||||
|
<div class="checkbox"> |
||||
|
<label> |
||||
|
{% if tariff in abon_group.tariffs.all %} |
||||
|
<input name="tr" type="checkbox" value="{{ tariff.pk }}" checked/> |
||||
|
{% else %} |
||||
|
<input name="tr" type="checkbox" value="{{ tariff.pk }}"/> |
||||
|
{% endif %} |
||||
|
{{ tariff.title }} |
||||
|
</label> |
||||
|
</div> |
||||
|
{% endfor %} |
||||
|
<div class="btn-group"> |
||||
|
<input type="submit" class="btn btn-primary" value="{% trans 'Save' %}"> <input type="reset" class="btn btn-default" value="{% trans 'Reset' %}"> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
{% endblock %} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue