Добавление фильтра по магазину в список продуктов
This commit is contained in:
@@ -136,6 +136,19 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-store">{{ entry_store }}</label>
|
||||
<select name="filter_store_id" id="input-store" class="form-control">
|
||||
<option value=""></option>
|
||||
{% for store in stores %}
|
||||
{% if store.store_id == filter_store_id %}
|
||||
<option value="{{ store.store_id }}" selected="selected">{{ store.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ store.store_id }}">{{ store.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-noindex">{{ entry_noindex }}</label>
|
||||
<select name="filter_noindex" id="input-noindex" class="form-control">
|
||||
<option value=""></option>
|
||||
@@ -279,7 +292,13 @@ $('#button-filter').on('click', function() {
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + encodeURIComponent(filter_status);
|
||||
}
|
||||
|
||||
|
||||
var filter_store_id = $('select[name=\'filter_store_id\']').val();
|
||||
|
||||
if (filter_store_id !== '') {
|
||||
url += '&filter_store_id=' + encodeURIComponent(filter_store_id);
|
||||
}
|
||||
|
||||
var filter_category = $('input[name=\'filter_category\']').val();
|
||||
if (filter_category) {
|
||||
url += '&filter_category=' + encodeURIComponent(filter_category);
|
||||
|
||||
Reference in New Issue
Block a user