You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.9 KiB
69 lines
2.9 KiB
{% extends request.is_ajax|yesno:'bajax.html,base.html' %}
|
|
{% load i18n %}
|
|
{% load bootstrap3 %}
|
|
{% 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' group.id %}">{{ group.title }}</a></li>
|
|
<li class="active">{% trans 'Add abon' %}</li>
|
|
</ol>
|
|
|
|
{% include 'message_block.html' %}
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">{% trans 'Add abon' %}</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<form role="form" action="{% url 'abonapp:add_abon' group.id %}" method="post">{% csrf_token %}
|
|
{% bootstrap_icon 'user' as ic %}
|
|
{% bootstrap_field form.username addon_before=ic %}
|
|
|
|
{% bootstrap_icon 'bookmark' as ic %}
|
|
{% bootstrap_field form.fio addon_before=ic %}
|
|
|
|
{% bootstrap_icon 'phone' as ic %}
|
|
{% bootstrap_field form.telephone addon_before=ic %}
|
|
|
|
{% bootstrap_icon 'grain' as ic %}
|
|
{% bootstrap_field form.group addon_before=ic %}
|
|
|
|
{% bootstrap_icon 'comment' as ic %}
|
|
{% bootstrap_field form.description addon_before=ic %}
|
|
|
|
{% bootstrap_icon 'road' as ic %}
|
|
{% bootstrap_field form.street addon_before=ic %}
|
|
|
|
{% bootstrap_icon 'home' as ic %}
|
|
{% bootstrap_field form.house addon_before=ic %}
|
|
|
|
{# password field #}
|
|
{% bootstrap_icon 'lock' as ic %}
|
|
{% bootstrap_button '' button_type='button' icon='eye-open' button_class='btn-default' id='passwdtoggler' size='sm' as bt %}
|
|
{% bootstrap_field form.password form_group_class='form-group-sm' addon_after_class='input-group-btn' addon_after=bt addon_before=ic %}
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$('#passwdtoggler').on('mousedown', function(){
|
|
document.getElementById("{{ form.password.id_for_label }}").type='text';
|
|
}).on('mouseup', function(){
|
|
document.getElementById("{{ form.password.id_for_label }}").type='password';
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<div class="btn-group">
|
|
<button type="submit" class="btn btn-sm btn-primary">
|
|
<span class="glyphicon glyphicon-save"></span> {% trans 'Save' %}
|
|
</button>
|
|
<button type="reset" class="btn btn-sm btn-default">
|
|
<span class="glyphicon glyphicon-remove-circle"></span> {% trans 'Reset' %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|