97 lines
3.4 KiB
Text
97 lines
3.4 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 -%>
|
|
<div class='modal wide' id='giftOptionFormModal'>
|
|
<!--= scope 'gift_options.current' -->
|
|
|
|
<header class='modal-header'>
|
|
<h4 class='modal-header-title'>
|
|
<!--= put gift_option_action --> Gift Option
|
|
</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>
|
|
<label>Gift name (max 40 characters)</label>
|
|
<input required type='text'
|
|
name='name'
|
|
parsley-maxlength='40'
|
|
parsley-trigger='change'
|
|
placeholder='eg. "A backpack full of school supplies"'>
|
|
<!--= set_value this.name -->
|
|
</fieldset>
|
|
|
|
<label>Amount</label>
|
|
<p>You can add a recurring and/or one-time amount to your gift options. If you leave one blank, the donor won't be presented with that option. If you fill out both, then the donor will be able to choose between the two.</p>
|
|
|
|
<div class='layout--two'>
|
|
<fieldset>
|
|
<label><small>One-time</small></label>
|
|
<div class='prepend--dollar'>
|
|
<input type='text' name='amount_one_time'>
|
|
<!--= set_value (cents_to_dollars this.amount_one_time) -->
|
|
</div>
|
|
</fieldset>
|
|
<fieldset>
|
|
<label><small>Recurring</small></label>
|
|
<div class='prepend--dollar'>
|
|
<input type='text' name='amount_recurring'>
|
|
<!--= set_value (cents_to_dollars this.amount_recurring) -->
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
|
|
<fieldset>
|
|
<label>Short description (140 characters max)</label>
|
|
<textarea name='description' parsley-maxlength='140' parsley-trigger='change'></textarea>
|
|
<!--= set_value this.description -->
|
|
</fieldset>
|
|
|
|
<hr>
|
|
|
|
<fieldset>
|
|
<label>Quantity limit (optional)</label>
|
|
<p>After the limit has been reached, contributors will not be able to select this gift option. Leave this blank to not set a limit.</p>
|
|
<input type='number' name='quantity' class='input--200' placeholder='Enter limit amount'>
|
|
<!--= set_value this.quantity -->
|
|
</fieldset>
|
|
|
|
<div class='group'>
|
|
|
|
<fieldset class='col-7 u-paddingRight--20'>
|
|
<label>Requires shipping (optional)</label>
|
|
<p>Check this box to make the address field required and to add the text 'Shipping address' above the address field. This option is useful for order fulfillment.</p>
|
|
<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'>
|
|
<label>Hide contributions (optional)</label>
|
|
<p>Check this box to hide the number of contributions made towards this gift option.</p>
|
|
<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') -->
|
|
<strong>Manage Gift Options</strong>
|
|
</a>
|
|
</footer>
|
|
|
|
</div>
|