Fixed select2

This commit is contained in:
Frank Schubert
2021-08-03 20:33:18 +02:00
parent 86b69bd7a0
commit 2619183304
2 changed files with 7 additions and 7 deletions

View File

@@ -43,7 +43,7 @@
<div class="col-lg-12 mb-2">
<h4>Vertragsinhaber</h4>
<select class="form-control" name="owner_id" id="owner_id">
<select class="form-control select2" name="owner_id" id="owner_id">
<option></option>
<option value="new" <?=($order->owner_id == "new") ? "selected='selected'" : ""?>>Neu...</option>
<?php foreach($addresses as $address): ?>
@@ -150,7 +150,7 @@
<div class="col-lg-12 mb-2">
<h4>Rechungsadresse</h4>
<select class="form-control" name="billingaddress_id" id="billingaddress_id">
<select class="form-control select2" name="billingaddress_id" id="billingaddress_id">
<option></option>
<option value="new" <?=($order->billingaddress_id == "new") ? "selected='selected'" : ""?>>Neu...</option>
<?php foreach($addresses as $address): ?>
@@ -623,14 +623,14 @@
<script type="text/javascript">
$("#owner_id").select2({
/*$("#owner_id").select2({
allowClear: true,
placeholder: ""
});
$("#billingaddress_id").select2({
});*/
/*$("#billingaddress_id").select2({
allowClear: true,
placeholder: ""
});
});*/
$('.select2').each(function(){
$(this).select2({

View File

@@ -27,7 +27,7 @@ class OrderController extends mfBaseController {
$this->layout()->set("products", ProductModel::getAll());
$this->layout()->set("terminations", TerminationModel::getAll());
//var_dump(AddressModel::search(['parents_only' => 1]));exit;
}
protected function editAction() {