{% if notag is not defined %}
<div{% if component_id is defined %} id="{{ component_id }}"{% endif %} class="{{ component_class ?? 'inline field' }}{% if required is defined and required == true %} required{% endif %}">
{% endif %}
+ {% if type is defined and type == 'checkbox' %}
+ <div class="ui toggle{% if checked is defined and checked == true %} checked{% endif %} right aligned checkbox">
+ {% else %}
{% block label %}
<label for="{{ id }}"{% if title is defined %} title="{{ title }}"{% endif %}{% if labelclass is defined %} class="{% if labelclass is defined %}{{ labelclass }}{% endif %}"{% endif %}>
{% if masschange ?? false %}
{{ label }}
</label>
{% endblock %}
+ {% endif %}
{% if type is defined and type == 'password' %}<div class="ui input">{% endif %}
{% if search_id is defined %}<div id="{{ search_id }}" class="ui search field input"><div class="ui icon input">{% endif %}
{% block element %}<input
{% if autocomplete is defined %} autocomplete="{{ autocomplete }}"{% endif %}
{% if autofocus is defined %} autofocus{% endif %}
{% if size is defined %} size="{{ size }}"{% endif %}
- {% if checked is defined and checked == true %} checked="checked"{% endif %}
+ {% if checked is defined and checked == true %} checked{% endif %}
/>
{% endblock %}
- {% if search_id is defined %}<i class="search icon"></i></div></div>{% endif %}
+ {% if search_id is defined %}<i class="jsonly hidden search icon"></i></div></div>{% endif %}
{% if type is defined and type == 'password' %}</div>{% endif %}
+ {% if type is defined and type == 'checkbox' %}
+ {% block label_after %}
+ <label for="{{ id }}"{% if title is defined %} title="{{ title }}"{% endif %}{% if labelclass is defined %} class="{% if labelclass is defined %}{{ labelclass }}{% endif %}"{% endif %}>
+ {% if masschange ?? false %}
+ {# Add a checkbox for fields to change on mass edition #}
+ <input type="checkbox" name="mass_{{ entry.field_id }}" class="mass_checkbox"/>
+ {% endif %}
+ {{ label }}
+ </label>
+ {% endblock %}
+ </div>
+ {% endif %}
{% if tip is defined and tip != '' %}<i class="circular inverted primary small icon info tooltip" data-html="{{ tip }}"></i>{% endif %}
{% if example is defined %}<span class="exemple">{{ example }}</span>{% endif %}
{% if notag is not defined %}
-<div class="field">
- <label>{{ _T("Picture:") }}</label>
+<div class="field ui items">
+ <label for="photo">{{ _T("Picture:") }}</label>
+ <div class="item">
+ <div class="image">
{% if member.id %}
{% set photo_id = member.id %}
{% else %}
{% set photo_id = 0 %}
{% endif %}
- <img id="photo_adh" src="{{ path_for("photo", {"id": photo_id, "rand": time}) }}" class="picture" width="{{ member.picture.getOptimalWidth() }}" height="{{ member.picture.getOptimalHeight() }}" alt="{{ _T("Picture") }}"/><br/>
-{% if member.hasPicture() == 1 %}
- <label for="del_photo" class="labelalign">{{ _T("Delete image") }}</label> <input type="checkbox" name="del_photo" id="del_photo" value="1"/><br/>
-{% endif %}
- <input class="labelalign" type="file" name="photo"/>
+ <img id="photo_adh" src="{{ path_for("photo", {"id": photo_id, "rand": time}) }}" class="picture" width="{{ member.picture.getOptimalWidth() }}" height="{{ member.picture.getOptimalHeight() }}" alt="{{ _T("Picture") }}"/>
+ </div>
+ <div class="content">
+ <div class="description">
+ <input class="labelalign" type="file" name="photo"/>
+ </div>
+ <div class="extra">
+ {% if member.hasPicture() == 1 %}
+ <div class="ui toggle checkbox">
+ <input type="checkbox" name="del_photo" id="del_photo" value="1"/>
+ <label for="del_photo" class="labelalign">{{ _T("Delete image") }}</label>
+ </div>
+ {% endif %}
+ </div>
+ </div>
+ </div>
</div>
--- /dev/null
+/*******************************
+ Galette Overrides
+*******************************/
+
+.ui.right.aligned.toggle.checkbox label {
+ font-weight: bold;
+}
+.ui.right.aligned.toggle.checkbox input:checked ~ label,
+.ui.right.aligned.toggle.checkbox input:active ~ label {
+ color: @textColor !important;
+}