PORT PHRAS-1301/PHRAS-1676 to 4.1

This commit is contained in:
Mike Ng
2017-12-13 12:51:08 +04:00
parent aecc97bc3d
commit 2811964f01
2 changed files with 11 additions and 9 deletions

View File

@@ -54,11 +54,12 @@
<h5>{{ 'upload:: Destination (collection) :' | trans }} :</h5>
{# collections list #}
{% if collections|length > 0 %}
<select name="base_id" class="span3" style="margin-left: 10px;">
{% set last_used_collection = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'upload_last_used_collection') %}
<select name="base_id" class="span3 upload-options-collection" style="margin-left: 10px;">
{% for sbasId, availableCollections in collections %}
<optgroup label="{{ availableCollections['databox'].get_label(app['locale']) }}" class="select-label">
{% for collection in availableCollections['databox_collections'] %}
<option value="{{ collection.get_base_id() }}" class="select-row">{{ collection.get_label(app['locale']) }}</option>
<option {% if last_used_collection == collection.get_base_id() %} selected="selected" {% endif %} value="{{ collection.get_base_id() }}" class="select-row">{{ collection.get_label(app['locale']) }}</option>
{% endfor %}
</optgroup>
{% endfor %}

View File

@@ -55,14 +55,15 @@
<div class='settings-box'>
<h5>{{ 'upload:: Destination (collection) :' | trans }} :</h5>
{# collections list #}
<select name="base_id" class="span3" style="margin-left: 10px;">
{% for sbasId, availableCollections in collections %}
<optgroup label="{{ availableCollections['databox'].get_label(app['locale']) }}" class="select-label">
{% for collection in availableCollections['databox_collections'] %}
<option value="{{ collection.get_base_id() }}" class="select-row">{{ collection.get_label(app['locale']) }}</option>
{% set last_used_collection = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'upload_last_used_collection') %}
<select name="base_id" class="span3 upload-options-collection" style="margin-left: 10px;">
{% for sbasId, availableCollections in collections %}
<optgroup label="{{ availableCollections['databox'].get_label(app['locale']) }}" class="select-label">
{% for collection in availableCollections['databox_collections'] %}
<option {% if last_used_collection == collection.get_base_id() %} selected="selected" {% endif %} value="{{ collection.get_base_id() }}" class="select-row">{{ collection.get_label(app['locale']) }}</option>
{% endfor %}
</optgroup>
{% endfor %}
</optgroup>
{% endfor %}
</select>
{# collections status #}
{% for availableCollections in collections %}