Skip to content
Snippets Groups Projects
Commit d60bad51 authored by degygii's avatar degygii
Browse files

ability to upload pictures at event creation

parent f10b5c13
No related branches found
No related tags found
No related merge requests found
......@@ -169,22 +169,22 @@
<div class="form-group">
<label for="img_infoscreen">Infoscreen Image</label>
<input type="file" id="img_infoscreen" name="myFile"/>
<img src="" id="actual_img_infoscreen">
<img class="event-image" visibility="invisble" src="" id="actual_img_infoscreen">
</div>
<div class="form-group">
<div class="form-group">
<label for="img_banner">Banner Image</label>
<input type="file" id="img_banner"/>
<img src="" id="actual_img_banner">
<img class="event-image" visibility="invisble" src="" id="actual_img_banner">
</div>
<div class="form-group">
<label for="img_poster">Poster Image</label>
<input type="file" id="img_poster"/>
<img src="" id="actual_img_poster">
<img class="event-image" visibility="invisble" src="" id="actual_img_poster">
</div>
<div class="form-group">
<label for="img_thumbnail">Thumbnail</label>
<input type="file" id="img_thumbnail"/>
<img src="" id="actual_img_thumbnail">
<img class="event-image" visibility="invisble" src="" id="actual_img_thumbnail">
</div>
......@@ -242,6 +242,11 @@
white-space: nowrap;
max-width: none;
}
.event-image {
margin-top: 10px;
width: 100%;
}
</style>
<script type="text/javascript">
......@@ -534,11 +539,13 @@
console.log(JSON.stringify(newEvent));
if(isNew) {
var response = amivcore.events.POST(form, function(ret) {
var response = amivcore.events.POST(newEvent, function(ret) {
if (!ret.hasOwnProperty('_status') || ret['_status'] != 'OK')
tools.log(JSON.stringify(ret.responseJSON['_issues']), 'e');
else {
events.uploadCallback();
console.log(ret);
curEventData = ret;
events.uploadCallback(form);
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment