diff options
Diffstat (limited to 'views')
-rwxr-xr-x | views/event.handlebars | 1 | ||||
-rw-r--r-- | views/partials/editeventmodal.handlebars | 17 |
2 files changed, 16 insertions, 2 deletions
diff --git a/views/event.handlebars b/views/event.handlebars index aaa006e..842239f 100755 --- a/views/event.handlebars +++ b/views/event.handlebars @@ -376,7 +376,6 @@ dateTimeSeparator: ', ' }); $("#timezone").val('{{eventData.timezone}}').trigger('change'); - console.log('{{eventData.timezone}}') {{/unless}} {{/if}} $(".commentTimestamp").html(function(){ 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 |