Changeset 3308828
- Timestamp:
- 06/10/2025 02:33:18 AM (9 months ago)
- Location:
- cryptopay-gateway-for-gravity-forms
- Files:
-
- 14 edited
- 1 copied
-
tags/1.0.3 (copied) (copied from cryptopay-gateway-for-gravity-forms/trunk)
-
tags/1.0.3/app/Gateways/AbstractGateway.php (modified) (4 diffs)
-
tags/1.0.3/app/Gateways/Gateway.php (modified) (1 diff)
-
tags/1.0.3/app/Gateways/GatewayLite.php (modified) (1 diff)
-
tags/1.0.3/app/Gateways/PaymentAddon.php (modified) (1 diff)
-
tags/1.0.3/assets/js/main.js (modified) (1 diff)
-
tags/1.0.3/cryptopay-gateway-for-gravity-forms.php (modified) (2 diffs)
-
tags/1.0.3/readme.txt (modified) (2 diffs)
-
trunk/app/Gateways/AbstractGateway.php (modified) (4 diffs)
-
trunk/app/Gateways/Gateway.php (modified) (1 diff)
-
trunk/app/Gateways/GatewayLite.php (modified) (1 diff)
-
trunk/app/Gateways/PaymentAddon.php (modified) (1 diff)
-
trunk/assets/js/main.js (modified) (1 diff)
-
trunk/cryptopay-gateway-for-gravity-forms.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cryptopay-gateway-for-gravity-forms/tags/1.0.3/app/Gateways/AbstractGateway.php
r3262505 r3308828 56 56 57 57 /** 58 * @param array<mixed> $properties 59 */ 60 public function __construct(array $properties = []) 61 { 62 parent::__construct($properties); 58 * @param mixed $properties 59 */ 60 public function __construct(mixed $properties = []) 61 { 62 if (is_array($properties)) { 63 parent::__construct($properties); 64 } 65 63 66 $this->field_input_id = 'input_' . $this->id; 64 67 … … 151 154 { 152 155 // phpcs:disable 153 wp_add_inline_script( 154 'crypto-pay-gateway-for-gravity-forms', 155 `;(function ($) { 156 $(document).ready(() => { 157 let currentFieldId = 0; 158 const fieldList = $("#gform_fields"); 159 const customSubmit = $(".custom-submit-placeholder"); 160 const customSubmitParent = customSubmit.closest('#field_submit'); 161 if (customSubmitParent) { 162 customSubmitParent.hide(); 163 } 164 165 const hideSubmit = () => { 166 currentFieldId = 0; 167 customSubmit.hide(); 168 customSubmitParent.hide(); 169 $('#field_submit').hide(); 170 } 171 172 const showSubmit = () => { 173 customSubmit.show(); 174 customSubmitParent.show(); 175 $('#field_submit').show(); 176 } 177 178 $(document).on('gform_field_added', function (event, form, field) { 179 if (field.type === '` . esc_js($this->type) . `') { 180 hideSubmit() 181 currentFieldId = parseInt(field.id); 156 add_action('admin_footer', function () { 157 ?> 158 <script type="text/javascript"> 159 ; 160 (function($) { 161 $(document).ready(() => { 162 let currentFieldId = 0; 163 const fieldList = $("#gform_fields"); 164 const customSubmit = $(".custom-submit-placeholder"); 165 const customSubmitParent = customSubmit.closest('#field_submit'); 166 if (customSubmitParent) { 167 customSubmitParent.hide(); 182 168 } 183 if (form.fields.some(field => field.type === 'total')) { 184 $('#field_' + currentFieldId + ' .ginput_container')?.html( 185 '` . esc_js($this->get_field_works_or_expect_msg()) . `' 186 ); 169 170 const hideSubmit = () => { 171 currentFieldId = 0; 172 customSubmit.hide(); 173 customSubmitParent.hide(); 174 $('#field_submit').hide(); 187 175 } 188 }); 189 $(document).on('gform_field_deleted', function (event, form, fieldId) { 190 if (parseInt(fieldId) === currentFieldId) { 191 showSubmit(); 176 177 const showSubmit = () => { 178 customSubmit.show(); 179 customSubmitParent.show(); 180 $('#field_submit').show(); 192 181 } 193 if (!form.fields.some(field => field.type === 'total')) { 194 $('#field_' + currentFieldId + ' .ginput_container')?.html( 195 '` . esc_js($this->get_field_works_or_expect_msg(false)) . `' 196 ); 197 } 198 if (!form.fields.some(field => field.type === '` . esc_js($this->type) . `')) { 199 showSubmit(); 200 } 201 }); 202 }) 203 })(jQuery);`, 204 'after' 205 ); 182 183 $(document).on('gform_field_added', function(event, form, field) { 184 if (field.type === '<?php esc_js($this->type) ?>') { 185 hideSubmit() 186 currentFieldId = parseInt(field.id); 187 } 188 if (form.fields.some(field => field.type === 'total')) { 189 $('#field_' + currentFieldId + ' .ginput_container')?.html( 190 '<?php esc_js($this->get_field_works_or_expect_msg()) ?>' 191 ); 192 } 193 }); 194 $(document).on('gform_field_deleted', function(event, form, fieldId) { 195 if (parseInt(fieldId) === currentFieldId) { 196 showSubmit(); 197 } 198 if (!form.fields.some(field => field.type === 'total')) { 199 $('#field_' + currentFieldId + ' .ginput_container')?.html( 200 '<?php esc_js($this->get_field_works_or_expect_msg(false)) ?>' 201 ); 202 } 203 if (!form.fields.some(field => field.type === '<?php esc_js($this->type) ?>')) { 204 showSubmit(); 205 } 206 }); 207 }) 208 })(jQuery); 209 </script> 210 <?php 211 }); 206 212 // phpcs:enable 207 213 } … … 216 222 ?> 217 223 case '<?php echo esc_js($this->type); ?>' : 218 if (!field.label) {219 field.label = '<?php /** @disregard */ echo esc_js($this->get_form_editor_field_title()); ?>';220 }224 if (!field.label) { 225 field.label = '<?php /** @disregard */ echo esc_js($this->get_form_editor_field_title()); ?>'; 226 } 221 227 break; 222 <?php228 <?php 223 229 // phpcs:enable 224 230 } … … 239 245 ob_start(); 240 246 ?> 241 <div class='ginput_container ginput_container_cp_info'>242 <?php echo esc_html($this->get_field_works_or_expect_msg($this->form_hash_total_field($form))); ?>243 </div>247 <div class='ginput_container ginput_container_cp_info'> 248 <?php echo esc_html($this->get_field_works_or_expect_msg($this->form_hash_total_field($form))); ?> 249 </div> 244 250 <?php 245 251 return ob_get_clean(); -
cryptopay-gateway-for-gravity-forms/tags/1.0.3/app/Gateways/Gateway.php
r3262505 r3308828 19 19 20 20 /** 21 * @param array<mixed>$properties21 * @param mixed $properties 22 22 */ 23 public function __construct( array$properties = [])23 public function __construct(mixed $properties = []) 24 24 { 25 25 parent::__construct($properties); -
cryptopay-gateway-for-gravity-forms/tags/1.0.3/app/Gateways/GatewayLite.php
r3262505 r3308828 19 19 20 20 /** 21 * @param array<mixed>$properties21 * @param mixed $properties 22 22 */ 23 public function __construct( array$properties = [])23 public function __construct(mixed $properties = []) 24 24 { 25 25 parent::__construct($properties); -
cryptopay-gateway-for-gravity-forms/tags/1.0.3/app/Gateways/PaymentAddon.php
r3262505 r3308828 130 130 public function pre_process_feeds($feeds, $entry, $form): array 131 131 { 132 if (!is_array($feeds)) { 133 return []; 134 } 132 135 $ourFeedIndex = array_search($this->_slug, array_column($feeds, 'addon_slug'), true); 133 136 $feeds[$ourFeedIndex]['meta']['version'] = Helpers::exists() ? 'cryptopay' : 'cryptopay_lite'; -
cryptopay-gateway-for-gravity-forms/tags/1.0.3/assets/js/main.js
r3262505 r3308828 23 23 value = $(this).val(); 24 24 } else if (elementType === 'textarea') { 25 value = $(this).text() ;25 value = $(this).text() || $(this).val(); 26 26 } else if (elementType === 'checkbox') { 27 27 value = $(this).is(':checked') ? 'checked' : ''; -
cryptopay-gateway-for-gravity-forms/tags/1.0.3/cryptopay-gateway-for-gravity-forms.php
r3298451 r3308828 12 12 /** 13 13 * Plugin Name: CryptoPay Gateway for Gravity Forms 14 * Version: 1.0. 214 * Version: 1.0.3 15 15 * Plugin URI: https://beycanpress.com/cryptopay/ 16 16 * Description: Adds Cryptocurrency payment gateway (CryptoPay) for Gravity Forms. … … 30 30 31 31 define('GF_CRYPTOPAY_FILE', __FILE__); 32 define('GF_CRYPTOPAY_VERSION', '1.0. 2');32 define('GF_CRYPTOPAY_VERSION', '1.0.3'); 33 33 define('GF_CRYPTOPAY_KEY', basename(__DIR__)); 34 34 define('GF_CRYPTOPAY_URL', plugin_dir_url(__FILE__)); -
cryptopay-gateway-for-gravity-forms/tags/1.0.3/readme.txt
r3298451 r3308828 5 5 Tested up to: 6.8 6 6 Requires PHP: 8.1 7 Stable Tag: 1.0. 28 Version: 1.0. 27 Stable Tag: 1.0.3 8 Version: 1.0.3 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 57 57 == Changelog == 58 58 59 = 1.0.3 = 60 * Fixed: removed shell_exec requirement 61 59 62 = 1.0.2 = 60 63 * Fixed: _load_textdomain_just_in_time early call -
cryptopay-gateway-for-gravity-forms/trunk/app/Gateways/AbstractGateway.php
r3262505 r3308828 56 56 57 57 /** 58 * @param array<mixed> $properties 59 */ 60 public function __construct(array $properties = []) 61 { 62 parent::__construct($properties); 58 * @param mixed $properties 59 */ 60 public function __construct(mixed $properties = []) 61 { 62 if (is_array($properties)) { 63 parent::__construct($properties); 64 } 65 63 66 $this->field_input_id = 'input_' . $this->id; 64 67 … … 151 154 { 152 155 // phpcs:disable 153 wp_add_inline_script( 154 'crypto-pay-gateway-for-gravity-forms', 155 `;(function ($) { 156 $(document).ready(() => { 157 let currentFieldId = 0; 158 const fieldList = $("#gform_fields"); 159 const customSubmit = $(".custom-submit-placeholder"); 160 const customSubmitParent = customSubmit.closest('#field_submit'); 161 if (customSubmitParent) { 162 customSubmitParent.hide(); 163 } 164 165 const hideSubmit = () => { 166 currentFieldId = 0; 167 customSubmit.hide(); 168 customSubmitParent.hide(); 169 $('#field_submit').hide(); 170 } 171 172 const showSubmit = () => { 173 customSubmit.show(); 174 customSubmitParent.show(); 175 $('#field_submit').show(); 176 } 177 178 $(document).on('gform_field_added', function (event, form, field) { 179 if (field.type === '` . esc_js($this->type) . `') { 180 hideSubmit() 181 currentFieldId = parseInt(field.id); 156 add_action('admin_footer', function () { 157 ?> 158 <script type="text/javascript"> 159 ; 160 (function($) { 161 $(document).ready(() => { 162 let currentFieldId = 0; 163 const fieldList = $("#gform_fields"); 164 const customSubmit = $(".custom-submit-placeholder"); 165 const customSubmitParent = customSubmit.closest('#field_submit'); 166 if (customSubmitParent) { 167 customSubmitParent.hide(); 182 168 } 183 if (form.fields.some(field => field.type === 'total')) { 184 $('#field_' + currentFieldId + ' .ginput_container')?.html( 185 '` . esc_js($this->get_field_works_or_expect_msg()) . `' 186 ); 169 170 const hideSubmit = () => { 171 currentFieldId = 0; 172 customSubmit.hide(); 173 customSubmitParent.hide(); 174 $('#field_submit').hide(); 187 175 } 188 }); 189 $(document).on('gform_field_deleted', function (event, form, fieldId) { 190 if (parseInt(fieldId) === currentFieldId) { 191 showSubmit(); 176 177 const showSubmit = () => { 178 customSubmit.show(); 179 customSubmitParent.show(); 180 $('#field_submit').show(); 192 181 } 193 if (!form.fields.some(field => field.type === 'total')) { 194 $('#field_' + currentFieldId + ' .ginput_container')?.html( 195 '` . esc_js($this->get_field_works_or_expect_msg(false)) . `' 196 ); 197 } 198 if (!form.fields.some(field => field.type === '` . esc_js($this->type) . `')) { 199 showSubmit(); 200 } 201 }); 202 }) 203 })(jQuery);`, 204 'after' 205 ); 182 183 $(document).on('gform_field_added', function(event, form, field) { 184 if (field.type === '<?php esc_js($this->type) ?>') { 185 hideSubmit() 186 currentFieldId = parseInt(field.id); 187 } 188 if (form.fields.some(field => field.type === 'total')) { 189 $('#field_' + currentFieldId + ' .ginput_container')?.html( 190 '<?php esc_js($this->get_field_works_or_expect_msg()) ?>' 191 ); 192 } 193 }); 194 $(document).on('gform_field_deleted', function(event, form, fieldId) { 195 if (parseInt(fieldId) === currentFieldId) { 196 showSubmit(); 197 } 198 if (!form.fields.some(field => field.type === 'total')) { 199 $('#field_' + currentFieldId + ' .ginput_container')?.html( 200 '<?php esc_js($this->get_field_works_or_expect_msg(false)) ?>' 201 ); 202 } 203 if (!form.fields.some(field => field.type === '<?php esc_js($this->type) ?>')) { 204 showSubmit(); 205 } 206 }); 207 }) 208 })(jQuery); 209 </script> 210 <?php 211 }); 206 212 // phpcs:enable 207 213 } … … 216 222 ?> 217 223 case '<?php echo esc_js($this->type); ?>' : 218 if (!field.label) {219 field.label = '<?php /** @disregard */ echo esc_js($this->get_form_editor_field_title()); ?>';220 }224 if (!field.label) { 225 field.label = '<?php /** @disregard */ echo esc_js($this->get_form_editor_field_title()); ?>'; 226 } 221 227 break; 222 <?php228 <?php 223 229 // phpcs:enable 224 230 } … … 239 245 ob_start(); 240 246 ?> 241 <div class='ginput_container ginput_container_cp_info'>242 <?php echo esc_html($this->get_field_works_or_expect_msg($this->form_hash_total_field($form))); ?>243 </div>247 <div class='ginput_container ginput_container_cp_info'> 248 <?php echo esc_html($this->get_field_works_or_expect_msg($this->form_hash_total_field($form))); ?> 249 </div> 244 250 <?php 245 251 return ob_get_clean(); -
cryptopay-gateway-for-gravity-forms/trunk/app/Gateways/Gateway.php
r3262505 r3308828 19 19 20 20 /** 21 * @param array<mixed>$properties21 * @param mixed $properties 22 22 */ 23 public function __construct( array$properties = [])23 public function __construct(mixed $properties = []) 24 24 { 25 25 parent::__construct($properties); -
cryptopay-gateway-for-gravity-forms/trunk/app/Gateways/GatewayLite.php
r3262505 r3308828 19 19 20 20 /** 21 * @param array<mixed>$properties21 * @param mixed $properties 22 22 */ 23 public function __construct( array$properties = [])23 public function __construct(mixed $properties = []) 24 24 { 25 25 parent::__construct($properties); -
cryptopay-gateway-for-gravity-forms/trunk/app/Gateways/PaymentAddon.php
r3262505 r3308828 130 130 public function pre_process_feeds($feeds, $entry, $form): array 131 131 { 132 if (!is_array($feeds)) { 133 return []; 134 } 132 135 $ourFeedIndex = array_search($this->_slug, array_column($feeds, 'addon_slug'), true); 133 136 $feeds[$ourFeedIndex]['meta']['version'] = Helpers::exists() ? 'cryptopay' : 'cryptopay_lite'; -
cryptopay-gateway-for-gravity-forms/trunk/assets/js/main.js
r3262505 r3308828 23 23 value = $(this).val(); 24 24 } else if (elementType === 'textarea') { 25 value = $(this).text() ;25 value = $(this).text() || $(this).val(); 26 26 } else if (elementType === 'checkbox') { 27 27 value = $(this).is(':checked') ? 'checked' : ''; -
cryptopay-gateway-for-gravity-forms/trunk/cryptopay-gateway-for-gravity-forms.php
r3298451 r3308828 12 12 /** 13 13 * Plugin Name: CryptoPay Gateway for Gravity Forms 14 * Version: 1.0. 214 * Version: 1.0.3 15 15 * Plugin URI: https://beycanpress.com/cryptopay/ 16 16 * Description: Adds Cryptocurrency payment gateway (CryptoPay) for Gravity Forms. … … 30 30 31 31 define('GF_CRYPTOPAY_FILE', __FILE__); 32 define('GF_CRYPTOPAY_VERSION', '1.0. 2');32 define('GF_CRYPTOPAY_VERSION', '1.0.3'); 33 33 define('GF_CRYPTOPAY_KEY', basename(__DIR__)); 34 34 define('GF_CRYPTOPAY_URL', plugin_dir_url(__FILE__)); -
cryptopay-gateway-for-gravity-forms/trunk/readme.txt
r3298451 r3308828 5 5 Tested up to: 6.8 6 6 Requires PHP: 8.1 7 Stable Tag: 1.0. 28 Version: 1.0. 27 Stable Tag: 1.0.3 8 Version: 1.0.3 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 57 57 == Changelog == 58 58 59 = 1.0.3 = 60 * Fixed: removed shell_exec requirement 61 59 62 = 1.0.2 = 60 63 * Fixed: _load_textdomain_just_in_time early call
Note: See TracChangeset
for help on using the changeset viewer.