mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-14 20:35:08 +02:00
Initialize selectpicker via stimulus controller.
This commit is contained in:
parent
f1ea25cad2
commit
f276c436ae
16 changed files with 31 additions and 32 deletions
|
@ -107,7 +107,6 @@
|
|||
$holder.append($newFormRow);
|
||||
|
||||
//Reinit the selectpickers
|
||||
$(".selectpicker").selectpicker();
|
||||
$(".file").fileinput();
|
||||
|
||||
//Reinit typeahead:
|
||||
|
|
|
@ -104,8 +104,6 @@
|
|||
|
||||
$holder.append($newFormRow);
|
||||
|
||||
//Reinit the selectpickers
|
||||
$(".selectpicker").selectpicker();
|
||||
$(".file").fileinput();
|
||||
|
||||
//Reinit typeahead:
|
||||
|
|
|
@ -55,8 +55,5 @@
|
|||
|
||||
$holder.append($newFormRow);
|
||||
|
||||
//Reinit the selectpickers
|
||||
$(".selectpicker").selectpicker();
|
||||
|
||||
}
|
||||
</script>
|
|
@ -52,10 +52,6 @@
|
|||
$("#" + min_discount_id).val(new_min_amount);
|
||||
$("#" + price_related_id).val("1");
|
||||
|
||||
|
||||
//Reinit the selectpickers
|
||||
$(".selectpicker").selectpicker();
|
||||
|
||||
}
|
||||
|
||||
function delete_orderdetail_entry(btn) {
|
||||
|
@ -77,9 +73,5 @@
|
|||
newForm = newForm.replace(/__name__/g, index);
|
||||
|
||||
$holder.children("tbody").append(newForm);
|
||||
|
||||
//Reinit the selectpickers
|
||||
$(".selectpicker").selectpicker();
|
||||
|
||||
}
|
||||
</script>
|
|
@ -7,7 +7,7 @@
|
|||
<div class="input-group input-group-sm">
|
||||
{{ form_widget(form.price) }}
|
||||
<div class="input-group-append">
|
||||
{{ form_widget(form.currency, {'attr': {'class': 'selectpicker form-control-sm'}}) }}
|
||||
{{ form_widget(form.currency, {'attr': {'class': 'selectpicker form-control-sm', 'data-controller': 'elements--selectpicker'}}) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_errors(form.price) }}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{# <span id="select_count"></span> #}
|
||||
<span class="badge badge-secondary">{% trans with {'%count%': '<span id="select_count"></span>'} %}part_list.action.part_count{% endtrans %}</span>
|
||||
|
||||
<select class="selectpicker" name="action" id="select_action"
|
||||
<select class="selectpicker" name="action" id="select_action" data-controller="elements--selectpicker"
|
||||
title="{% trans %}part_list.action.action.title{% endtrans %}" onchange="updateTargetSelect()" required>
|
||||
<optgroup label="{% trans %}part_list.action.action.group.favorite{% endtrans %}">
|
||||
<option {% if not is_granted('@parts.edit') %}disabled{% endif %} value="favorite">{% trans %}part_list.action.action.favorite{% endtrans %}</option>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue