Group genre dropdowns into non-selectable optgroup sections
- Load grouped genre list (music_genres_grouped.txt) with section headings - Render headings as <optgroup> labels (visible, not selectable) - Add Disney under CHILDREN'S & HOLIDAY (was missing from grouped file) - Bump version to 0.9.3
This commit is contained in:
parent
07e92a522a
commit
868b59077f
7 changed files with 360 additions and 21 deletions
|
|
@ -133,16 +133,24 @@
|
|||
<label for="customer_style_genre_basic">Basic style <span class="required">*</span></label>
|
||||
<select id="customer_style_genre_basic" name="basic_style" required>
|
||||
<option value="" {% if not style_parts.basic_style %}selected{% endif %}>— Select style —</option>
|
||||
{% for g in genres %}
|
||||
<option value="{{ g }}" {% if style_parts.basic_style == g %}selected{% endif %}>{{ g }}</option>
|
||||
{% for group in genre_groups %}
|
||||
<optgroup label="{{ group.label }}">
|
||||
{% for g in group.genres %}
|
||||
<option value="{{ g }}" {% if style_parts.basic_style == g %}selected{% endif %}>{{ g }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<label for="customer_style_genre_additional">Additional style (optional)</label>
|
||||
<select id="customer_style_genre_additional" name="additional_style">
|
||||
<option value="" {% if not style_parts.additional_style %}selected{% endif %}>— None —</option>
|
||||
{% for g in genres %}
|
||||
<option value="{{ g }}" {% if style_parts.additional_style == g %}selected{% endif %}>{{ g }}</option>
|
||||
{% for group in genre_groups %}
|
||||
<optgroup label="{{ group.label }}">
|
||||
{% for g in group.genres %}
|
||||
<option value="{{ g }}" {% if style_parts.additional_style == g %}selected{% endif %}>{{ g }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -62,16 +62,24 @@
|
|||
<label for="basic_style">Basic style <span class="required">*</span></label>
|
||||
<select id="basic_style" name="basic_style" required>
|
||||
<option value="" {% if not form or not form.basic_style %}selected{% endif %}>— Select style —</option>
|
||||
{% for g in genres %}
|
||||
<option value="{{ g }}" {% if form and form.basic_style == g %}selected{% endif %}>{{ g }}</option>
|
||||
{% for group in genre_groups %}
|
||||
<optgroup label="{{ group.label }}">
|
||||
{% for g in group.genres %}
|
||||
<option value="{{ g }}" {% if form and form.basic_style == g %}selected{% endif %}>{{ g }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<label for="additional_style">Additional style (optional)</label>
|
||||
<select id="additional_style" name="additional_style">
|
||||
<option value="" {% if not form or not form.additional_style %}selected{% endif %}>— None —</option>
|
||||
{% for g in genres %}
|
||||
<option value="{{ g }}" {% if form and form.additional_style == g %}selected{% endif %}>{{ g }}</option>
|
||||
{% for group in genre_groups %}
|
||||
<optgroup label="{{ group.label }}">
|
||||
{% for g in group.genres %}
|
||||
<option value="{{ g }}" {% if form and form.additional_style == g %}selected{% endif %}>{{ g }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue