/>
</div>
{% elseif get_class(field) == 'Galette\\DynamicFields\\File' %}
- {% if object.id %}
- <label class="labelalign" for="info_field_{{ field.getId() }}_{{ loop }}_new">{{ _T("new") }}</label>
- {% endif %}
- <input
- type="file"
- name="info_field_{{ field.getId() }}_{{ loop }}"
- id="info_field_{{ field.getId() }}_{{ loop }}_new"
- {% if field.isRequired() and valuedata == '' %} required="required"{% endif %}
- {% if disabled %} disabled="disabled"{% endif %}
- />
+ <div class="ui file action input">
+ <input
+ type="file"
+ name="info_field_{{ field.getId() }}_{{ loop }}"
+ id="info_field_{{ field.getId() }}_{{ loop }}_new"
+ {% if field.isRequired() and valuedata == '' %} required="required"{% endif %}
+ {% if disabled %} disabled="disabled"{% endif %}
+ />
+ <label for="info_field_{{ field.getId() }}_{{ loop }}_new" class="ui button">
+ <i class="blue upload icon"></i>
+ {% if object.id %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
+ </label>
+ </div>
{% if object.id %}
<label class="labelalign" for="info_field_{{ field.getId() }}_{{ loop }}_current">{{ _T("current") }}</label>
<a href="{{ url_for("getDynamicFile", {"id": object.id, "fid": field.getId(), "pos": loop, "name": valuedata}) }}">
</div>
<div class="content">
<div class="description">
- <label for="photo" class="ui labeled icon button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
- <i class="blue upload icon"></i>
- {{ _T("Choose a file") }}
- </label>
- <input class="labelalign ui invisible file input" type="file" name="photo"/>
+ <div class="ui file action input">
+ <input type="file" name="photo"/>
+ <label for="photo" class="ui button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
+ <i class="blue upload icon"></i>
+ {% if member.hasPicture() == 1 %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
+ </label>
+ </div>
</div>
<div class="extra">
{% if member.hasPicture() == 1 %}
<div class="active content field">
<form class="ui form" action="{{ url_for('uploadImportFile') }}" method="post" enctype="multipart/form-data">
<div class="field">
- <label for="new_file">{{ _T('Select a file:') }}</label>
- <input class="labelalign" type="file" name="new_file" accept="text/csv" id="new_file"/>
+ <div class="ui file action input">
+ <input type="file" name="new_file" accept="text/csv" id="new_file"/>
+ <label for="new_file" class="ui button">
+ <i class="blue file csv icon"></i>
+ {{ _T('Choose a file') }}
+ </label>
+ </div>
+
+
</div>
<div class="ui basic center aligned segment">
<button type="submit" name="upload" id="upload" class="ui labeled icon button">
<div class="image">
<img src="{{ url_for('logo') }}" class="picture" width="{{ logo.getOptimalWidth() }}" height="{{ logo.getOptimalHeight() }}" alt="{{ _T("Current logo") }}"/>
</div>
- {% else %}
- <label for="logo_picture" class="ui labeled icon button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
- <i class="blue upload icon"></i>
- {{ _T("Choose a file") }}
- </label>
{% endif %}
<div class="content">
<div class="description">
- <input type="file" name="logo" id="logo_picture" class="ui invisible file input"{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled="disabled"{% endif %}/>
+ <div class="ui file action input">
+ <input type="file" name="logo" id="logo_picture"{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled="disabled"{% endif %}/>
+ <label for="logo_picture" class="ui button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
+ <i class="blue upload icon"></i>
+ {% if logo.isCustom() %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
+ </label>
+ </div>
</div>
<div class="extra">
{% if logo.isCustom() %}
<div class="image">
<img src="{{ url_for('printLogo') }}" class="picture" width="{{ print_logo.getOptimalWidth() }}" height="{{ print_logo.getOptimalHeight() }}" alt="{{ _T("Current logo for printing") }}"/><br/>
</div>
- {% else %}
- <label for="card_logo" class="ui labeled icon button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
- <i class="blue upload icon"></i>
- {{ _T("Choose a file") }}
- </label>
{% endif %}
<div class="content">
<div class="description">
- <input type="file" name="card_logo" id="card_logo" class="ui invisible file input"{% if constant('GALETTE_MODE') == constant('Galette\\Core\\Galette::MODE_DEMO') %} disabled="disabled"{% endif %}/>
+ <div class="ui file action input">
+ <input type="file" name="card_logo" id="card_logo"{% if constant('GALETTE_MODE') == constant('Galette\\Core\\Galette::MODE_DEMO') %} disabled="disabled"{% endif %}/>
+ <label for="card_logo" class="ui button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
+ <i class="blue upload icon"></i>
+ {% if print_logo.isCustom() %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
+ </label>
+ </div>
</div>
<div class="extra">
{% if print_logo.isCustom() %}