Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions app/templates/components/forms/wizard/basic-details-step.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,30 @@
</div>

<div class="fields">
<div class="ten wide field">
<Widgets::Forms::ImageUpload
@imageUrl={{this.data.event.logoUrl}}
@label={{t "Logo"}}
@id="event_logo"
@icon="image"
@hint={{t "Select Logo"}}
@maxSizeInKb={{1000}} />
</div>
<div class="ten wide field">
<div class="fifteen wide field">
<Widgets::Forms::ImageUpload
@imageUrl={{this.data.event.originalImageUrl}}
@needsCropper={{true}}
@label={{t "Event Image"}}
@id="event_image"
@icon="camera"
@hint={{t "Select Event Image"}}
@hint={{t "Select Event Header Image"}}
@imageText={{t "Header Image"}}
@isHeaderImage={{true}}
@maxSizeInKb={{10000}}
@helpText={{t "We recommend using at least a 2160x1080px (2:1 ratio) image"}}
@requiresDivider={{true}} />
</div>
<div class="five wide field">
<Widgets::Forms::ImageUpload
@imageUrl={{this.data.event.logoUrl}}
@label={{t "Logo"}}
@id="event_logo"
@icon="image"
@hint={{t "Select Logo"}}
@imageText={{t "Logo"}}
@maxSizeInKb={{1000}} />
</div>
</div>

<div class="ui section divider"></div>
Expand Down
64 changes: 47 additions & 17 deletions app/templates/components/widgets/forms/image-upload.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,59 @@
{{#if (and this.requiresDivider this.device.isMobile)}}
<div class="ui hidden divider"></div>
{{/if}}
<div class="ui card">
{{#if this.uploadingImage}}
<div class="ui active dimmer">
<div class="ui text loader">{{t 'Image Uploading'}}</div>
{{#if this.isHeaderImage}}
<div class="ui centered card" style="width:100%;height: auto;overflow: hidden;">
{{#if this.uploadingImage}}
<div class="ui active dimmer">
<div class="ui text loader">{{t 'Image Uploading'}}</div>
</div>
{{/if}}
<div class="image" style="width:100%;height: 250px;overflow: hidden;">
<img src={{this.selectedImage}} alt="Selected image">
</div>
{{#if this.allowReCrop}}
<div class="ui bottom attached mini buttons">
<button type="button" class="ui teal button" {{action 'reCrop'}}>
<i class="crop icon"></i>
{{t 'Re-crop'}}
</button>
</div>
{{/if}}
<div class="ui bottom attached mini buttons">
<button type="button" class="ui red button" {{action 'removeSelection'}}>
<i class="trash icon"></i>
{{if this.needsConfirmation 'Delete' 'Confirm Delete'}}
</button>
</div>
{{/if}}
<div class="image">
<img src="{{this.selectedImage}}" alt="Selected image">
</div>
{{#if this.allowReCrop}}
{{else}}
<div class="ui centered card">
{{#if this.uploadingImage}}
<div class="ui active dimmer">
<div class="ui text loader">{{t 'Image Uploading'}}</div>
</div>
{{/if}}
<div class="image">
<img src={{this.selectedImage}} alt="Selected image">
</div>
{{#if this.allowReCrop}}
<div class="ui bottom attached mini buttons">
<button type="button" class="ui teal button" {{action 'reCrop'}}>
<i class="crop icon"></i>
{{t 'Re-crop'}}
</button>
</div>
{{/if}}
<div class="ui bottom attached mini buttons">
<button type="button" class="ui teal button" {{action 'reCrop'}}>
<i class="crop icon"></i>
{{t 'Re-crop'}}
<button type="button" class="ui red button" {{action 'removeSelection'}}>
<i class="trash icon"></i>
{{if this.needsConfirmation 'Delete' 'Confirm Delete'}}
</button>
</div>
{{/if}}
<div class="ui bottom attached mini buttons">
<button type="button" class="ui red button" {{action 'removeSelection'}}>
<i class="trash icon"></i>
{{if this.needsConfirmation 'Delete' 'Confirm Delete'}}
</button>
</div>
{{/if}}
<div class="ui center aligned text mb-8" style="margin-top:-5px">
<span>{{this.imageText}}</span>
</div>
{{else}}
<Input
Expand Down