MDL-56621 forms: Hide format menu if only one

This was a regression in the new templates for editors.
This commit is contained in:
Damyon Wiese
2016-10-31 15:06:50 +08:00
parent 577bd70d38
commit 6fb8a7ab7e
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -3,14 +3,14 @@
onchange="{{onchange}}" {{/changelistener}}>{{value}}</textarea>
</div>
<div>
{{^onlyoneformat}}
{{#hasformats}}
<select name="{{name}}[format]" id="menu{{name}}format">
{{#formats}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{text}}</option>
{{/formats}}
</select>
{{/onlyoneformat}}
{{#onlyoneformat}}
{{/hasformats}}
{{^hasformats}}
<input name="{{name}}[format]" type="hidden" value="{{format}}"/>
{{/onlyoneformat}}
{{/hasformats}}
</div>
@@ -3,14 +3,14 @@
onchange="{{onchange}}" {{/changelistener}}>{{value}}</textarea>
</div>
<div>
{{^onlyoneformat}}
{{#hasformats}}
<select name="{{name}}[format]" id="menu{{name}}format" class="custom-select">
{{#formats}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{text}}</option>
{{/formats}}
</select>
{{/onlyoneformat}}
{{#onlyoneformat}}
{{/hasformats}}
{{^hasformats}}
<input name="{{name}}[format]" id="menu{{name}}format" type="hidden" value="{{format}}"/>
{{/onlyoneformat}}
{{/hasformats}}
</div>