Saisie des heures au clavier uniquement dans le tableau hebdomadaire
Remplace les inputs type=time par des champs texte HH:MM pour supprimer
l'icône d'horloge et le sélecteur natif qui rognaient le texte.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
This commit is contained in:
@ -385,17 +385,17 @@ def _oob_time_cells(date, jour, plages):
|
|||||||
matin_html = (
|
matin_html = (
|
||||||
f'<div id="cg-matin-{_e(date)}" hx-swap-oob="true" class="{matin_cls}">'
|
f'<div id="cg-matin-{_e(date)}" hx-swap-oob="true" class="{matin_cls}">'
|
||||||
f'<div class="time-pair">'
|
f'<div class="time-pair">'
|
||||||
f'<input class="time-input" type="time" name="matin_entree" data-date="{_e(date)}" value="{_e(jour["matin_entree"] or "")}">'
|
f'<input class="time-input" type="text" name="matin_entree" inputmode="numeric" pattern="[0-9]{2}:[0-9]{2}" maxlength="5" placeholder="--:--" data-date="{_e(date)}" value="{_e(jour["matin_entree"] or "")}">'
|
||||||
f'<span class="time-sep">→</span>'
|
f'<span class="time-sep">→</span>'
|
||||||
f'<input class="time-input" type="time" name="matin_sortie" data-date="{_e(date)}" value="{_e(jour["matin_sortie"] or "")}">'
|
f'<input class="time-input" type="text" name="matin_sortie" inputmode="numeric" pattern="[0-9]{2}:[0-9]{2}" maxlength="5" placeholder="--:--" data-date="{_e(date)}" value="{_e(jour["matin_sortie"] or "")}">'
|
||||||
f'</div></div>'
|
f'</div></div>'
|
||||||
)
|
)
|
||||||
aprem_html = (
|
aprem_html = (
|
||||||
f'<div id="cg-aprem-{_e(date)}" hx-swap-oob="true" class="{aprem_cls}">'
|
f'<div id="cg-aprem-{_e(date)}" hx-swap-oob="true" class="{aprem_cls}">'
|
||||||
f'<div class="time-pair">'
|
f'<div class="time-pair">'
|
||||||
f'<input class="time-input" type="time" name="aprem_entree" data-date="{_e(date)}" value="{_e(jour["aprem_entree"] or "")}">'
|
f'<input class="time-input" type="text" name="aprem_entree" inputmode="numeric" pattern="[0-9]{2}:[0-9]{2}" maxlength="5" placeholder="--:--" data-date="{_e(date)}" value="{_e(jour["aprem_entree"] or "")}">'
|
||||||
f'<span class="time-sep">→</span>'
|
f'<span class="time-sep">→</span>'
|
||||||
f'<input class="time-input" type="time" name="aprem_sortie" data-date="{_e(date)}" value="{_e(jour["aprem_sortie"] or "")}">'
|
f'<input class="time-input" type="text" name="aprem_sortie" inputmode="numeric" pattern="[0-9]{2}:[0-9]{2}" maxlength="5" placeholder="--:--" data-date="{_e(date)}" value="{_e(jour["aprem_sortie"] or "")}">'
|
||||||
f'</div></div>'
|
f'</div></div>'
|
||||||
)
|
)
|
||||||
return matin_html + aprem_html
|
return matin_html + aprem_html
|
||||||
|
|||||||
@ -18,10 +18,10 @@
|
|||||||
<td class="c-matin">
|
<td class="c-matin">
|
||||||
<div id="cg-matin-{{ j.date }}" class="td-fill{% if matin_cg %} cg{% elif matin_warn %} warn{% endif %}">
|
<div id="cg-matin-{{ j.date }}" class="td-fill{% if matin_cg %} cg{% elif matin_warn %} warn{% endif %}">
|
||||||
<div class="time-pair">
|
<div class="time-pair">
|
||||||
<input class="time-input" type="time" name="matin_entree"
|
<input class="time-input" type="text" name="matin_entree" inputmode="numeric" pattern="[0-9]{2}:[0-9]{2}" maxlength="5" placeholder="--:--"
|
||||||
data-date="{{ j.date }}" value="{{ j.matin_entree or '' }}">
|
data-date="{{ j.date }}" value="{{ j.matin_entree or '' }}">
|
||||||
<span class="time-sep">→</span>
|
<span class="time-sep">→</span>
|
||||||
<input class="time-input" type="time" name="matin_sortie"
|
<input class="time-input" type="text" name="matin_sortie" inputmode="numeric" pattern="[0-9]{2}:[0-9]{2}" maxlength="5" placeholder="--:--"
|
||||||
data-date="{{ j.date }}" value="{{ j.matin_sortie or '' }}">
|
data-date="{{ j.date }}" value="{{ j.matin_sortie or '' }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -30,10 +30,10 @@
|
|||||||
<td class="c-aprem">
|
<td class="c-aprem">
|
||||||
<div id="cg-aprem-{{ j.date }}" class="td-fill{% if aprem_cg %} cg{% elif aprem_warn %} warn{% endif %}">
|
<div id="cg-aprem-{{ j.date }}" class="td-fill{% if aprem_cg %} cg{% elif aprem_warn %} warn{% endif %}">
|
||||||
<div class="time-pair">
|
<div class="time-pair">
|
||||||
<input class="time-input" type="time" name="aprem_entree"
|
<input class="time-input" type="text" name="aprem_entree" inputmode="numeric" pattern="[0-9]{2}:[0-9]{2}" maxlength="5" placeholder="--:--"
|
||||||
data-date="{{ j.date }}" value="{{ j.aprem_entree or '' }}">
|
data-date="{{ j.date }}" value="{{ j.aprem_entree or '' }}">
|
||||||
<span class="time-sep">→</span>
|
<span class="time-sep">→</span>
|
||||||
<input class="time-input" type="time" name="aprem_sortie"
|
<input class="time-input" type="text" name="aprem_sortie" inputmode="numeric" pattern="[0-9]{2}:[0-9]{2}" maxlength="5" placeholder="--:--"
|
||||||
data-date="{{ j.date }}" value="{{ j.aprem_sortie or '' }}">
|
data-date="{{ j.date }}" value="{{ j.aprem_sortie or '' }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user