Implemented selection of mandants when posting blog items

This commit is contained in:
2016-06-23 15:03:12 +02:00
parent 6042838f28
commit 5c3c56ecc3
3 changed files with 48 additions and 45 deletions

View File

@@ -22,26 +22,26 @@
{% endif %}
<div class="row">
<div class="col-md-8">
<form class="form-horizontal" action="" method="post">
{% csrf_token %}
<form class="form-horizontal" action="" method="post">{% csrf_token %}
<div class="form-group">
{{form_bp.content.errors}}
<label for="id_content" class="col-sm-4 control-label required">
{% trans 'Content' %}
</label>
<label for="id_content" class="col-sm-4 control-label required">{% trans 'Content' %}</label>
<div class="col-sm-5">
<textarea class="form-control" maxlength="256" rows="2"
id="id_content" name="content"></textarea>
{% if has_choices %}
{{ form_mandants }}
{% if cnt_mandants > 1 %}
{{ form_mandants.mandants.label_tag }}
{% for choice in form_mandants.mandants %}
<label for="{{choice.id_for_label}}">
{{ choice.tag }} {{choice.choice_label}}
</label>
{% endfor %}
{% endif %}
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">
{% trans 'Sent' %}
</button>
<button type="submit" class="btn btn-default">{% trans 'Sent' %}</button>
</div>
</div>
</form>
@@ -49,9 +49,8 @@
</div>
{% if debug %}
<div class="row">
<div class="col-md-5">
<h2 class="form-signin-heading">{% trans 'Debug' %}</h2>
{{ debug }}
<div class="col-md-8">
<p>{{ debug }}</p>
</div>
</div>
{% endif %}