File tree 2 files changed +25
-1
lines changed
python_env/src/cc.engine/cc/engine/templates
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 7
7
< div class ="donate-box ">
8
8
< div class ="widget-inner ">
9
9
< div class ="gform_wrapper " id ="gform_wrapper_10 ">
10
- < form method ="post " enctype =" multipart/form-data " id ="gform_10 " action ="/donate ">
10
+ < form method ="get " id ="gform_10 " action ="/donate " class =" deed-donate-form ">
11
11
< div id ="field_10_1 " class ="gfield field_sublabel_below field_description_below ">
12
12
< label class ="gfield_label "> {% trans %}Contribute today to Creative Commons{% endtrans %}</ label >
13
13
< div class ="ginput_container ginput_container_radio ">
Original file line number Diff line number Diff line change @@ -199,6 +199,30 @@ <h2>
199
199
/* ]]> */
200
200
</ script >
201
201
< script type ='text/javascript ' src ='/wp-content/themes/twentysixteen/js/functions.js '> </ script >
202
+
203
+ < script type ="text/javascript ">
204
+ //<![CDATA[
205
+ var donateForms = $ ( '.deed-donate-form' ) ;
206
+
207
+ $ ( donateForms ) . each ( function ( ) {
208
+ var otherFields = $ ( 'input[value="gf_other_choice"]' ) ;
209
+
210
+ $ ( this ) . on ( 'submit' , function ( ) {
211
+ $ ( otherFields ) . each ( function ( ) {
212
+ var parent = $ ( this ) . closest ( 'li' ) ;
213
+ var radioField = $ ( this ) ;
214
+ var txtField = $ ( parent ) . children ( 'input[type="text"]' ) ;
215
+ var txtValue = txtField . val ( ) ;
216
+
217
+ if ( txtValue || radioField . is ( ':checked' ) ) {
218
+ radioField . val ( txtValue ) ;
219
+ }
220
+ } ) ;
221
+ } ) ;
222
+ } ) ;
223
+ //]]>
224
+ </ script >
225
+
202
226
< script type ="text/javascript ">
203
227
//<![CDATA[
204
228
$ ( document ) . ready ( function ( ) {
You can’t perform that action at this time.
0 commit comments