|
|
@ -29,9 +29,9 @@ |
|
|
<select class="form-control" name="tariff" id="id_tariffs"> |
|
|
<select class="form-control" name="tariff" id="id_tariffs"> |
|
|
{% for trf in tariffs %} |
|
|
{% for trf in tariffs %} |
|
|
{% if trf.pk == selected_tariff %} |
|
|
{% if trf.pk == selected_tariff %} |
|
|
<option value="{{ trf.pk }}" data-deadline='{{ trf.calc_deadline|date:"Y-m-d" }}' selected> |
|
|
|
|
|
|
|
|
<option value="{{ trf.pk }}" data-deadline='{{ trf.calc_deadline|date:"Y-m-d H:i:s" }}' selected> |
|
|
{% else %} |
|
|
{% else %} |
|
|
<option value="{{ trf.pk }}" data-deadline='{{ trf.calc_deadline|date:"Y-m-d" }}'> |
|
|
|
|
|
|
|
|
<option value="{{ trf.pk }}" data-deadline='{{ trf.calc_deadline|date:"Y-m-d H:i:s" }}'> |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
{{ trf.title }}. {{ trf.amount }}{% trans 'currency' %} (Вх:{{ trf.speedIn }}MBit/s. Исх:{{ trf.speedOut }} MBit/s) |
|
|
{{ trf.title }}. {{ trf.amount }}{% trans 'currency' %} (Вх:{{ trf.speedIn }}MBit/s. Исх:{{ trf.speedOut }} MBit/s) |
|
|
</option> |
|
|
</option> |
|
|
@ -41,11 +41,11 @@ |
|
|
{% if not abon.active_tariff %} |
|
|
{% if not abon.active_tariff %} |
|
|
<div class="input-group"> |
|
|
<div class="input-group"> |
|
|
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span> |
|
|
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span> |
|
|
<input type="text" class="form-control" name="deadline" id="id_deadline" value="{{ tariffs.0.calc_deadline|date:"Y-m-d" }}"> |
|
|
|
|
|
|
|
|
<input type="text" class="form-control" name="deadline" id="id_deadline" value="{{ tariffs.0.calc_deadline|date:'Y-m-d H:i:s' }}"> |
|
|
<script type="text/javascript"> |
|
|
<script type="text/javascript"> |
|
|
$(function () { |
|
|
$(function () { |
|
|
$('#id_deadline').datetimepicker({ |
|
|
$('#id_deadline').datetimepicker({ |
|
|
format: 'YYYY-MM-DD' |
|
|
|
|
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss' |
|
|
}); |
|
|
}); |
|
|
$('#id_tariffs').on('change', function(){ |
|
|
$('#id_tariffs').on('change', function(){ |
|
|
var a = $(this).find('option:selected'); |
|
|
var a = $(this).find('option:selected'); |
|
|
|