This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="javascript"> | |
//Script to look for a specific value in a <select> (dropdown). If found | |
//then make it the default. | |
document.addEventListener(function() { | |
var e = document.querySelector('select[name="auswahl_spendenzweck"]'); | |
if (e != null) { | |
var option = e.querySelector('option[value="Da wo es am nötigsten ist"]'); | |
if (option != null) { | |
option.selected = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
document.addEventListener('DOMContentLoaded', function() { | |
if (window.location.href.indexOf('getLocal4.jsp') != -1) { | |
var a = Array.from(document.querySelectorAll('div[id^=officials]')) | |
a = a.filter(function(e) { | |
return /officials_S/.test(e.id) ? false : true; | |
}) | |
a.forEach(function(e) { | |
e.style.display = 'none'; | |
//Hide two trailing <br> tags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function() { | |
var shippingAndHandling = 10.00; | |
if (window.location.href.indexOf('/shop/checkOut.jsp') != -1) { | |
var s = $('input[name=sub]').val(); | |
s = parseFloat(s); | |
if (s < 50.00) { | |
var t = s + shippingAndHandling; | |
$('input[name=shipping]').val(shippingAndHandling.toFixed(2)); | |
$('input[name=amount]').val(t.toFixed(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN Default Receive_Email to unsubscribed. --> | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", function () { | |
// Remove hard-coded Receive_Email hidden inputs. That will leave the | |
// Receive_Email dropdown that the user can see. | |
var a = document.querySelectorAll('input[name=Receive_Email]'); | |
a.forEach(function(e) { | |
e.parentNode.removeChild(e); | |
}); | |
// Set the default value for the Receive Email dropdown. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- SalsaStaff 273659: BEGIN highlight for the address error in a targeted action. --> | |
<style type="text/css"> | |
#notEnoughData { | |
padding-bottom: 20px; | |
color: red; | |
} | |
</style> | |
<!-- SalsaStaff 273659: END highlight for the address error in a targeted action. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select cc.label, cc.type, cco.value | |
from custom_column cc | |
left outer join custom_column_option cco | |
on cco.custom_column_KEY = cc.custom_column_KEY | |
where cc.organization_KEY = 51035 | |
and cco.organization_KEY = 51035 | |
order by cc.label, cco.value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN redirect non-secure signup pages to secure URLs. --> | |
<script type="text/javascript"> | |
if (window.location.href.indexOf('signup?signup_page_KEY=') != -1) { | |
if (window.location.protocol == 'http:') { | |
window.location.protocol = 'https:'; | |
} | |
} | |
</script> | |
<!-- END redirect non-secure signup pages to secure URLs. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- SalsaStaff 267704: BEGIN script to modify titles on the email blast archive. --> | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", function() { | |
if (window.location.href.indexOf("blastContent.jsp") != -1) { | |
document.querySelector('#selectBlastSpan').innerHTML = "View a past newsletter: "; | |
document.querySelector('a[href$="email/public/rss"]:nth-child(2)').innerHTML = "Subscribe to the APFED Newsletter feed."; | |
} | |
}) | |
</script> | |
<!-- SalsaStaff 267704: END script to modify titles on the email blast archive. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN script to remove commas from the "other" amount field on a donation page. --> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var e = $('form[name="subform"]'); | |
if (e.length != 0) { | |
e.submit(function() { | |
var v = $('input[name="amountOther"]') | |
if (v.length != 0) { | |
v.val(v.val().replace(/,/g, '')); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- BEGIN script to remove commas from the "other" amount field on a donation page. ==> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var e = $('form[name="subform"]'); | |
if (e.length != 0) { | |
e.submit(function() { | |
var v = $('input[name="amountOther"]') | |
if (v.length != 0) { | |
v.val(v.val().replace(/,/g, '')); | |
} |