Use caller for date picker to show alert message
This commit is contained in:
parent
659bd131b3
commit
e39d2fe191
@ -98,6 +98,10 @@
|
|||||||
width: 45rem;
|
width: 45rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fieldset.date-picker {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.form-row {
|
.form-row {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
mindate=None,
|
mindate=None,
|
||||||
maxdate=None,
|
maxdate=None,
|
||||||
watch=False,
|
watch=False,
|
||||||
optional=True,
|
optional=True) -%}
|
||||||
pop_end_alert=False) -%}
|
|
||||||
|
|
||||||
<date-selector
|
<date-selector
|
||||||
{% if maxdate %}maxdate="{{ maxdate.strftime("%Y-%m-%d") }}"{% endif %}
|
{% if maxdate %}maxdate="{{ maxdate.strftime("%Y-%m-%d") }}"{% endif %}
|
||||||
@ -28,8 +27,8 @@
|
|||||||
{{ label }}
|
{{ label }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if pop_end_alert %}
|
{% if caller %}
|
||||||
{{ Alert(message="task_orders.form.pop_end_alert" | translate) }}
|
{{ caller() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if description %}
|
{% if description %}
|
||||||
|
@ -170,7 +170,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-col">
|
<div class="form-col">
|
||||||
{{ DatePicker(fields.end_date, watch=True, optional=False, pop_end_alert=True) }}
|
{% call DatePicker(fields.end_date, watch=True, optional=False) %}
|
||||||
|
{{ Alert(message="task_orders.form.pop_end_alert" | translate) }}
|
||||||
|
{% endcall %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user