diff --git a/js/components/forms/to_form.js b/js/components/forms/to_form.js index e84714e5..ef6b051b 100644 --- a/js/components/forms/to_form.js +++ b/js/components/forms/to_form.js @@ -1,3 +1,6 @@ +import stickybits from 'stickybits' + +import checkboxinput from '../checkbox_input' import ClinFields from '../clin_fields' import DateSelector from '../date_selector' import FormMixin from '../../mixins/form' @@ -13,6 +16,7 @@ export default { mixins: [FormMixin], components: { + checkboxinput, ClinFields, DateSelector, optionsinput, @@ -23,9 +27,18 @@ export default { }, props: { - initialClinCount: Number, - initialObligated: Number, - initialTotal: Number, + initialClinCount: { + type: Number, + default: null, + }, + initialObligated: { + type: Number, + default: null, + }, + initialTotal: { + type: Number, + default: null, + }, }, data: function() { @@ -75,4 +88,16 @@ export default { this.obligated = newObligated }, }, + + directives: { + sticky: { + inserted: (el, binding) => { + var customAttributes + if (binding.expression) { + customAttributes = JSON.parse(binding.expression) + } + stickybits(el, customAttributes) + }, + }, + }, } diff --git a/templates/task_orders/builder_base.html b/templates/task_orders/builder_base.html index 0f4848f2..d9f778be 100644 --- a/templates/task_orders/builder_base.html +++ b/templates/task_orders/builder_base.html @@ -4,7 +4,7 @@ {% from "components/modal.html" import Modal %} {% block portfolio_content %} - +
{{ form.csrf_token }} @@ -51,5 +51,5 @@
-
+ {% endblock %} diff --git a/templates/task_orders/step_3.html b/templates/task_orders/step_3.html index f9b73d79..4b887084 100644 --- a/templates/task_orders/step_3.html +++ b/templates/task_orders/step_3.html @@ -333,27 +333,23 @@ {% block to_builder_form_field %} - -
- {{ TOFormStepHeader('task_orders.form.clin_title' | translate, 'task_orders.form.clin_description' | translate, task_order.number) }} +
+ {{ TOFormStepHeader('task_orders.form.clin_title' | translate, 'task_orders.form.clin_description' | translate, task_order.number) }} - {% for clin in form.clins %} - {{ CLINFields(clin, index=loop.index - 1) }} - {% endfor %} + {% for clin in form.clins %} + {{ CLINFields(clin, index=loop.index - 1) }} + {% endfor %} -
- {{ CLINFields() }} -
- - +
+ {{ CLINFields() }}
- + + +
{% endblock %}