grandlyon-sau: overwrite tracking code cell (#26240)

This commit is contained in:
Serghei Mihai 2018-10-02 09:23:20 +02:00
parent 014aae96a5
commit 0da01fa6f1
2 changed files with 30 additions and 0 deletions

View File

@ -372,6 +372,10 @@ div.cell > div {
}
}
}
div.wcs-tracking-code-input {
padding-bottom: 5px;
}
#footer a.metro {
color: inherit;
display: inline-block;

View File

@ -0,0 +1,26 @@
{% load i18n %}
{% block cell-content %}
<div class="wcs-tracking-code-input">
<h2>Code de suivi</h2>
<form data-wcs-url="{{ url }}" method="post" action="{{ site_base }}{% url 'wcs-tracking-code' %}">
<p>
Pour suivre votre demande, indiquez le code suivi qui vous a été transmis.
</p>
<input id="_cell_url_{{ cell.id }}" name="url" value="" type="hidden"/>
<input name="cell" value="{{ cell.id }}" type="hidden"/>
<div id="_cell_error_{{ cell.id }}" class="errornotice" style="display: none">
{% trans "The tracking code could not been found." %}
</div>
<input required id="tracking-code" name="code" placeholder="{% trans 'ex: CNPHNTFB' %}"/>
<button>Valider</button>
<script>
$(function() {
$('#_cell_url_{{ cell.id }}').val(window.location);
if (window.location.search.indexOf('unknown-tracking-code') != -1) {
$('#_cell_error_{{ cell.id }}').show();
}
});
</script>
</form>
</div>
{% endblock %}