Commit c8336d8f authored by Raidelet Nicolas's avatar Raidelet Nicolas Committed by Guillaume Perréal
Browse files

migration read_only => attr.readonly

Showing with 6 additions and 4 deletions
+6 -4
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{{- irstea_icon('remove') -}} {{- irstea_icon('remove') -}}
</a> </a>
<div class="progress" style="display: none"> <div class="progress" style="display: none">
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div> <div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" style="width: 0"></div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
<span class="repr">{{ irstea_uploaded_file(file) }}</span> <span class="repr">{{ irstea_uploaded_file(file) }}</span>
<input class="form-control description" type="text" placeholder="{% trans from 'file_upload' %}form.description.placeholder{% endtrans %}" name="{{ full_name }}{% if multiple %}[{{index|default('__index__')}}]{% endif %}[description]" value="{{ file.description|default }}"/> <input class="form-control description" type="text" placeholder="{% trans from 'file_upload' %}form.description.placeholder{% endtrans %}" name="{{ full_name }}{% if multiple %}[{{index|default('__index__')}}]{% endif %}[description]" value="{{ file.description|default }}"/>
<span class="error"></span> <span class="error"></span>
<a href="#" class="danger delete {%- if disabled or read_only %} disabled{% endif -%}" title="{% trans %}button.delete{% endtrans %}"> <a href="#" class="danger delete {%- if disabled or attr.readonly|default(false) %} disabled{% endif -%}" title="{%
trans %}button.delete{%
endtrans %}">
{{- irstea_icon('remove') -}} {{- irstea_icon('remove') -}}
</a> </a>
</div> </div>
...@@ -33,7 +35,7 @@ ...@@ -33,7 +35,7 @@
data-upload-prototype="{{ block('file_upload_progress_prototype')|e }}" data-upload-prototype="{{ block('file_upload_progress_prototype')|e }}"
data-csrf-token="{{ csrf_token(constant('Irstea\\FileUploadBundle\\Controller\\UploadController::CSRF_INTENTION')) }}" data-csrf-token="{{ csrf_token(constant('Irstea\\FileUploadBundle\\Controller\\UploadController::CSRF_INTENTION')) }}"
{% if disabled %}data-disabled="disabled"{% endif -%} {% if disabled %}data-disabled="disabled"{% endif -%}
{% if read_only %}data-readonly="readonly"{% endif -%} {% if attr.readonly|default(false) %}data-readonly="readonly"{% endif -%}
> >
<div class="fileinput-entries"> <div class="fileinput-entries">
{%- if value is not empty %} {%- if value is not empty %}
...@@ -51,7 +53,7 @@ ...@@ -51,7 +53,7 @@
<span>{{ irstea_icon('upload') }}&nbsp;{% trans %}button.upload{% endtrans %}</span> <span>{{ irstea_icon('upload') }}&nbsp;{% trans %}button.upload{% endtrans %}</span>
<input type="file" name="_hack_{{ full_name }}" data-map-errors-to="#{{ id }}" <input type="file" name="_hack_{{ full_name }}" data-map-errors-to="#{{ id }}"
{%- if multiple %} multiple="multiple"{% endif -%} {%- if multiple %} multiple="multiple"{% endif -%}
{%- if disabled or read_only %} disabled="disabled"{% endif -%} {%- if disabled or attr.readonly|default(false) %} disabled="disabled"{% endif -%}
/> />
</div> </div>
{% if multiple and widget_attr["data-max-number-of-files"] is defined %} {% if multiple and widget_attr["data-max-number-of-files"] is defined %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment