r66937 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66936‎ | r66937 | r66938 >
Date:23:01, 26 May 2010
Author:tomasz
Status:deferred
Tags:
Comment:
Adding grease monkey script written by steven ma
Modified paths:
  • /civicrm/utilities/scripts/contributions.user.js (added) (history)

Diff [purge]

Index: civicrm/utilities/scripts/contributions.user.js
@@ -0,0 +1,86 @@
 2+// ==UserScript==
 3+// @name contributions
 4+// @namespace https://civicrm.wikimedia.org/civicrm/contact/view/contribution*
 5+// @include https://civicrm.wikimedia.org/civicrm/contact/view/contribution*
 6+// ==/UserScript==
 7+
 8+
 9+
 10+
 11+
 12+// Contribution Type set as Cash
 13+// document.getElementById('contribution_type_id').selectedIndex = 1;
 14+
 15+
 16+// Total Amount set as 0.00
 17+// var z = document.getElementById('total_amount');
 18+// z.value = "0.00";
 19+
 20+
 21+// Source autofilled as "USD"
 22+// var s = document.getElementById('source');
 23+// s.value = "RFD";
 24+
 25+
 26+
 27+
 28+
 29+// Received month (selectedIndex = 1 for Jan, 2 for Feb, etc.)
 30+// document.getElementById('receive_date[M]').selectedIndex = 4;
 31+
 32+
 33+// Received day (selectedIndex = date)
 34+// document.getElementById('receive_date[d]').selectedIndex = 9;
 35+
 36+
 37+// Received year (value = "YYYY")
 38+// document.getElementById('receive_date[Y]').value = "2010";
 39+
 40+
 41+
 42+
 43+
 44+// Paid By (Credit Card = 1, Cash = 3, Check = 4, Gateway = 6)
 45+// document.getElementById('payment_instrument_id').selectedIndex = 4;
 46+// document.getElementById('checkNumber').style.display = '';
 47+
 48+
 49+// Appeal (Spontaneous = 1, White Mail = 3)
 50+// document.getElementById('custom_20_-1').selectedIndex = 3;
 51+
 52+
 53+// Letter Code (General = 1, Matching Gift = 6, DAF = 8, No Letter = 12)
 54+// document.getElementById('custom_22_-1').selectedIndex = 1;
 55+
 56+
 57+
 58+
 59+
 60+// To escape any code, just put two backslashes in front on the same line
 61+
 62+
 63+
 64+
 65+
 66+// SC Donor Name autofilled with text in quotes
 67+// var dn = document.getElementById('custom_33_-1'); dn.value = "Fidelity Charitable Gift Fund";
 68+
 69+
 70+// SC Gift Amount autofilled with text in quotes
 71+// var ga = document.getElementById('custom_36_-1'); ga.value = "500.00";
 72+
 73+
 74+// Notes autofilled with text in quotes
 75+// var n = document.getElementById('custom_37_-1'); n.value = "DAF";
 76+
 77+
 78+// SC Gift month
 79+// document.getElementById('custom_35_-1[M]').selectedIndex = 4;
 80+
 81+
 82+// SC Gift day
 83+// document.getElementById('custom_35_-1[d]').selectedIndex = 9;
 84+
 85+
 86+// SC Gift year
 87+// document.getElementById('custom_35_-1[Y]').value = "2010";

Status & tagging log