proxadmin/app/templates/smanager/activate.html

58 lines
1.2 KiB
HTML
Raw Permalink Normal View History

2017-07-14 09:04:27 -04:00
{% extends "base.html" %}
2017-07-20 19:30:09 -04:00
{% block head %}
{{ super() }}
<script type="text/javascript">
function getPricePerMonth()
{
var period = 0;
var periodselect = document.getElementById('period');
period = periodselect.value;
return period;
}
function calculateTotal()
{
var period = getPricePerMonth();
var ppm = {{ ppm }};
var total = 0;
total = period * ppm;
var divobj = document.getElementById('totalPrice');
2017-07-24 06:33:33 -04:00
divobj.innerHTML = "Total Price: "+total+" {{ currency }}";
2017-07-20 19:30:09 -04:00
}
</script>
{% endblock %}
{% block title %}Activate service{% endblock %}
2017-07-14 09:04:27 -04:00
{% block page_content %}
<div class="row">
<div class="col-md-12">
<div class="panel panel-info">
2017-07-20 19:30:09 -04:00
<div class="panel-heading">Activate service {{ service.description }}</div>
2017-07-14 09:04:27 -04:00
<div class="panel-body">
2017-07-15 20:48:18 -04:00
<form method="POST" action"{{ url_for('smanager.activate', itemid=service.pid) }}">
2017-07-20 19:30:09 -04:00
<p>
{{ form.period.label }} {{ form.period(**{"onchange":"calculateTotal()"}) }}<br />
2017-07-14 09:04:27 -04:00
{% for error in form.period.errors %}
{{ error }}<br />
{% endfor %}
2017-07-20 19:30:09 -04:00
<h3>
2017-07-15 20:48:18 -04:00
---<br />
2017-07-24 06:33:33 -04:00
<div id="totalPrice">Previous Period: {{ total }} {{ currency }}</div>
2017-07-15 20:48:18 -04:00
</h3>
2017-07-14 09:04:27 -04:00
{{ form.csrf_token() }}
{{ form.submit }}
</p>
</div>
</div>
</div>
{% endblock %}