109 lines
4.1 KiB
Text
109 lines
4.1 KiB
Text
<%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
|
|
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%>
|
|
<!-- partial campaigns/new-modal -->
|
|
<!-- include 'campaigns/new/index' -->
|
|
|
|
<div class='modal' id='newCampaign'>
|
|
|
|
<%= render 'common/modal_header', title: t('campaigns.admin.new_campaign') %>
|
|
|
|
<div class='wizard-steps' style='display:none;'>
|
|
<!--= wizard.init 'new_campaign_wiz' -->
|
|
|
|
<%= render 'components/wizard/step_index', wizard_name: 'new_campaign_wiz' %>
|
|
|
|
<div class='modal-body' style='display: table;'>
|
|
|
|
<div class='wizard-step name-step'>
|
|
<!--= wizard.set_step 'new_campaign_wiz' 'Name' -->
|
|
|
|
<form parsley-validate>
|
|
<!--= on 'submit' (advance_campaign_name_step form_object) -->
|
|
<input type='hidden' name='campaign[profile_id]' value='<%= current_user.profile.id %>'>
|
|
|
|
<fieldset>
|
|
<label><%= t('campaigns.admin.campaign_name_label') %></label>
|
|
<input type='text' name='campaign[name]' required parsley-trigger='change'>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<label><%= t('campaigns.admin.short_tagline_label') %></label>
|
|
<input type='text' name='campaign[tagline]' required parsley-trigger='change'>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<label><%= t('campaigns.admin.short_description_label_html') %></label>
|
|
<textarea name='campaign[summary]' required parsley-maxlength='300' parsley-trigger='change'></textarea>
|
|
</fieldset>
|
|
|
|
<%= render 'components/forms/submit_button', button_text: 'Next', scope: 'new_campaign_wiz', branded: true %>
|
|
</form>
|
|
</div>
|
|
|
|
<div class='wizard-step amount-step'>
|
|
<!--= wizard.set_step 'new_campaign_wiz' 'Goals' -->
|
|
|
|
<form parsley-validate>
|
|
<!--= on 'submit' (def 'new_campaign' form_object) (wizard.advance 'new_campaign_wiz') -->
|
|
|
|
|
|
<div class='u-margin--auto'>
|
|
<fieldset class='group u-marginBottom--0'>
|
|
<label class='u-paddingTop--5'><%= t('campaigns.admin.goal_amount_label') %></label>
|
|
<div class='prepend--dollar'>
|
|
<input class='input--100 u-marginBottom--5' value='1000' type='number' name='campaign[goal_amount_dollars]' required min='1'>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<hr>
|
|
|
|
<fieldset class='group'>
|
|
<label class='u-paddingTop--5'><%= t('campaigns.admin.end_date_and_time_label') %></label>
|
|
<div pikaday-timepicker='MM/DD/YYYY hh:mm a'>
|
|
<input class='u-width--200 u-bold u-inlineBlock' type='text' name='campaign[end_datetime]' required parsley-trigger='change' placeholder='MM/DD/YYYY HH:MM'>
|
|
<a class='button edit u-inlineBlock'><%= t('ui.set') %></a>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<%= render 'components/forms/submit_button', button_text: t('ui.next'), scope: 'new_campaign_wiz', branded: true %>
|
|
</form>
|
|
</div>
|
|
|
|
<div class='wizard-step media-step'>
|
|
<!--= wizard.set_step 'new_campaign_wiz' 'Media' -->
|
|
|
|
<form parsley-validate>
|
|
<!--= on 'submit' create_campaign -->
|
|
|
|
<fieldset>
|
|
|
|
<p class='u-color--red'>
|
|
<!--= show_if (length image_upload.error) -->
|
|
<small><!--= put image_upload.error --></small>
|
|
</p>
|
|
|
|
<div class='col-left-8'>
|
|
<label><%= t('campaigns.admin.image_label_html') %></label>
|
|
<p><%= t('campaigns.admin.image_description') %></p>
|
|
</div>
|
|
<div class='image-upload u-margin--0 u-floatR' if-branded='border-color, light'>
|
|
<span><i class='fa fa-image'></i> <%= t('campaigns.admin.upload_label') %></span>
|
|
<input type='file' name='campaign[main_image]' parsley-trigger='change'>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<hr>
|
|
<label><%= t('campaigns.admin.video_label') %></label>
|
|
<p><%= t('campaigns.admin.video_label') %></p>
|
|
<%= text_field_tag 'campaign[video_url]', nil, class: 'u-marginBottom--10', placeholder: t('campaigns.admin.video_url_placeholder') %>
|
|
</fieldset>
|
|
|
|
<%= render 'components/forms/submit_button', button_text: t('campaigns.admin.preview_campaign!'), scope: 'new_campaign_wiz', branded: true %>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- end partial campaigns/new-modal -->
|