Fix #635 -- Visually indicate optional and required fields (#638)

This commit is contained in:
Raphael Michel
2017-10-12 16:00:49 +02:00
committed by GitHub
parent be6496e569
commit cbfd722c92
26 changed files with 270 additions and 206 deletions

View File

@@ -11,9 +11,9 @@
<div class="col-xs-12{% if category %} col-lg-10{% endif %}">
<fieldset>
<legend>{% trans "General information" %}</legend>
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.description layout="horizontal" %}
{% bootstrap_field form.is_addon layout="horizontal" %}
{% bootstrap_field form.name layout="control" %}
{% bootstrap_field form.description layout="control" %}
{% bootstrap_field form.is_addon layout="control" %}
</fieldset>
</div>
{% if category %}

View File

@@ -20,14 +20,14 @@
{% bootstrap_form_errors form %}
<fieldset>
<legend>{% trans "General information" %}</legend>
{% bootstrap_field form.question layout="horizontal" %}
{% bootstrap_field form.help_text layout="horizontal" %}
{% bootstrap_field form.type layout="horizontal" %}
{% bootstrap_field form.required layout="horizontal" %}
{% bootstrap_field form.question layout="control" %}
{% bootstrap_field form.help_text layout="control" %}
{% bootstrap_field form.type layout="control" %}
{% bootstrap_field form.required layout="control" %}
</fieldset>
<fieldset>
<legend>{% trans "Apply to products" %}</legend>
{% bootstrap_field form.items layout="horizontal" %}
{% bootstrap_field form.items layout="control" %}
</fieldset>
<div class="alert alert-info alert-required-boolean">
{% blocktrans trimmed %}

View File

@@ -19,10 +19,10 @@
{% bootstrap_form_errors form %}
<fieldset>
<legend>{% trans "General information" %}</legend>
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.size layout="horizontal" %}
{% bootstrap_field form.name layout="control" %}
{% bootstrap_field form.size layout="control" %}
{% if form.subevent %}
{% bootstrap_field form.subevent layout="horizontal" %}
{% bootstrap_field form.subevent layout="control" %}
{% endif %}
<legend>{% trans "Items" %}</legend>
<p>
@@ -33,7 +33,7 @@
left.
{% endblocktrans %}
</p>
{% bootstrap_field form.itemvars layout="horizontal" %}
{% bootstrap_field form.itemvars layout="control" %}
</fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">