diff --git a/RIGS/static/js/interaction.js b/RIGS/static/js/interaction.js index 933179da..7d2617f4 100644 --- a/RIGS/static/js/interaction.js +++ b/RIGS/static/js/interaction.js @@ -42,6 +42,8 @@ $('#item-table').on('click', '.item-add', function () { $('#item_description').val(''); $('#item_quantity').val(''); $('#item_cost').val(''); + + $($(this).data('target')).modal('show'); }); $('#item-table').on('click', '.item-edit', function () { @@ -55,6 +57,8 @@ $('#item-table').on('click', '.item-edit', function () { $('#item_description').val(fields.description); $('#item_quantity').val(fields.quantity); $('#item_cost').val(fields.cost); + + $($(this).data('target')).modal('show'); }); $('body').on('submit', '#item-form', function (e) { diff --git a/RIGS/templates/RIGS/event_form.html b/RIGS/templates/RIGS/event_form.html index 9349463b..1701cdb1 100644 --- a/RIGS/templates/RIGS/event_form.html +++ b/RIGS/templates/RIGS/event_form.html @@ -346,71 +346,5 @@ - + {% include 'RIGS/item_modal.html' %} {% endblock %} \ No newline at end of file diff --git a/RIGS/templates/RIGS/item_modal.html b/RIGS/templates/RIGS/item_modal.html new file mode 100644 index 00000000..602f24ef --- /dev/null +++ b/RIGS/templates/RIGS/item_modal.html @@ -0,0 +1,74 @@ + \ No newline at end of file diff --git a/RIGS/templates/RIGS/item_row.html b/RIGS/templates/RIGS/item_row.html index 1ceb6f9f..fd240fc5 100644 --- a/RIGS/templates/RIGS/item_row.html +++ b/RIGS/templates/RIGS/item_row.html @@ -1,3 +1,4 @@ + {{ item.name }}