Add clause to check first if associations are present on battery form
This commit is contained in:
parent
8860e6a483
commit
716fbc7e3d
1 changed files with 3 additions and 3 deletions
|
|
@ -75,7 +75,7 @@
|
|||
<select class="form-control m-input" id="manufacturer" name="manufacturer">
|
||||
<option value=""></option>
|
||||
{% for manufacturer in bmfgs %}
|
||||
<option value="{{ manufacturer.getID() }}"{{ manufacturer.getID() == obj.getManufacturer().getID() ? ' selected' }}>{{ manufacturer.getName() }}</option>
|
||||
<option value="{{ manufacturer.getID() }}"{{ obj.getManufacturer() and manufacturer.getID() == obj.getManufacturer().getID() ? ' selected' }}>{{ manufacturer.getName() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="form-control-feedback hide" data-field="manufacturer"></div>
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
<select class="form-control m-input" id="model" name="model">
|
||||
<option value=""></option>
|
||||
{% for model in models %}
|
||||
<option value="{{ model.getID() }}"{{ obj.getModel().getID() ? ' selected' }}>{{ model.getName() }}</option>
|
||||
<option value="{{ model.getID() }}"{{ obj.getModel() and obj.getModel().getID() ? ' selected' }}>{{ model.getName() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="form-control-feedback hide" data-field="model"></div>
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
<select class="form-control m-input" id="size" name="size">
|
||||
<option value=""></option>
|
||||
{% for size in sizes %}
|
||||
<option value="{{ size.getID() }}"{{ obj.getSize().getID() ? ' selected' }}>{{ size.getName() }}</option>
|
||||
<option value="{{ size.getID() }}"{{ obj.getSize() and obj.getSize().getID() ? ' selected' }}>{{ size.getName() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="form-control-feedback hide" data-field="size"></div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue