templates/web/admin/form_field/form_field.twig line 1

Open in your IDE?
  1. {##
  2.  # Form field
  3.  #}
  4. {% if not this.getParam('fieldOnly') %}
  5.   {% include this.getFieldLabelTemplate() %}
  6. {% endif %}
  7. <div class="{{ this.getValueContainerClass() }}">
  8.   <div class="input-internal-wrapper">
  9.     {% if this.getParam('editOnClick') %}
  10.       <div {{ this.printTagAttributes(this.getContainerAttributes())|raw }}>
  11.         <div {{ this.printTagAttributes(this.getViewContainerAttributes())|raw }}>{% include this.getViewTemplate() %}</div>
  12.         <div {{ this.printTagAttributes(this.getFieldContainerAttributes())|raw }}>
  13.           {% include this.getDir() ~ '/' ~ this.getFieldTemplate() %}
  14.         </div>
  15.       </div>
  16.     {% else %}
  17.       {% include this.getDir() ~ '/' ~ this.getFieldTemplate() %}
  18.     {% endif %}
  19.     {% if this.hasHelp() %}
  20.       <div class="help-wrapper">
  21.         {{ widget('XLite\\View\\Tooltip', text=t(this.getParam('help')), helpWidget=this.getParam('helpWidget'), isImageTag='true', className='help-icon') }}
  22.       </div>
  23.     {% endif %}
  24.   </div>
  25.   {% if this.getParam('linkHref') %}
  26.     {% if this.getParam('linkImg') %}
  27.       <img src="{{ this.getParam('linkImg') }}" class="form-field-link-img" alt="" height="20">
  28.     {% endif %}
  29.     <a class="form-field-link {{ this.getFieldId() }}-link" href="{{ this.getParam('linkHref') }}">
  30.       {{ t(this.getParam('linkText'))|raw }}
  31.     </a>
  32.   {% endif %}
  33.   {% if this.getParam('comment') %}
  34.     <div class="form-field-comment {{ this.getFieldId() }}-comment">{{ t(this.getParam('comment'))|raw }}</div>
  35.   {% endif %}
  36.   {% if not this.showErrorsViaTopMessage() and this.getSavedErrorMessage() %}
  37.     <div class="form-field-error alert alert-danger {{ this.getFieldId() }}-error">{{ this.getSavedErrorMessage() }}</div>
  38.   {% endif %}
  39.   {% if this.getFormFieldJSData() %}{{ this.displayCommentedData(this.getFormFieldJSData()) }}{% endif %}
  40.   {% if this.getInlineJSCode() %}
  41.     <script type="text/javascript">{{ this.getInlineJSCode()|raw }}</script>
  42.   {% endif %}
  43. </div>
  44. {% if not this.getParam('fieldOnly') %}
  45.   <div class="clear"></div>
  46. {% endif %}