<#if attributes.leftTitle??><#t/>
${attributes.leftTitle}
#if><#t/>
<#include "/${attributes.templateDir}/simple/select.ftl" />
<#if attributes.allowUpDownOnLeft!true>
title="${attributes.rightDownLabel}"
#if>
onclick="moveOptionDown(document.getElementById('${attributes.id}'), 'key', <#if attributes.headerKey??>'${attributes.headerKey}'<#else>''#if>);<#if attributes.upDownOnLeftOnclick?has_content>${attributes.upDownOnLeftOnclick};#if>"<#t/>
><#t/>
title="${attributes.rightUpLabel}"
#if>
onclick="moveOptionUp(document.getElementById('${attributes.id}'), 'key', <#if attributes.headerKey??>'${attributes.headerKey}'<#else>''#if>);<#if attributes.upDownOnLeftOnclick?has_content>${attributes.upDownOnLeftOnclick};#if>"<#t/>
><#t/>
#if>
<#if attributes.allowAddToLeft!true><#t/>
<#assign addToLeftLabel = attributes.addToLeftLabel!"To left"/><#t/>
<#if attributes.doubleHeaderKey??><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${addToLeftLabel}"
onclick="moveSelectedOptions(document.getElementById('${attributes.doubleId}'), document.getElementById('${attributes.id}'), false, '${attributes.doubleHeaderKey}', '');<#if attributes.addToLeftOnclick?has_content>${attributes.addToLeftOnclick};#if>"
><#t/>
<#else><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${addToLeftLabel}"
onclick="moveSelectedOptions(document.getElementById('${attributes.doubleId}'), document.getElementById('${attributes.id}'), false, '');<#if attributes.addToLeftOnclick?has_content>${attributes.addToLeftOnclick};#if>"
><#t/>
#if><#t/>
#if><#t/>
<#if attributes.allowAddToRight!true><#t/>
<#assign addToRightLabel=attributes.addToRightLabel!"To right" /><#t/>
<#if attributes.headerKey??><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${addToRightLabel}"
onclick="moveSelectedOptions(document.getElementById('${attributes.id}'), document.getElementById('${attributes.doubleId}'), false, '${attributes.headerKey}', '');<#if attributes.addToRightOnclick?has_content>${attributes.addToRightOnclick};#if>"
><#t/>
<#else><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${addToRightLabel}"
onclick="moveSelectedOptions(document.getElementById('${attributes.id}'), document.getElementById('${attributes.doubleId}'), false, '');<#if attributes.addToRightOnclick?has_content>${attributes.addToRightOnclick};#if>"
><#t/>
#if><#t/>
#if><#t/>
<#if attributes.allowAddAllToLeft!true><#t/>
<#assign addAllToLeftLabel=attributes.addAllToLeftLabel!"All to left" /><#t/>
<#if attributes.doubleHeaderKey??><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${addAllToLeftLabel}"
onclick="moveAllOptions(document.getElementById('${attributes.doubleId}'), document.getElementById('${attributes.id}'), false, '${attributes.doubleHeaderKey}', '');<#if attributes.addAllToLeftOnclick?has_content>${attributes.addAllToLeftOnclick};#if>"
><#t/>
<#else><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${addAllToLeftLabel}"
onclick="moveAllOptions(document.getElementById('${attributes.doubleId}'), document.getElementById('${attributes.id}'), false, '');<#if attributes.addAllToLeftOnclick?has_content>${attributes.addAllToLeftOnclick};#if>"
><#t/>
#if><#t/>
#if><#t/>
<#if attributes.allowAddAllToRight!true><#t/>
<#assign addAllToRightLabel=attributes.addAllToRightLabel!"All to right" /><#t/>
<#if attributes.headerKey??><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${addAllToRightLabel}"
onclick="moveAllOptions(document.getElementById('${attributes.id}'), document.getElementById('${attributes.doubleId}'), false, '${attributes.headerKey}', '');<#if attributes.addAllToRightOnclick?has_content>${attributes.addAllToRightOnclick};#if>"
><#t/>
<#else><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${addAllToRightLabel}"
onclick="moveAllOptions(document.getElementById('${attributes.id}'), document.getElementById('${attributes.doubleId}'), false, '');<#if attributes.addAllToRightOnclick?has_content>${attributes.addAllToRightOnclick};#if>"
><#t/>
#if><#t/>
#if><#t/>
<#if attributes.allowSelectAll!true><#t/>
<#assign selectAllLabel=attributes.selectAllLabel!"Select all" /><#t/>
<#if attributes.headerKey?? && attributes.doubleHeaderKey??><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${selectAllLabel}"
onclick="selectAllOptionsExceptSome(document.getElementById('${attributes.id}'), 'key', '${attributes.headerKey}');selectAllOptionsExceptSome(document.getElementById('${attributes.doubleId}'), 'key', '${attributes.doubleHeaderKey}');<#if attributes.selectAllOnclick?has_content>${attributes.selectAllOnclick};#if>"
><#t/>
<#elseif attributes.headerKey??><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${selectAllLabel}"
onclick="selectAllOptionsExceptSome(document.getElementById('${attributes.id}'), 'key', '${attributes.headerKey}');selectAllOptions(document.getElementById('${attributes.doubleId}'));<#if attributes.selectAllOnclick?has_content>${attributes.selectAllOnclick};#if>"
><#t/>
<#elseif attributes.doubleHeaderKey??><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${selectAllLabel}"
onclick="selectAllOptions(document.getElementById('${attributes.id}'));selectAllOptionsExceptSome(document.getElementById('${attributes.doubleId}'), 'key', '${attributes.doubleHeaderKey}');<#if attributes.selectAllOnclick?has_content>${attributes.selectAllOnclick};#if>"
><#t/>
<#else><#t/>
<#t/>
class="btn ${attributes.buttonCssClass}"
<#else><#t/>
class="btn btn-outline-secondary"
#if><#t/>
<#if attributes.buttonCssStyle??><#t/>
style="${attributes.buttonCssStyle}"
#if><#t/>
title="${selectAllLabel}"
onclick="selectAllOptions(document.getElementById('${attributes.id}'));selectAllOptions(document.getElementById('${attributes.doubleId}'));<#if attributes.selectAllOnclick?has_content>${attributes.selectAllOnclick};#if>"
><#t/>
#if><#t/>
#if><#t/>
<#if attributes.rightTitle??><#t/>
${attributes.rightTitle}
#if><#t/>
<#t/>
size="${attributes.get("doubleSize")}"
#if><#t/>
<#if attributes.doubleDisabled!false><#t/>
disabled="disabled"
#if><#t/>
<#if attributes.doubleMultiple!false><#t/>
multiple="multiple"
#if><#t/>
<#if attributes.doubleTabindex??><#t/>
tabindex="${attributes.tabindex}"
#if><#t/>
<#if attributes.doubleId??><#t/>
id="${attributes.doubleId}"
#if><#t/>
<#if attributes.doubleCss??><#t/>
class="form-control ${attributes.doubleCss}"
<#else><#t/>
class="form-control"
#if><#t/>
<#if attributes.doubleStyle??><#t/>
style="${attributes.doubleStyle}"
#if><#t/>
<#if attributes.doubleOnclick??><#t/>
onclick="${attributes.doubleOnclick}"
#if><#t/>
<#if attributes.doubleOndblclick??><#t/>
ondblclick="${attributes.doubleOndblclick}"
#if><#t/>
<#if attributes.doubleOnmousedown??><#t/>
onmousedown="${attributes.doubleOnmousedown}"
#if><#t/>
<#if attributes.doubleOnmouseup??><#t/>
onmouseup="${attributes.doubleOnmouseup}"
#if><#t/>
<#if attributes.doubleOnmousemove??><#t/>
onmousemove="${attributes.doubleOnmousemove}"
#if><#t/>
<#if attributes.doubleOnmouseover??><#t/>
onmouseover="${attributes.doubleOnmouseover}"
#if><#t/>
<#if attributes.doubleOnmouseout??><#t/>
onmouseout="${attributes.doubleOnmouseout}"
#if><#t/>
<#if attributes.doubleOnfocus??><#t/>
onfocus="${attributes.doubleOnfocus}"
#if><#t/>
<#if attributes.doubleOnblur??><#t/>
onblur="${attributes.doubleOnblur}"
#if><#t/>
<#if attributes.doubleOnkeypress??><#t/>
onkeypress="${attributes.doubleOnkeypress}"
#if><#t/>
<#if attributes.doubleOnKeydown??><#t/>
onkeydown="${attributes.doubleOnkeydown}"
#if><#t/>
<#if attributes.doubleOnkeyup??><#t/>
onkeyup="${attributes.doubleOnkeyup}"
#if><#t/>
<#if attributes.doubleOnselect??><#t/>
onselect="${attributes.doubleOnselect}"
#if><#t/>
<#if attributes.doubleOnchange??><#t/>
onchange="${attributes.doubleOnchange}"
#if><#t/>
<#if attributes.doubleAccesskey??><#t/>
accesskey="${attributes.doubleAccesskey}"
#if>
>
<#if attributes.doubleHeaderKey?? && attributes.doubleHeaderValue??><#t/>
${attributes.doubleHeaderValue}
#if><#t/>
<#if attributes.doubleEmptyOption!false><#t/>
#if><#t/>
<@s.iterator value="attributes.doubleList"><#t/>
<#if attributes.doubleListKey??><#t/>
<#assign doubleItemKey = stack.findValue(attributes.doubleListKey) /><#t/>
<#else><#t/>
<#assign doubleItemKey = stack.findValue('top') /><#t/>
#if><#t/>
<#assign doubleItemKeyStr = doubleItemKey.toString() /><#t/>
<#if attributes.doubleListValue??><#t/>
<#assign doubleItemValue = stack.findString(attributes.doubleListValue)!"" /><#t/>
<#else><#t/>
<#assign doubleItemValue = stack.findString('top') /><#t/>
#if><#t/>
<#if tag.contains(attributes.doubleNameValue, doubleItemKey)><#t/>
selected="selected"<#rt/>
#if><#t/>
>${doubleItemValue}<#lt/>
@s.iterator><#t/>
<#if attributes.doubleMultiple!false>
<#if attributes.doubleDisabled!false>
disabled="disabled"<#rt/>
#if>
/>
#if>
<#if attributes.allowUpDownOnRight!true>
title="${attributes.rightDownLabel}"
#if>
onclick="moveOptionDown(document.getElementById('${attributes.doubleId}'), 'key', <#if attributes.doubleHeaderKey??>'${attributes.doubleHeaderKey}'<#else>''#if>);<#if attributes.upDownOnLeftOnclick?has_content>${attributes.upDownOnLeftOnclick};#if>"<#t/>
><#t/>
title="${attributes.rightUpLabel}"
#if>
onclick="moveOptionUp(document.getElementById('${attributes.doubleId}'), 'key', <#if attributes.doubleHeaderKey??>'${attributes.doubleHeaderKey}'<#else>''#if>);<#if attributes.upDownOnLeftOnclick?has_content>${attributes.upDownOnLeftOnclick};#if>"<#t/>
><#t/>
#if>