insert-button-widget.html.twig in Insert 8.2
Same filename and directory in other branches
Template file for the insert button.
1 theme call to insert-button-widget.html.twig
- _insert_field_process in ./
insert.module - Form API callback: Processes a file field element.
File
templates/insert-button-widget.html.twigView source
- {#
- /**
- * @file
- * Template file for the insert button.
- */
- #}
- {% if insert.settings.rotate %}
- <div class="insert-rotate">
- <label>{{ 'Rotate'|trans }}</label>
- <span class="insert-rotate-controls">
- <span class="insert-rotate-controls-left"><a href="{{ url('insert.rotate', {'fid': insert.settings.fid, 'degree': 270, 'nid': nid}) }}">↺</a></span>
- <span class="insert-rotate-controls-right"><a href="{{ url('insert.rotate', {'fid': insert.settings.fid, 'degree': 90, 'nid': nid}) }}">↻</a></span>
- </span>
- </div>
- {% endif %}
-
- {% if insert.settings.align %}
- <div class="insert-align form-type-radios">
- <label>{{ 'Align'|trans }}</label>
- <span class="insert-align-controls container-inline">
- <span class="insert-align-controls-none form-type-radio">
- <input type="radio" id="insert-{{ id }}-align-none" name="insert-{{ id }}[align]" value="none" checked />
- <label for="insert-{{ id }}-align-none">{{ 'None'|trans }}</label>
- </span>
- <span class="insert-align-controls-left form-type-radio">
- <input type="radio" id="insert-{{ id }}-align-left" name="insert-{{ id }}[align]" value="left" />
- <label for="insert-{{ id }}-align-left">{{ 'Left'|trans }}</label>
- </span>
- <span class="insert-align-controls-center form-type-radio">
- <input type="radio" id="insert-{{ id }}-align-center" name="insert-{{ id }}[align]" value="center" />
- <label for="insert-{{ id }}-align-center">{{ 'Center'|trans }}</label>
- </span>
- <span class="insert-align-controls-right form-type-radio">
- <input type="radio" id="insert-{{ id }}-align-right" name="insert-{{ id }}[align]" value="right" />
- <label for="insert-{{ id }}-align-right">{{ 'Right'|trans }}</label>
- </span>
- </span>
- </div>
- {% endif %}
-
- {% if insert.styles|length > 1 %}
- <div class="insert-style-select">
- <label for="insert-{{ id }}">{{ 'Style'|trans }}</label>
- <select id="insert-{{ id }}" class="insert-style">
- {% for value, style in insert.styles %}
- <option value="{{ value }}"{% if value == insert.default_style %}{{ 'selected="selected"' }}{% endif %}>{{ style }}</option>
- {% endfor %}
- </select>
- </div>
- {% else %}
- <input type="hidden" class="insert-style" value="{{ insert.default_style }}" />
- {% endif %}
-
- <span class="insert-button-wrapper"><span class="insert-button-overlay"></span><input type="submit" class="button js-form-submit form-submit insert-button" onclick="return false;" value="{{ 'Insert'|trans }}" data-insert-id="{{ insert.id }}" /></span>