Skip to content

Commit

Permalink
add stakeholder select to contact details page
Browse files Browse the repository at this point in the history
  • Loading branch information
odenypeter committed Nov 23, 2019
1 parent 3305ffe commit 01a58ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions templates/workflow/contact_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,18 @@ <h4 class="page-title">
{% crispy form %}
</div>
</div>
<script>
$(document).ready(() => {
$('#id_stakeholder').select2({
theme:'bootstrap'
});
$('#id_country').select2({
theme:'bootstrap'
});
$('#id_title').select2({
theme:'bootstrap'
});
})
</script>

{% endblock content %}
4 changes: 3 additions & 1 deletion workflow/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1546,9 +1546,10 @@ def __init__(self, *args, **kwargs):
self.helper.help_text_inline = True
self.helper.html5_required = True
self.helper.layout = Layout(
'name',
Row(
Column('title', css_class='form-group col-md-6 mb-0'),
Column('name', css_class='form-group col-md-6 mb-0'),
Column('stakeholder', css_class='form-group col-md-6 mb-0'),
css_class='form-row'
),
Row(
Expand All @@ -1561,6 +1562,7 @@ def __init__(self, *args, **kwargs):
Column('country', css_class='form-group col-md-6 mb-0'),
css_class='form-row'
),

'address',
Reset('reset', 'Close', css_class='btn btn-md btn-close'),
Submit('submit', 'Save Changes',
Expand Down

0 comments on commit 01a58ad

Please sign in to comment.