From e39d2fe191386f2e78271c2e00e9877af32525ab Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Wed, 4 Sep 2019 11:21:12 -0400 Subject: [PATCH] Use caller for date picker to show alert message --- styles/sections/_task_order.scss | 4 ++++ templates/components/date_picker.html | 7 +++---- templates/task_orders/step_3.html | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/styles/sections/_task_order.scss b/styles/sections/_task_order.scss index d3c1b3bb..5ab6c814 100644 --- a/styles/sections/_task_order.scss +++ b/styles/sections/_task_order.scss @@ -98,6 +98,10 @@ width: 45rem; } + fieldset.date-picker { + width: auto; + } + .form-row { margin: 0; } diff --git a/templates/components/date_picker.html b/templates/components/date_picker.html index 0222c33e..9461f301 100644 --- a/templates/components/date_picker.html +++ b/templates/components/date_picker.html @@ -8,8 +8,7 @@ mindate=None, maxdate=None, watch=False, - optional=True, - pop_end_alert=False) -%} + optional=True) -%} - {% if pop_end_alert %} - {{ Alert(message="task_orders.form.pop_end_alert" | translate) }} + {% if caller %} + {{ caller() }} {% endif %} {% if description %} diff --git a/templates/task_orders/step_3.html b/templates/task_orders/step_3.html index cd41eb1e..464c098a 100644 --- a/templates/task_orders/step_3.html +++ b/templates/task_orders/step_3.html @@ -170,7 +170,9 @@
- {{ 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 %}
{% else %}