extendedSelect.tpl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {**********************************************************************
  2. * ZimbraEmail product developed. (2017-10-30)
  3. * *
  4. *
  5. * CREATED BY MODULESGARDEN -> http://modulesgarden.com
  6. * CONTACT -> contact@modulesgarden.com
  7. *
  8. *
  9. * This software is furnished under a license and may be used and copied
  10. * only in accordance with the terms of such license and with the
  11. * inclusion of the above copyright notice. This software or any other
  12. * copies thereof may not be provided or otherwise made available to any
  13. * other person. No title to and ownership of the software is hereby
  14. * transferred.
  15. *
  16. *
  17. **********************************************************************}
  18. {**
  19. * @author Sławomir Miśkowicz <slawomir@modulesgarden.com>
  20. *}
  21. <div class="lu-form-group" {if $rawObject->isHidden()} hidden='true'{/if}>
  22. <label class="lu-form-label">
  23. {if $rawObject->isRawTitle()}{$rawObject->getRawTitle()}{elseif $rawObject->getTitle()}{$MGLANG->T($rawObject->getTitle())}{/if}
  24. {if $rawObject->getDescription()}
  25. <i data-title="{$MGLANG->T($rawObject->getDescription())}" data-toggle="lu-tooltip" class="lu-i-c-2x lu-zmdi lu-zmdi-help-outline lu-form-tooltip-helper"></i>
  26. {/if}
  27. </label>
  28. <select
  29. class="lu-form-control"
  30. name="{$rawObject->getName()}"
  31. {if $rawObject->isDisabled()}disabled="disabled"{/if}
  32. {foreach $htmlAttributes as $aValue} {$aValue@key}="{$aValue}" {/foreach}
  33. {if $rawObject->isMultiple()}data-options="removeButton:true; resotreOnBackspace:true; dragAndDrop:true; maxItems: null;" multiple="multiple"{/if}
  34. >
  35. {if $rawObject->getValue()|is_array}
  36. {foreach from=$rawObject->getAvailableValues() key=opValue item=option}
  37. <option value="{$opValue}" {if $opValue|in_array:$rawObject->getValue()}selected{/if}>{$option}</option>
  38. {/foreach}
  39. {else}
  40. {foreach from=$rawObject->getAvailableValues() key=opValue item=option}
  41. <option value="{$opValue}" {if $opValue == $rawObject->getValue()}selected{/if}>{$option}</option>
  42. {/foreach}
  43. {/if}
  44. </select>
  45. <div class="lu-form-feedback lu-form-feedback--icon" hidden="hidden">
  46. </div>
  47. </div>