2020-06-12 20:03:43 +00:00
|
|
|
<%- # 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 -%>
|
2018-03-25 17:30:42 +00:00
|
|
|
<div class='modal wide' id='giftOptionFormModal'>
|
|
|
|
<!--= scope 'gift_options.current' -->
|
|
|
|
|
|
|
|
<header class='modal-header'>
|
|
|
|
<h4 class='modal-header-title'>
|
2021-03-18 17:21:25 +00:00
|
|
|
<!--= put gift_option_action --> <%= t('campaign_gift_options.gift_option') %>
|
2018-03-25 17:30:42 +00:00
|
|
|
</h4>
|
|
|
|
<%= render 'common/modal_close' %>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
|
|
<section class='modal-body'>
|
|
|
|
|
|
|
|
<form parsley-validate>
|
|
|
|
<!--= on 'submit' (ajax_gift_options.save form_object) -->
|
|
|
|
|
|
|
|
<input type='hidden' name='id'> <!--= set_value this.id -->
|
|
|
|
|
|
|
|
<fieldset>
|
2021-03-18 17:21:25 +00:00
|
|
|
<label><%= I18n.t('campaign_gift_options.gift_name_and_character_limit') %></label>
|
|
|
|
<%= text_field_tag(
|
|
|
|
'name',
|
|
|
|
nil,
|
|
|
|
placeholder: t('gift_name_example'),
|
|
|
|
required:true,
|
|
|
|
'parsley-maxlength' => '40',
|
|
|
|
'parsley-trigger' => 'change')
|
|
|
|
%>
|
2018-03-25 17:30:42 +00:00
|
|
|
<!--= set_value this.name -->
|
|
|
|
</fieldset>
|
|
|
|
|
2021-03-18 17:21:25 +00:00
|
|
|
<label><%= t('campaign_gift_options.amount')%></label>
|
|
|
|
<p><%= t('campaign_gift_options.explanation_of_recurring_or_one_time_gift_options')%></p>
|
2018-03-25 17:30:42 +00:00
|
|
|
|
|
|
|
<div class='layout--two'>
|
|
|
|
<fieldset>
|
2021-03-18 17:21:25 +00:00
|
|
|
<label><small><%= t('campaign_gift_options.one_time')%></small></label>
|
2018-03-25 17:30:42 +00:00
|
|
|
<div class='prepend--dollar'>
|
|
|
|
<input type='text' name='amount_one_time'>
|
|
|
|
<!--= set_value (cents_to_dollars this.amount_one_time) -->
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
<fieldset>
|
2021-03-18 17:21:25 +00:00
|
|
|
<label><small><%= t('campaign_gift_options.recurring')%></small></label>
|
2018-03-25 17:30:42 +00:00
|
|
|
<div class='prepend--dollar'>
|
|
|
|
<input type='text' name='amount_recurring'>
|
|
|
|
<!--= set_value (cents_to_dollars this.amount_recurring) -->
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<fieldset>
|
2021-03-18 17:21:25 +00:00
|
|
|
<label><%= t('campaign_gift_options.short_description')%></label>
|
2018-03-25 17:30:42 +00:00
|
|
|
<textarea name='description' parsley-maxlength='140' parsley-trigger='change'></textarea>
|
|
|
|
<!--= set_value this.description -->
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<fieldset>
|
2021-03-18 17:21:25 +00:00
|
|
|
<label><%= t('campaign_gift_options.quantity_limit')%></label>
|
|
|
|
<p><%= t('campaign_gift_options.quantity_limit_description')%></p>
|
|
|
|
<%= number_field_tag(
|
|
|
|
'quantity',
|
|
|
|
nil,
|
|
|
|
placeholder: t('campaign_gift_options.quantity_limit_placeholder'),
|
|
|
|
class: 'input--200')
|
|
|
|
%>
|
2018-03-25 17:30:42 +00:00
|
|
|
<!--= set_value this.quantity -->
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<div class='group'>
|
|
|
|
|
|
|
|
<fieldset class='col-7 u-paddingRight--20'>
|
2021-03-18 17:21:25 +00:00
|
|
|
<label><%= t('campaign_gift_options.requires_shipping')%></label>
|
|
|
|
<p><%= t('campaign_gift_options.require_shipping_description') %></p>
|
2018-03-25 17:30:42 +00:00
|
|
|
<input id='gift-option-to-ship' type='checkbox' name='to_ship'>
|
|
|
|
<!--= set_attr_if this.to_ship 'checked' 'checked' -->
|
|
|
|
<label class='u-marginBottom--10' for='gift-option-to-ship'></label>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<fieldset class='col-right-5'>
|
2021-03-18 17:21:25 +00:00
|
|
|
<label><%= t('campaign_gift_options.hide_contributions') %></label>
|
|
|
|
<p><%= t('campaign_gift_options.hide_contributions_description') %></p>
|
2018-03-25 17:30:42 +00:00
|
|
|
<input id='gift-option-hide-contributions' type='checkbox' name='hide_contributions'>
|
|
|
|
<!--= set_attr_if this.hide_contributions 'checked' 'checked' -->
|
|
|
|
<label class='u-marginBottom--10' for='gift-option-hide-contributions'></label>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= render 'components/forms/submit_button' %>
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<footer class='modal-footer'>
|
|
|
|
<a>
|
|
|
|
<!--= on 'click' (open_modal 'manageGiftOptionsModal') -->
|
2021-03-18 17:21:25 +00:00
|
|
|
<strong><%= t('campaign_gift_options.manage_gift_options') %></strong>
|
2018-03-25 17:30:42 +00:00
|
|
|
</a>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
</div>
|