Skip to content

Instantly share code, notes, and snippets.

@salsalabs
salsalabs / 91172.html
Created June 20, 2014 20:08
Javascript for ticket #91172
<script type="text/javascript">
// SalsaStaff 91172 - set the designation code if this is the event checkout
// page for one of the seminar events.
//
$(document).ready(function() {
//
// Make a new line that is formatted exactly like this
//
// 'event_KEY': 'Designation_Code',
//
<script type="text/javascript">
// See https://salsasupport.zendesk.com/entries/45795544-Replace-total-signers-on-your-petition-page
$(document).ready(function() {
var t = $('.signerCount');
t.html(t.html().replace('total signers', 'WHATEVER YOU WANT'));
})
</script>
<script type="text/javascript">
// See https://salsasupport.zendesk.com/entries/45806214-Let-the-donor-choose-C3-or-C4-in-your-donation-page
$(document).ready(function() {
$('form *[name=merchant_account_KEY]').eq(0).remove();
})
</script>
<fieldset id="tax_code_fieldset">
<legend>How do you want your donation used?</legend>
<div class="formRow">
<input type="radio" name="merchant_account_KEY" id="c3_key" value="117" selected="selected">
<!-- See https://salsasupport.zendesk.com/entries/47317260-->
<fieldset id="form_of_payment_fields">
<legend>Form of Payment?</legend>
<div class="formRow">
<input type="radio"name="Form_Of_Payment" value="Cash" checked/>
<label for="cash">Cash</label>
</div>
<div class="formRow">
<input type="radio" selected="selected" name="Form_Of_Payment" value="Check"/>
<label for="cash">Check</label>
@salsalabs
salsalabs / optional_designation_code.html
Last active August 29, 2015 14:03
Add optional donation code to a donation page
<fieldset>
<legend>Designation Code</legend>
<p>This is an area where you can make a pitch. It can run on for as long as you want, or not exist at all.</p>
<div class="formRow">
<label for="designation_code">Organization</label>
<input type="text" id="designation_code" name="Designation_Code" val="">
</div>
</fieldset>
@salsalabs
salsalabs / required_designation_code.html
Created July 7, 2014 16:43
Add required designation code to a donation page
<fieldset>
<legend>Designation Code</legend>
<p>This is an area where you can make a pitch. It can run on for as long as you want, or not exist at all.</p>
<div class="formRow">
<label for="designation_code">Organization</label><span class='required'>*</span
<input type="text" id="designation_code" name="Designation_Code" val="">>
</div>
</fieldset>
<script type="text/javascript">
$(document).ready(function() {
@salsalabs
salsalabs / hidden_donation_tracking_code.html
Created July 10, 2014 19:56
Hidden Donation_Tracking_Code
<input type="hidden" name="Donation_Tracking_Code" value="tomayto">
@salsalabs
salsalabs / text_donation_tracking_code.html
Created July 10, 2014 19:59
Text Donation Tracking Code
<input type="text" name="Donation_Tracking_Code">
@salsalabs
salsalabs / select_donation_tracking_code.html
Created July 10, 2014 20:02
Select Donation Tracking Code
<div class="formRow">
<label for="tracking_code">How do you say "tomato"?</label>
<select id="tracking_code" name="Donation_Tracking_Code">
<option value="tomayto">Tomayto</option>
<option value="tomahto"> selected>Tomahto</option>
<option value="maters">'Maters</option>
</select>
</div>
@salsalabs
salsalabs / selectable_batch_code.html
Created July 14, 2014 21:08
Selectable batch code in a donation page
<div class="formRow">
<label for="tracking_code">Specify a batch doee</label>
<select id="tracking_code" name="Batch_Code">
<option value="1234567">General Operating Fund-Adminstration</option>
<option value="2345678"> selected>General Operating Fund-Operations</option>
<option value="666">Special Operating Fund</option>
</select>
</div>