toodego: allow cart@ds pieces to be displayed on validation page (#35631)
This commit is contained in:
parent
80bea41c15
commit
dda9d52315
|
@ -22,6 +22,9 @@ div.cartads-piece {
|
|||
margin-bottom: 2rem;
|
||||
}
|
||||
}
|
||||
&.view-validation input[type=file] {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
div.pieces-specifiques ~ div.cartads-piece {
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{% load i18n %}
|
||||
<div class="cartads-piece">
|
||||
<div class="cartads-piece view-{{ view_name }} ">
|
||||
<div class="title grid-1-1 newline">{% if piece.codePiece %}{{ piece.codePiece }} - {% endif %}{{ piece.text }}
|
||||
{% if piece.reglementaire %}<span class="required">*</span>{% endif %}</div>
|
||||
{% if piece.reglementaire and view_name != 'validation' %}<span class="required">*</span>{% endif %}</div>
|
||||
|
||||
{% for file in piece.files %}
|
||||
{% if view_name != 'validation' or file.token %}
|
||||
<div class="file-upload-widget short {{ grid }} {% if file.token %}has-file{% endif %}">
|
||||
<div class="file-button">
|
||||
<input type="file" data-url="{{ file.url }}"
|
||||
|
@ -13,7 +14,7 @@
|
|||
{% trans "Drop a file or click to select one" %}
|
||||
</div>
|
||||
<div class="widget-message upload-done">
|
||||
{% trans "Upload done" %}
|
||||
{% if view_name != 'validation' %}{% trans "Upload done" %}{% endif %}
|
||||
</div>
|
||||
<style>.click-to-upload, .upload-done { display: none; }</style>
|
||||
<div class="fileprogress" style="display: none;">
|
||||
|
@ -23,12 +24,17 @@
|
|||
</div>
|
||||
<div class="fileinfo">
|
||||
<span class="filename">{{ file.name }}</span>
|
||||
{% if view_name != 'validation' %}
|
||||
<a href="#" class="remove" title="{% trans 'Remove this file' %}">{% trans "remove" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% elif view_name == 'validation' and not piece.files.0.token %}
|
||||
-
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if piece.max_files > 1 %}
|
||||
{% if piece.max_files > 1 and view_name != 'validation' %}
|
||||
<div class="grid-1-12 button-plus">
|
||||
<button class="plus">+</button>
|
||||
</div>
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
{% with webservice.cartads_pieces.data as pieces %}
|
||||
{% for piece in pieces %}
|
||||
{% if piece.section_start %}<div class="grid-1-1 newline {{ piece.section_start|slugify }}"><h3>{{ piece.section_start }}</h3></div>{% endif %}
|
||||
{% include "qommon/forms/widgets/includes/cartads-piece.html" with piece=piece grid="grid-1-3" only %}
|
||||
{% include "qommon/forms/widgets/includes/cartads-piece.html" with piece=piece grid="grid-1-3" view_name=publisher.get_request.view_name only %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% if publisher.get_request.view_name != 'validation' %}
|
||||
{% include "qommon/forms/widgets/includes/cartads-js.html" only %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="infonotice">Prévisualisation impossible.</div>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue