templates: change custom tracking code input templates to extend parent (#40282)

This commit is contained in:
Frédéric Péters 2020-02-29 09:54:04 +01:00
parent 7669a4c7f4
commit e6b1ad24d3
4 changed files with 30 additions and 96 deletions

View File

@ -1,26 +1,5 @@
{% 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 de 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>
{% extends "combo/wcs/tracking_code_input.html" %}
{% block intro-text %}
<p>Pour suivre votre demande, indiquez le code de suivi qui vous a été transmis.</p>
{% endblock %}

View File

@ -1,23 +1,8 @@
{% load i18n %}
{% block cell-content %}
<div class="wcs-tracking-code-input">
<h2>Votre code de suivi</h2>
<form data-wcs-url="{{ url }}" method="post" action="{{ site_base }}{% url 'wcs-tracking-code' %}">
<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>{% trans 'Submit' %}</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>
{% extends "combo/wcs/tracking_code_input.html" %}
{% block title %}
<h2>Votre code de suivi</h2>
{% endblock %}
{% block intro-text %}
{% endblock %}

View File

@ -1,24 +1,9 @@
{% load i18n %}
{% block cell-content %}
<div class="wcs-tracking-code-input">
<h2>Votre code de suivi</h2>
<p>Retrouvez votre demande grâce à son code de suivi</p>
<form data-wcs-url="{{ url }}" method="post" action="{{ site_base }}{% url 'wcs-tracking-code' %}">
<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>{% trans 'Submit' %}</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>
{% extends "combo/wcs/tracking_code_input.html" %}
{% block title %}
<h2>Votre code de suivi</h2>
{% endblock %}
{% block intro-text %}
<p>Retrouvez votre demande grâce à son code de suivi</p>
{% endblock %}

View File

@ -1,27 +1,12 @@
{% load i18n %}
{% block cell-content %}
<div class="wcs-tracking-code-input">
<h2>J'ai un code de suivi</h2>
<p>
Indiquez le code de suivi Quimper+ qui vous a été attribué afin de suivre
lavancement du traitement de votre demande.
</p>
<form data-wcs-url="{{ url }}" method="post" action="{{ site_base }}{% url 'wcs-tracking-code' %}">
<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>{% trans 'Submit' %}</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>
{% extends "combo/wcs/tracking_code_input.html" %}
{% block title %}
<h2>Jai un code de suivi</h2>
<p>
Indiquez le code de suivi Quimper+ qui vous a été attribué afin de suivre
lavancement du traitement de votre demande.
</p>
{% endblock %}
{% block intro-text %}
{% endblock %}