1. sor: |
1. sor: |
| <html> | | <html> |
| <form id="wmh_paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin: 0 auto;"> | | <form id="wmh_paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin: 0 auto;"> |
− | <input type="hidden" name="cmd" value="_donations" /> | + | <input type="hidden" name="cmd" value="_donations" /> |
− | <input type="hidden" name="utm_source" value="" id="utm_source" /> | + | <input type="hidden" name="utm_source" value="" id="utm_source" /> |
− | <input type="hidden" name="utm_medium" value="" id="utm_medium"/> | + | <input type="hidden" name="utm_medium" value="" id="utm_medium"/> |
− | <input type="hidden" name="utm_campaign" value="" id="utm_campaign" /> | + | <input type="hidden" name="utm_campaign" value="" id="utm_campaign" /> |
− | <input type="hidden" name="referrer" value="" id="referrer"/> | + | <input type="hidden" name="referrer" value="" id="referrer"/> |
− | <input type="hidden" name="item_name" value="Támogatom a Wikipédiát!" /> | + | <input type="hidden" name="item_name" value="Támogatom a Wikipédiát!" /> |
− | <input type="hidden" name="business" value="info@wiki.media.hu"> | + | <input type="hidden" name="business" value="info@wiki.media.hu"> |
− | <input type="hidden" name="currency_code" value="HUF" /> | + | <input type="hidden" name="currency_code" value="HUF" /> |
− | <input type="hidden" name="cn" value="Megjegyzés" /> | + | <input type="hidden" name="cn" value="Megjegyzés" /> |
− | <input type="hidden" name="cbt" value="Vissza a Wikimédia Magyarország weboldalára" /> | + | <input type="hidden" name="cbt" value="Vissza a Wikimédia Magyarország weboldalára" /> |
− | <input type="hidden" name="return" value="http://wikimedia.hu/" /> | + | <input type="hidden" name="return" value="http://wikimedia.hu/" /> |
− | <div style="text-align: center; padding: 0 1em 0 1em;"><div style="display: inline-block; text-align: left;"> | + | <div style="text-align: center; padding: 0 1em 0 1em;"> |
− | <label><input type="radio" name="amount" value="10000.00" />10000 Ft</label> | + | <div style="display: inline-block; text-align: left;"> |
− | <label><input type="radio" name="amount" value="5000.00" />5000 Ft</label> | + | <label><input type="radio" name="amount" value="10000.00" />10000 Ft</label> |
− | <label><input type="radio" name="amount" value="2500.00" />2500 Ft</label><br /> | + | <label><input type="radio" name="amount" value="5000.00" />5000 Ft</label> |
− | <label><input type="radio" name="amount" value="0" id="wmh_obutton" />Más összeg</label> | + | <label><input type="radio" name="amount" value="2500.00" />2500 Ft</label><br /> |
− | <input size="6" name="customAmount" id="wmh_otext" /> Ft | + | <label><input type="radio" name="amount" value="0" id="wmh_obutton" />Más összeg</label> |
− | <input type="hidden" name="custom" value="Wikimedia.hu" id="custom" /> | + | <input size="6" name="customAmount" id="wmh_otext" /> Ft |
− | <br /> | + | <input type="hidden" name="custom" value="Wikimedia.hu" id="custom" /> |
− | <label><input type="checkbox" name="on1" value="email" checked="checked" /> Hozzájárulok, hogy a Wikimédia Magyarország értesítsen tevékenységéről.</label> | + | <br /> |
− | <input type="hidden" name="os1" value="Hozzájárulok, hogy az Egyesület értesítsen tevékenységéről." /> | + | <label><input type="checkbox" name="on1" value="email" checked="checked" /> Hozzájárulok, hogy a Wikimédia Magyarország értesítsen tevékenységéről.</label> |
| + | <input type="hidden" name="os1" value="Hozzájárulok, hogy az Egyesület értesítsen tevékenységéről." /> |
| | | |
− | <input type="submit" class="input-button2 button-red" value="Támogass minket!" style="display: block; margin: 0 auto;"></div></div> | + | <input type="submit" class="input-button2 button-red" value="Támogass minket!" style="display: block; margin: 0 auto;"> |
| + | </div> |
| + | </div> |
| </form> | | </form> |
| <script type="text/javascript"> | | <script type="text/javascript"> |
− | $.queryParam = function(key) { | + | $.queryParam = function(key) { |
− | /**/return $.map(window.location.search.substr(1).split(String.fromCharCode(38)), function(part) {
| + | return $.map(window.location.search.substr(1).split(String.fromCharCode(38)), function(part) { |
− | /**//**/var halves = part.split('=', 2);
| + | var halves = part.split('=', 2); |
− | /**//**/if (halves[0] === key) return halves[1];
| + | if (halves[0] === key) return halves[1]; |
− | /**/})[0];
| + | })[0]; |
− | }; | + | }; |
− | //
| + | |
− | $(function() { | + | $(function() { |
− | /**/var $sumField = $('#wmh_otext'),
| + | var $sumField = $('#wmh_otext'), |
− | /**//**/$customSumOption = $('#wmh_obutton'),
| + | $customSumOption = $('#wmh_obutton'), |
− | /**//**/$form = $('#wmh_paypal'),
| + | $form = $('#wmh_paypal'), |
− | /**//**/$customField = $('#custom');
| + | $customField = $('#custom'); |
− | /**/
| + | |
− | /**/$sumField.bind('change blur', function() {
| + | $sumField.bind('change blur', function() { |
− | /**//**/$customSumOption.val($sumField.val());
| + | $customSumOption.val($sumField.val()); |
− | /**/}).bind('focus', function() {
| + | }).bind('focus', function() { |
− | /**//**/$customSumOption.attr('checked', true);
| + | $customSumOption.attr('checked', true); |
− | /**/}).change();
| + | }).change(); |
− | /**/
| + | |
− | /**/$form.bind('submit', function(e) {
| + | $form.bind('submit', function(e) { |
− | /**//**/$customField.val($.queryParam('utm_source'));
| + | $customField.val($.queryParam('utm_source')); |
− | /**//**/!window.piwikTracker || piwikTracker.trackGoal(1, $('[name=amount]:checked').val());
| + | !window.piwikTracker || piwikTracker.trackGoal(1, $('[name=amount]:checked').val()); |
− | /**//**/if (!(!$customSumOption.is(':checked') || $customSumOption.val() >= 1500)) { // & is mangled by the parser
| + | if (!(!$customSumOption.is(':checked') || $customSumOption.val() >= 1500)) { // & is mangled by the parser |
− | /**//**//**/alert("A minimális összeg 1500Ft (ez alatt az adomány jelentős részét elvinné a PayPal járuléka).");
| + | alert("A minimális összeg 1500Ft (ez alatt az adomány jelentős részét elvinné a PayPal járuléka)."); |
− | /**//**//**/return false;
| + | return false; |
− | /**//**/}
| + | } |
− | /**/});
| + | }); |
− | }); | + | }); |
| </script> | | </script> |
| </html> | | </html> |