diff options
Diffstat (limited to 'plugins/Morpheus/templates/settingsMacros.twig')
-rw-r--r-- | plugins/Morpheus/templates/settingsMacros.twig | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/plugins/Morpheus/templates/settingsMacros.twig b/plugins/Morpheus/templates/settingsMacros.twig deleted file mode 100644 index c09aa608eb..0000000000 --- a/plugins/Morpheus/templates/settingsMacros.twig +++ /dev/null @@ -1,137 +0,0 @@ -{% macro singleSetting(setting, index = 0) %} - - {% set settingValue = setting.getValue %} - - <div class="form-group"> - - {% if setting.introduction %} - <p class="settingIntroduction">{{ setting.introduction }}</p> - {% endif %} - - {{ _self.field(setting, index) }} - - </div> - -{% endmacro %} - -{% macro field(setting, index = -1) %} - - {% if index == -1 %} - {% set index = setting.getName %} - {% endif %} - - {% set settingValue = setting.getValue %} - - {% if setting.uiControl != 'checkbox' %} - <label>{{ setting.title }}</label> - {% endif %} - - {% if setting.inlineHelp %} - <div class="form-help"> - {{ setting.inlineHelp }} - {% if setting.defaultValue and setting.uiControl != 'checkbox' and setting.uiControl != 'radio' %} - <br/> - {{ 'General_Default'|translate }}: - {% if setting.defaultValue is iterable %} - {{ setting.defaultValue|join(', ')|truncate(50) }} - {% else %} - {{ setting.defaultValue|truncate(50) }} - {% endif %} - {% endif %} - </div> - {% endif %} - - {% if setting.uiControl == 'select' or setting.uiControl == 'multiselect' %} - <select - {% for attr, val in setting.uiControlAttributes %} - {{ attr|e('html_attr') }}="{{ val|e('html_attr') }}" - {% endfor %} - name="{{ setting.getKey|e('html_attr') }}" - {% if setting.uiControl == 'multiselect' %}multiple{% endif %}> - - {% for key, value in setting.availableValues %} - <option value='{{ key }}' - {% if settingValue is iterable and key in settingValue %} - selected='selected' - {% elseif settingValue==key %} - selected='selected' - {% endif %}> - {{ value }} - </option> - {% endfor %} - - </select> - {% elseif setting.uiControl == 'textarea' %} - <textarea style="width: 376px; height: 250px;" - {% for attr, val in setting.uiControlAttributes %} - {{ attr|e('html_attr') }}="{{ val|e('html_attr') }}" - {% endfor %} - name="{{ setting.getKey|e('html_attr') }}" - > - {{- settingValue -}} - </textarea> - {% elseif setting.uiControl == 'radio' %} - - {% for key, value in setting.availableValues %} - <label class="radio"> - <input - id="name-value-{{ index }}" - {% for attr, val in setting.uiControlAttributes %} - {{ attr|e('html_attr') }}="{{ val|e('html_attr') }}" - {% endfor %} - {% if settingValue is sameas(key) %} - checked="checked" - {% endif %} - type="radio" - value="{{ key|e('html_attr') }}" - name="{{ setting.getKey|e('html_attr') }}" /> - - {{ value }} - - {% if setting.description %} - <span class='form-description'>{{ setting.description }}</span> - {% endif %} - - </label> - {% endfor %} - - {% elseif setting.uiControl == 'checkbox' %} - - <label class="checkbox"> - <input id="name-value-{{ index }}" - {% for attr, val in setting.uiControlAttributes %} - {{ attr|e('html_attr') }}="{{ val|e('html_attr') }}" - {% endfor %} - value="1" - {% if settingValue %} - checked="checked" - {% endif %} - type="checkbox" - name="{{ setting.getKey|e('html_attr') }}"> - - {{ setting.title }} - - {% if setting.description %} - <span class='form-description'>{{ setting.description }}</span> - {% endif %} - </label> - - {% else %} - - <input - {% for attr, val in setting.uiControlAttributes %} - {{ attr|e('html_attr') }}="{{ val|e('html_attr') }}" - {% endfor %} - class="control_{{ setting.uiControl|e('html_attr') }}" - type="{{ setting.uiControl|e('html_attr') }}" - name="{{ setting.getKey|e('html_attr') }}" - value="{{ settingValue|e('html_attr') }}"> - - {% endif %} - - {% if setting.uiControl != 'checkbox' and setting.uiControl != 'radio' %} - <span class='form-description'>{{ setting.description }}</span> - {% endif %} - - -{% endmacro %} |