Fixed issue displaying options

master
Mark Moffat 2019-12-16 12:59:35 +10:30
parent 043fce5081
commit 2f2b050c47
3 changed files with 9 additions and 9 deletions

View File

@ -10,8 +10,8 @@
<div class="col-md-10"> <div class="col-md-10">
{{#each productOptions}} {{#each productOptions}}
{{#ifCond this.optType '==' "select"}} {{#ifCond this.optType '==' "select"}}
<strong>{{this.optName}}</strong> <strong>{{../this.optName}}</strong>
<select name="opt-{{this.optName}}" class="form-control product-opt"> <select name="opt-{{../this.optName}}" class="form-control product-opt">
{{#each ../this.optOptions}} {{#each ../this.optOptions}}
<option value="{{this}}">{{this}}</option> <option value="{{this}}">{{this}}</option>
{{/each}} {{/each}}
@ -19,7 +19,7 @@
{{/ifCond}} {{/ifCond}}
{{#ifCond this.optType '==' "radio"}} {{#ifCond this.optType '==' "radio"}}
{{#each ../this.optOptions}} {{#each ../this.optOptions}}
<strong>{{this.optName}}</strong> <strong>{{../this.optName}}</strong>
<div class="radio"> <div class="radio">
<label> <label>
<input type="radio" class="product-opt" name="opt-{{../../this.optName}}" value="{{this}}"> <input type="radio" class="product-opt" name="opt-{{../../this.optName}}" value="{{this}}">

View File

@ -10,8 +10,8 @@
<div class="col s12 m10"> <div class="col s12 m10">
{{#each productOptions}} {{#each productOptions}}
{{#ifCond this.optType '==' "select"}} {{#ifCond this.optType '==' "select"}}
<strong>{{this.optName}}</strong> <strong>{{../this.optName}}</strong>
<select name="opt-{{this.optName}}" class="form-control product-opt"> <select name="opt-{{../this.optName}}" class="form-control product-opt">
{{#each ../this.optOptions}} {{#each ../this.optOptions}}
<option value="{{this}}">{{this}}</option> <option value="{{this}}">{{this}}</option>
{{/each}} {{/each}}
@ -19,7 +19,7 @@
{{/ifCond}} {{/ifCond}}
{{#ifCond this.optType '==' "radio"}} {{#ifCond this.optType '==' "radio"}}
{{#each ../this.optOptions}} {{#each ../this.optOptions}}
<strong>{{this.optName}}</strong> <strong>{{../this.optName}}</strong>
<div class="radio"> <div class="radio">
<label> <label>
<input type="radio" class="product-opt" name="opt-{{../../this.optName}}" value="{{this}}"> <input type="radio" class="product-opt" name="opt-{{../../this.optName}}" value="{{this}}">

View File

@ -10,8 +10,8 @@
<div class="col s12 m10"> <div class="col s12 m10">
{{#each productOptions}} {{#each productOptions}}
{{#ifCond this.optType '==' "select"}} {{#ifCond this.optType '==' "select"}}
<strong>{{this.optName}}</strong> <strong>{{../this.optName}}</strong>
<select name="opt-{{this.optName}}" class="form-control product-opt"> <select name="opt-{{../this.optName}}" class="form-control product-opt">
{{#each ../this.optOptions}} {{#each ../this.optOptions}}
<option value="{{this}}">{{this}}</option> <option value="{{this}}">{{this}}</option>
{{/each}} {{/each}}
@ -19,7 +19,7 @@
{{/ifCond}} {{/ifCond}}
{{#ifCond this.optType '==' "radio"}} {{#ifCond this.optType '==' "radio"}}
{{#each ../this.optOptions}} {{#each ../this.optOptions}}
<strong>{{this.optName}}</strong> <strong>{{../this.optName}}</strong>
<div class="radio"> <div class="radio">
<label> <label>
<input type="radio" class="product-opt" name="opt-{{../../this.optName}}" value="{{this}}"> <input type="radio" class="product-opt" name="opt-{{../../this.optName}}" value="{{this}}">