Address: changed country to country_id with Country table
This commit is contained in:
@@ -89,7 +89,11 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="country">Land</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="country" id="country" value="<?=$address->country?>">
|
||||
<select name="country_id" id="country_id" class="form-control">
|
||||
<?php foreach(CountryModel::getAll() as $country): ?>
|
||||
<option value="<?=$country->id?>" <?=(($address && $address->country_id == $country->id) || ((!$address || !$address->country_id) && $country->name == "Österreich")) ? "selected='selected'" : ""?>><?=$country->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
@@ -449,6 +453,7 @@
|
||||
placeholder: ""
|
||||
});
|
||||
$("#addresstypes").select2();
|
||||
$("#country_id").select2();
|
||||
|
||||
|
||||
function validateIbanFormat(iban) {
|
||||
|
||||
Reference in New Issue
Block a user