Add documents to Activity Form

This commit is contained in:
Jean-Francois Monfort
2021-05-06 13:40:25 +02:00
parent 1f1b9c594f
commit fc172fdb1f
5 changed files with 77 additions and 9 deletions

View File

@@ -63,6 +63,9 @@
{%- if form.sentReceived is defined -%}
{{ form_row(form.sentReceived) }}
{% endif %}
{%- if form.documents is defined -%}
{{ form_row(form.documents) }}
{% endif %}
{{ form_widget(edit_form) }}
<ul class="record_actions sticky-form-buttons">
@@ -81,7 +84,12 @@
{% endblock %}
{% block js %}
<script type="text/javascript">
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
</script>
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script>
<script type="text/javascript">
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
</script>
{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{ asset('build/async_upload.css') }}"/>
{% endblock %}

View File

@@ -65,6 +65,10 @@
{{ form_row(form.sentReceived) }}
{% endif %}
{%- if form.documents is defined -%}
{{ form_row(form.documents) }}
{% endif %}
<div class="grid-12 centered sticky-form-buttons">
<button class="sc-button green margin-10" type="submit"><i class="fa fa-save"></i> {{ 'Add a new activity'|trans }}</button>
</div>
@@ -72,7 +76,12 @@
{% endblock %}
{% block js %}
<script type="text/javascript">
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
</script>
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script>
<script type="text/javascript">
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
</script>
{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{ asset('build/async_upload.css') }}"/>
{% endblock %}