summaryrefslogtreecommitdiff
path: root/views/partials/editeventmodal.handlebars
diff options
context:
space:
mode:
authorTom Parker-Shemilt <palfrey@tevp.net>2020-01-07 09:38:25 +0000
committerTom Parker-Shemilt <palfrey@tevp.net>2020-01-07 09:38:25 +0000
commitbb0f9160de2b02fd1a13f40f7702893238b3fe04 (patch)
tree4c9e70b458baaab4e9cdb49a5992e9af25ea0bce /views/partials/editeventmodal.handlebars
parentae5e25d7d8a1edac542adf5e5510105aca76c0d9 (diff)
parentc5835cbdbcfe3abda637e298a89b36ebb058c22a (diff)
Merge branch 'master' into docker-travis
Diffstat (limited to 'views/partials/editeventmodal.handlebars')
-rw-r--r--views/partials/editeventmodal.handlebars17
1 files changed, 16 insertions, 1 deletions
diff --git a/views/partials/editeventmodal.handlebars b/views/partials/editeventmodal.handlebars
index ce3cdcd..2227473 100644
--- a/views/partials/editeventmodal.handlebars
+++ b/views/partials/editeventmodal.handlebars
@@ -62,6 +62,9 @@
<input type="file" name="imageUpload" id="image-upload" />
</div>
<small class="form-text">Recommended dimensions (w x h): 920px by 300px.</small>
+ {{#if eventData.image}}
+ <button type="button" class="btn btn-danger" id="deleteImage">Delete image</button>
+ {{/if}}
</div>
<div class="form-group">
<div class="mb-2">Options</div>
@@ -138,4 +141,16 @@
</div>
</div>
</div>
-</div> \ No newline at end of file
+</div>
+
+<script>
+$('#deleteImage').click(function() {
+ $.post('/deleteimage/{{eventData.id}}/{{eventData.editToken}}', function(response) {
+ if (response === "Success") {
+ location.reload();
+ } else {
+ alert(response);
+ }
+ });
+})
+</script> \ No newline at end of file