]> git.agnieray.net Git - galette.git/blob - galette/templates/default/components/forms/picture.html.twig
Only display default member picture on pdf cards
[galette.git] / galette / templates / default / components / forms / picture.html.twig
1 <div class="field ui items">
2 <label>{{ _T("Picture:") }}</label>
3 <div class="item">
4 {% if member.id %}
5 <div class="image">
6 {% set photo_id = member.id %}
7 <img id="photo_adh" src="{{ url_for("photo", {"id": photo_id, "rand": time}) }}" class="picture" width="{{ member.picture.getOptimalWidth() }}" height="{{ member.picture.getOptimalHeight() }}" alt="{{ _T("Picture") }}"/>
8 </div>
9 {% endif %}
10 <div class="content">
11 <div class="description">
12 <div class="ui file action input">
13 <input type="file" name="photo"/>
14 <label for="photo" class="ui button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
15 <i class="blue upload icon"></i>
16 {% if member.hasPicture() == 1 %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
17 </label>
18 </div>
19 </div>
20 <div class="extra ui basic fitted segment">
21 {% if member.hasPicture() == 1 %}
22 <div class="ui toggle checkbox">
23 <input type="checkbox" name="del_photo" id="del_photo" value="1"/>
24 <label for="del_photo" class="labelalign">{{ _T("Delete image") }}</label>
25 </div>
26 {% endif %}
27 </div>
28 </div>
29 </div>
30 </div>