Changeset 3205510
- Timestamp:
- 12/10/2024 10:39:51 AM (15 months ago)
- Location:
- add-on-cf7-for-airtable
- Files:
-
- 12 edited
- 1 copied
-
tags/2.4.0 (copied) (copied from add-on-cf7-for-airtable/trunk)
-
tags/2.4.0/add-on-cf7-for-airtable.php (modified) (2 diffs)
-
tags/2.4.0/assets/js/admin.js (modified) (1 diff)
-
tags/2.4.0/assets/js/admin.min.js (modified) (1 diff)
-
tags/2.4.0/includes/contact-form-properties.php (modified) (4 diffs)
-
tags/2.4.0/languages/add-on-cf7-for-airtable.pot (modified) (4 diffs)
-
tags/2.4.0/readme.txt (modified) (5 diffs)
-
trunk/add-on-cf7-for-airtable.php (modified) (2 diffs)
-
trunk/assets/js/admin.js (modified) (1 diff)
-
trunk/assets/js/admin.min.js (modified) (1 diff)
-
trunk/includes/contact-form-properties.php (modified) (4 diffs)
-
trunk/languages/add-on-cf7-for-airtable.pot (modified) (4 diffs)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
add-on-cf7-for-airtable/tags/2.4.0/add-on-cf7-for-airtable.php
r3132783 r3205510 7 7 * Text Domain: add-on-cf7-for-airtable 8 8 * Domain Path: /languages/ 9 * Version: 2. 3.09 * Version: 2.4.0 10 10 * Requires at least: 5.7 11 11 * Requires PHP: 7.0 … … 21 21 * Define plugin constants 22 22 */ 23 define( 'WPCONNECT_WPCF7_AT_VERSION', '2. 3.0' );23 define( 'WPCONNECT_WPCF7_AT_VERSION', '2.4.0' ); 24 24 define( 'WPCONNECT_WPCF7_AT_URL', plugin_dir_url( __FILE__ ) ); 25 25 define( 'WPCONNECT_WPCF7_AT_DIR', plugin_dir_path( __FILE__ ) ); -
add-on-cf7-for-airtable/tags/2.4.0/assets/js/admin.js
r3087651 r3205510 94 94 var selectedTableId = $('#wpc-wpcf7-airtable-table-id-selected').val(); 95 95 96 if (selectedAppId !== "" && selectedTableId !== "" && selectedTableId !== "-1" ) {96 if (selectedAppId !== "" && selectedTableId !== "" && selectedTableId !== "-1" && (selectedAppId != MyScriptData.app_id_selected || selectedTableId != MyScriptData.table_selected)) { 97 97 $('.notice-error').show(); 98 98 } else { -
add-on-cf7-for-airtable/tags/2.4.0/assets/js/admin.min.js
r3087651 r3205510 1 jQuery(document).ready((function($){window.fetchAirtableTables=function(appId){var MyAjax={ajaxurl:MyScriptData.ajaxurl,nonce:MyScriptData.nonce};jQuery.ajax({url:MyAjax.ajaxurl,type:"POST",data:{action:"fetch_airtable_tables",app_id:appId,security:MyAjax.nonce},success:function(response){var tables;if(typeof response==="string"){tables=JSON.parse(response)}else{tables=response}var tableSelect=jQuery("#wpc-wpcf7-airtable-table-id-selected");tableSelect.children("option:not(:first)").remove();jQuery.each(tables,(function(index,value){tableSelect.append(jQuery("<option>",{value:index,text:value.name}))}));var prevSelectedTable=MyScriptData.table_selected;if(prevSelectedTable&&tableSelect.find('option[value="'+prevSelectedTable+'"]').length){tableSelect.val(prevSelectedTable)}else{tableSelect.val("-1")}}})};var lookUpField=$("#wpc-wpcf7-airtable-table-lookup");var showError=function(message){lookUpField.next(".error,.notice-success").remove();lookUpField.after($('<div class="error"></div>').text(message))};lookUpField.change((function(){var url=$(this).val();var base="https://airtable.com/";if(url.indexOf(base)!==0){showError(wp.i18n.__("Invalid Airtable URL","add-on-cf7-for-airtable"));return}url=url.replace(base,"");var urlParts=url.split("/");if(urlParts.length===0||urlParts.length<2){showError(wp.i18n.__("Invalid Airtable URL","add-on-cf7-for-airtable"));return}lookUpField.next(".error,.notice-success").remove();lookUpField.after($('<div class="notice notice-success"></div>').text(wp.i18n.__("Table found.","add-on-cf7-for-airtable")));$("#wpc-wpcf7-airtable-app-id-selected").val(urlParts[0]);$("#wpc-wpcf7-airtable-table-selected").val(urlParts[1])}));$("#wpc-wpcf7-airtable-enabled").change((function(){if($(this).prop("checked")){$("#wpc-wpcf7-airtable-setup-table, #wpc-wpcf7-airtable-fields-table").removeClass("is-disabled")}else{$("#wpc-wpcf7-airtable-setup-table, #wpc-wpcf7-airtable-fields-table").addClass("is-disabled")}})); $("#wpc-wpcf7-airtable-app-id-selected").each((function(){fetchAirtableTables($(this).val())}));function checkAndToggleErrorMessage(){if($("#wpc-wpcf7-airtable-app-id-selected, #wpc-wpcf7-airtable-table-id-selected").length){var selectedAppId=$("#wpc-wpcf7-airtable-app-id-selected").val();var selectedTableId=$("#wpc-wpcf7-airtable-table-id-selected").val();if(selectedAppId!==""&&selectedTableId!==""&&selectedTableId!=="-1"){$(".notice-error").show()}else{$(".notice-error").hide()}}}$("#wpc-wpcf7-airtable-app-id-selected, #wpc-wpcf7-airtable-table-id-selected").change(checkAndToggleErrorMessage);checkAndToggleErrorMessage();$(".airtable-field-select").change((function(){var selectedValue=$(this).val();updateSelectOptions(selectedValue)}));function updateSelectOptions(selectedValue){$(".airtable-field-select option").prop("disabled",false);$(".airtable-field-select").each((function(){var currentValue=$(this).val();if(currentValue){$(".airtable-field-select").not(this).find("option[value="+currentValue+"]").prop("disabled",true)}}))}updateSelectOptions()}));1 jQuery(document).ready((function($){window.fetchAirtableTables=function(appId){var MyAjax={ajaxurl:MyScriptData.ajaxurl,nonce:MyScriptData.nonce};jQuery.ajax({url:MyAjax.ajaxurl,type:"POST",data:{action:"fetch_airtable_tables",app_id:appId,security:MyAjax.nonce},success:function(response){var tables;if(typeof response==="string"){tables=JSON.parse(response)}else{tables=response}var tableSelect=jQuery("#wpc-wpcf7-airtable-table-id-selected");tableSelect.children("option:not(:first)").remove();jQuery.each(tables,(function(index,value){tableSelect.append(jQuery("<option>",{value:index,text:value.name}))}));var prevSelectedTable=MyScriptData.table_selected;if(prevSelectedTable&&tableSelect.find('option[value="'+prevSelectedTable+'"]').length){tableSelect.val(prevSelectedTable)}else{tableSelect.val("-1")}}})};var lookUpField=$("#wpc-wpcf7-airtable-table-lookup");var showError=function(message){lookUpField.next(".error,.notice-success").remove();lookUpField.after($('<div class="error"></div>').text(message))};lookUpField.change((function(){var url=$(this).val();var base="https://airtable.com/";if(url.indexOf(base)!==0){showError(wp.i18n.__("Invalid Airtable URL","add-on-cf7-for-airtable"));return}url=url.replace(base,"");var urlParts=url.split("/");if(urlParts.length===0||urlParts.length<2){showError(wp.i18n.__("Invalid Airtable URL","add-on-cf7-for-airtable"));return}lookUpField.next(".error,.notice-success").remove();lookUpField.after($('<div class="notice notice-success"></div>').text(wp.i18n.__("Table found.","add-on-cf7-for-airtable")));$("#wpc-wpcf7-airtable-app-id-selected").val(urlParts[0]);$("#wpc-wpcf7-airtable-table-selected").val(urlParts[1])}));$("#wpc-wpcf7-airtable-enabled").change((function(){if($(this).prop("checked")){$("#wpc-wpcf7-airtable-setup-table, #wpc-wpcf7-airtable-fields-table").removeClass("is-disabled")}else{$("#wpc-wpcf7-airtable-setup-table, #wpc-wpcf7-airtable-fields-table").addClass("is-disabled")}}));function checkAndToggleErrorMessage(){if($("#wpc-wpcf7-airtable-app-id-selected, #wpc-wpcf7-airtable-table-id-selected").length){var selectedAppId=$("#wpc-wpcf7-airtable-app-id-selected").val();var selectedTableId=$("#wpc-wpcf7-airtable-table-id-selected").val();if(selectedAppId!==""&&selectedTableId!==""&&selectedTableId!=="-1"&&(selectedAppId!=MyScriptData.app_id_selected||selectedTableId!=MyScriptData.table_selected)){$(".notice-error").show()}else{$(".notice-error").hide()}}}$("#wpc-wpcf7-airtable-app-id-selected, #wpc-wpcf7-airtable-table-id-selected").change(checkAndToggleErrorMessage);checkAndToggleErrorMessage();$(".airtable-field-select").change((function(){var selectedValue=$(this).val();updateSelectOptions(selectedValue)}));function updateSelectOptions(selectedValue){$(".airtable-field-select option").prop("disabled",false);$(".airtable-field-select").each((function(){var currentValue=$(this).val();if(currentValue){$(".airtable-field-select").not(this).find("option[value="+currentValue+"]").prop("disabled",true)}}))}updateSelectOptions()})); -
add-on-cf7-for-airtable/tags/2.4.0/includes/contact-form-properties.php
r3087651 r3205510 115 115 'nonce' => wp_create_nonce( 'my-ajax-nonce' ), 116 116 'table_selected' => esc_js( $table_selected ), 117 'app_id_selected' => esc_js( $app_id_selected ), 117 118 ); 118 119 … … 202 203 ?> 203 204 <select name="wpc-wpcf7-airtable[app_id_selected]" id="wpc-wpcf7-airtable-app-id-selected" onchange="fetchAirtableTables(this.value)"> 204 <option value=" " selected><?php echo esc_html__( 'Choose a base', 'add-on-cf7-for-airtable' ); ?></option>205 <option value="-1" <?= $app_id_selected == '-1' || empty($app_id_selected) ? 'selected' : '' ; ?>><?php echo esc_html__( 'Choose a base', 'add-on-cf7-for-airtable' ); ?></option> 205 206 <?php foreach ( $bases as $base_id => $base_name ) : ?> 206 <option value="<?php echo esc_attr( $base_id ); ?>" <?php selected( $base_id, $app_id_selected ); ?>> 207 <option value="<?php echo esc_attr( $base_id ); ?>" 208 <?php selected( $base_id, $app_id_selected ); ?>> 207 209 <?php echo esc_html( $base_name['name'] ); ?> 208 210 </option> … … 248 250 249 251 <td> 252 <?php $tables = Helpers\get_airtable_tables_token( $app_id_selected ); ?> 250 253 <select name="wpc-wpcf7-airtable[table_selected]" id="wpc-wpcf7-airtable-table-id-selected"> 251 <option value="-1" selected><?php echo esc_html__( 'Choose a table', 'add-on-cf7-for-airtable' ); ?></option> 254 <option value="-1" <?= $table_selected == '-1' || empty($app_id_selected) ? 'selected' : '' ; ?>><?php echo esc_html__( 'Choose a table', 'add-on-cf7-for-airtable' ); ?></option> 255 <?php foreach( $tables as $table_id => $table_name ): ?> 256 <option value="<?php echo esc_attr( $table_id ); ?>" 257 <?php selected( $table_id, $table_selected ); ?>> 258 <?php echo esc_html( $table_name['name'] ); ?> 259 </option> 260 <?php endforeach; ?> 252 261 </select> 253 262 </td> … … 422 431 <td> 423 432 <?php 433 424 434 if ( $has_available_mapping ) { 425 435 printf( '<select class="wpc-wpf-at-field-mapper-type" name="wpc-wpcf7-airtable[map_types][%s]">', esc_attr( $tag_name ) ); 436 $i = 0; 426 437 foreach ( $options as $option_value => $option_text ) { 427 printf( '<option value="%s" %s>%s</option>', esc_attr( $option_value ), ( $selected_column_type === $option_value ? 'selected="selected"' : '' ), esc_html( $option_text ) ); 438 printf( '<option value="%s" %s>%s</option>', esc_attr( $option_value ), (!empty($selected_column_type) ? ($selected_column_type === $option_value ? 'selected="selected"' : '') : (!$i ? 'selected="selected"' : '' )), esc_html( $option_text ) ); 439 ++$i; 428 440 } 429 441 printf( '</select>' ); -
add-on-cf7-for-airtable/tags/2.4.0/languages/add-on-cf7-for-airtable.pot
r3132783 r3205510 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: CF7 to Airtable 2. 3.0\n"5 "Project-Id-Version: CF7 to Airtable 2.4.0\n" 6 6 "Report-Msgid-Bugs-To: https://support.wpconnect.co/\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024- 08-08T07:26:39+00:00\n"12 "POT-Creation-Date: 2024-12-06T10:02:49+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 10.0\n"14 "X-Generator: WP-CLI 2.9.0\n" 15 15 "X-Domain: add-on-cf7-for-airtable\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: add-on-cf7-for-airtable.php19 18 msgid "CF7 to Airtable" 20 19 msgstr "" 21 20 22 21 #. Description of the plugin 23 #: add-on-cf7-for-airtable.php24 22 msgid "Send the entries of your Contact Form 7 forms to your Airtable databases." 25 23 msgstr "" 26 24 27 25 #. Author of the plugin 28 #: add-on-cf7-for-airtable.php29 26 msgid "WP connect" 30 27 msgstr "" 31 28 32 29 #. Author URI of the plugin 33 #: add-on-cf7-for-airtable.php34 30 msgid "https://wpconnect.co/" 35 31 msgstr "" … … 48 44 49 45 #: includes/classes/class-wpcf7-airtable-service.php:71 50 #: includes/contact-form-properties.php:13 251 #: includes/contact-form-properties.php:4 6746 #: includes/contact-form-properties.php:133 47 #: includes/contact-form-properties.php:479 52 48 msgid "Airtable" 53 49 msgstr "" … … 179 175 msgstr "" 180 176 181 #: includes/contact-form-properties.php:14 2177 #: includes/contact-form-properties.php:143 182 178 msgid "Add form submissions to your table" 183 179 msgstr "" 184 180 185 #: includes/contact-form-properties.php:15 7181 #: includes/contact-form-properties.php:158 186 182 msgid "Table lookup" 187 183 msgstr "" 188 184 189 #: includes/contact-form-properties.php:15 8185 #: includes/contact-form-properties.php:159 190 186 msgid "Paste full Airtable table URL, it will populate the Base ID and Table ID fields." 191 187 msgstr "" 192 188 193 #: includes/contact-form-properties.php:17 4189 #: includes/contact-form-properties.php:175 194 190 msgid "Base ID" 195 191 msgstr "" 196 192 197 #: includes/contact-form-properties.php:17 6193 #: includes/contact-form-properties.php:177 198 194 msgid "Use the Table lookup field above or visit the link below to find your Base ID" 199 195 msgstr "" 200 196 201 #: includes/contact-form-properties.php:19 2197 #: includes/contact-form-properties.php:193 202 198 msgid "Base name" 203 199 msgstr "" 204 200 205 #: includes/contact-form-properties.php:19 4201 #: includes/contact-form-properties.php:195 206 202 msgid "Select the target database from the options below" 207 203 msgstr "" 208 204 209 #: includes/contact-form-properties.php:20 4205 #: includes/contact-form-properties.php:205 210 206 msgid "Choose a base" 211 207 msgstr "" 212 208 213 #: includes/contact-form-properties.php:22 2209 #: includes/contact-form-properties.php:224 214 210 msgid "Table ID" 215 211 msgstr "" 216 212 217 #: includes/contact-form-properties.php:22 4213 #: includes/contact-form-properties.php:226 218 214 msgid "Use the Table lookup field above or visit the link below to find your Table ID" 219 215 msgstr "" 220 216 221 #: includes/contact-form-properties.php:24 1217 #: includes/contact-form-properties.php:243 222 218 msgid "Table name" 223 219 msgstr "" 224 220 225 #: includes/contact-form-properties.php:24 3221 #: includes/contact-form-properties.php:245 226 222 msgid "Select the target table from the options below." 227 223 msgstr "" 228 224 229 #: includes/contact-form-properties.php:25 1225 #: includes/contact-form-properties.php:254 230 226 msgid "Choose a table" 231 227 msgstr "" 232 228 233 #: includes/contact-form-properties.php:2 62229 #: includes/contact-form-properties.php:271 234 230 msgid "Please save your settings before mapping your fields." 235 231 msgstr "" 236 232 237 #: includes/contact-form-properties.php:2 87233 #: includes/contact-form-properties.php:296 238 234 msgid "Table fields" 239 235 msgstr "" 240 236 241 #: includes/contact-form-properties.php: 293237 #: includes/contact-form-properties.php:302 242 238 msgid "Enter an Airtable field name for each Contact Form 7 field to map them." 243 239 msgstr "" 244 240 245 #: includes/contact-form-properties.php: 297241 #: includes/contact-form-properties.php:306 246 242 msgid "Be careful, field names should be exactly the same (case sensitive) or the form won't be saved." 247 243 msgstr "" 248 244 249 #: includes/contact-form-properties.php:3 08245 #: includes/contact-form-properties.php:317 250 246 msgid "Starting from the 1.1.0 version, you can now specify the Airtable field type in the mapping below, please double check all types are fine." 251 247 msgstr "" 252 248 253 #: includes/contact-form-properties.php:32 0249 #: includes/contact-form-properties.php:329 254 250 msgid "Contact Form 7 field" 255 251 msgstr "" 256 252 257 #: includes/contact-form-properties.php:3 25253 #: includes/contact-form-properties.php:334 258 254 msgid "Airtable field name" 259 255 msgstr "" 260 256 261 #: includes/contact-form-properties.php:33 0257 #: includes/contact-form-properties.php:339 262 258 msgid "Airtable field type" 263 259 msgstr "" 264 260 265 261 #. translators: %s: tag name 266 #: includes/contact-form-properties.php:3 66262 #: includes/contact-form-properties.php:375 267 263 msgid "%s: mapped" 268 264 msgstr "" 269 265 270 #: includes/contact-form-properties.php:4 50266 #: includes/contact-form-properties.php:462 271 267 msgid "The Airtable's field name below is not mapped yet:" 272 268 msgid_plural "The Airtable's fields name below are not mapped yet:" -
add-on-cf7-for-airtable/tags/2.4.0/readme.txt
r3132783 r3205510 3 3 Author URI: https://wpconnect.co/ 4 4 Contributors: wpconnectco, staurand 5 Tags: wpconnect, airtable, contactform7, api, forms , nocode, no-code5 Tags: wpconnect, airtable, contactform7, api, forms 6 6 Requires at least: 5.7 7 Tested up to: 6. 57 Tested up to: 6.7 8 8 Requires PHP: 7.0 9 Stable tag: 2. 3.09 Stable tag: 2.4.0 10 10 License: GPLv2 or later 11 11 12 Connect Contact Form 7 to Airtable. Automatically sync form entries with Airtable, including custom fields, for seamless data management. 13 14 == Description == 15 12 16 Connect the WordPress plugin Contact Form 7 to Airtable. This reliable add-on enables you to integrate your Contact Form 7 forms so that when users submit a form entry, the entries get directly added to Airtable. You can link any field type, including custom fields and add information to your Airtable table. Once the form is validated, the information entered will be added to the columns you have selected. 13 14 17 15 18 == Features == … … 96 99 == Changelog == 97 100 101 = 2.4.0 = 102 * Compatibility with WordPress 6.7 103 * Fix: Form edit confirmation message appearing when the form has not been modified 104 98 105 = 2.3.0 = 99 * WordPress 6.6.1 compatibility106 * Compatibility with WordPress 6.6 100 107 * Fix: Fixed issues with field formatting. 101 108 * Feature : Added the ability to define hidden fields and custom form tags for Airtable 102 109 103 110 = 2.2.0 = 104 * WordPress 6.5.0 compatibility111 * Compatibility with WordPress 6.5 105 112 * Fix: JavaScript code that is executed on all pages 106 113 * Feature: Checks for CF7 form file field mapping and enhance server environment validation 107 114 108 115 = 2.1.0 = 109 * WordPress 6.4.0 compatibility116 * Compatibility with WordPress 6.4 110 117 * Feature: Sending an email to the administrator upon an API error 111 118 112 119 = 2.0.0 = 113 * WordPress 6.3.1 compatibility120 * Compatibility with WordPress 6.3.1 114 121 * Improvement: Use Airtable access tokens instead of API key 115 122 * Fix: Error when using the checkbox field type 116 123 117 124 = 1.1.2 = 118 * WordPress 6.2 compatibility125 * Compatibility with WordPress 6.2 119 126 120 127 = 1.1.1 = … … 122 129 123 130 = 1.1.0 = 124 * Feature: 125 * Selection of the Airtable field’s type 126 * New tags 127 * Improvement: 128 * Links in the interface 131 * Feature: Selection of the Airtable field’s type 132 * Feature: New tags 133 * Improvement: Links in the interface 129 134 130 135 = 1.0.2 = 131 136 * Feature: 132 *Activation switch133 *New tooltip (API key)134 *Setup page shortcut in plugin list135 *Admin notices136 *WP connect branding137 - Activation switch 138 - New tooltip (API key) 139 - Setup page shortcut in plugin list 140 - Admin notices 141 - WP connect branding 137 142 * Improvement: 138 *Help links139 *Tooltips style140 *Warning messages color141 *Plugin name143 - Help links 144 - Tooltips style 145 - Warning messages color 146 - Plugin name 142 147 143 148 = 1.0.1 = 144 * Feature: compatibility with new v5.6 of Contact Form 7149 * Feature: Compatibility with new v5.6 of Contact Form 7 145 150 * Improvement: Airtable integration help link 146 151 147 = 1.0 =152 = 1.0.0 = 148 153 * Initial release 149 154 … … 151 156 152 157 == Support == 158 153 159 If you need support, open a ticket on the [Support](https://wordpress.org/support/plugin/add-on-cf7-for-airtable/). 154 160 … … 157 163 Make sure you have created your database and columns in Airtable before linking them to your form fields. 158 164 **Supported Fields : Single line text, Email, URL, Phone number, Number, Date, Multiple select, Checkbox et Attachment** 165 -
add-on-cf7-for-airtable/trunk/add-on-cf7-for-airtable.php
r3132783 r3205510 7 7 * Text Domain: add-on-cf7-for-airtable 8 8 * Domain Path: /languages/ 9 * Version: 2. 3.09 * Version: 2.4.0 10 10 * Requires at least: 5.7 11 11 * Requires PHP: 7.0 … … 21 21 * Define plugin constants 22 22 */ 23 define( 'WPCONNECT_WPCF7_AT_VERSION', '2. 3.0' );23 define( 'WPCONNECT_WPCF7_AT_VERSION', '2.4.0' ); 24 24 define( 'WPCONNECT_WPCF7_AT_URL', plugin_dir_url( __FILE__ ) ); 25 25 define( 'WPCONNECT_WPCF7_AT_DIR', plugin_dir_path( __FILE__ ) ); -
add-on-cf7-for-airtable/trunk/assets/js/admin.js
r3087651 r3205510 94 94 var selectedTableId = $('#wpc-wpcf7-airtable-table-id-selected').val(); 95 95 96 if (selectedAppId !== "" && selectedTableId !== "" && selectedTableId !== "-1" ) {96 if (selectedAppId !== "" && selectedTableId !== "" && selectedTableId !== "-1" && (selectedAppId != MyScriptData.app_id_selected || selectedTableId != MyScriptData.table_selected)) { 97 97 $('.notice-error').show(); 98 98 } else { -
add-on-cf7-for-airtable/trunk/assets/js/admin.min.js
r3087651 r3205510 1 jQuery(document).ready((function($){window.fetchAirtableTables=function(appId){var MyAjax={ajaxurl:MyScriptData.ajaxurl,nonce:MyScriptData.nonce};jQuery.ajax({url:MyAjax.ajaxurl,type:"POST",data:{action:"fetch_airtable_tables",app_id:appId,security:MyAjax.nonce},success:function(response){var tables;if(typeof response==="string"){tables=JSON.parse(response)}else{tables=response}var tableSelect=jQuery("#wpc-wpcf7-airtable-table-id-selected");tableSelect.children("option:not(:first)").remove();jQuery.each(tables,(function(index,value){tableSelect.append(jQuery("<option>",{value:index,text:value.name}))}));var prevSelectedTable=MyScriptData.table_selected;if(prevSelectedTable&&tableSelect.find('option[value="'+prevSelectedTable+'"]').length){tableSelect.val(prevSelectedTable)}else{tableSelect.val("-1")}}})};var lookUpField=$("#wpc-wpcf7-airtable-table-lookup");var showError=function(message){lookUpField.next(".error,.notice-success").remove();lookUpField.after($('<div class="error"></div>').text(message))};lookUpField.change((function(){var url=$(this).val();var base="https://airtable.com/";if(url.indexOf(base)!==0){showError(wp.i18n.__("Invalid Airtable URL","add-on-cf7-for-airtable"));return}url=url.replace(base,"");var urlParts=url.split("/");if(urlParts.length===0||urlParts.length<2){showError(wp.i18n.__("Invalid Airtable URL","add-on-cf7-for-airtable"));return}lookUpField.next(".error,.notice-success").remove();lookUpField.after($('<div class="notice notice-success"></div>').text(wp.i18n.__("Table found.","add-on-cf7-for-airtable")));$("#wpc-wpcf7-airtable-app-id-selected").val(urlParts[0]);$("#wpc-wpcf7-airtable-table-selected").val(urlParts[1])}));$("#wpc-wpcf7-airtable-enabled").change((function(){if($(this).prop("checked")){$("#wpc-wpcf7-airtable-setup-table, #wpc-wpcf7-airtable-fields-table").removeClass("is-disabled")}else{$("#wpc-wpcf7-airtable-setup-table, #wpc-wpcf7-airtable-fields-table").addClass("is-disabled")}})); $("#wpc-wpcf7-airtable-app-id-selected").each((function(){fetchAirtableTables($(this).val())}));function checkAndToggleErrorMessage(){if($("#wpc-wpcf7-airtable-app-id-selected, #wpc-wpcf7-airtable-table-id-selected").length){var selectedAppId=$("#wpc-wpcf7-airtable-app-id-selected").val();var selectedTableId=$("#wpc-wpcf7-airtable-table-id-selected").val();if(selectedAppId!==""&&selectedTableId!==""&&selectedTableId!=="-1"){$(".notice-error").show()}else{$(".notice-error").hide()}}}$("#wpc-wpcf7-airtable-app-id-selected, #wpc-wpcf7-airtable-table-id-selected").change(checkAndToggleErrorMessage);checkAndToggleErrorMessage();$(".airtable-field-select").change((function(){var selectedValue=$(this).val();updateSelectOptions(selectedValue)}));function updateSelectOptions(selectedValue){$(".airtable-field-select option").prop("disabled",false);$(".airtable-field-select").each((function(){var currentValue=$(this).val();if(currentValue){$(".airtable-field-select").not(this).find("option[value="+currentValue+"]").prop("disabled",true)}}))}updateSelectOptions()}));1 jQuery(document).ready((function($){window.fetchAirtableTables=function(appId){var MyAjax={ajaxurl:MyScriptData.ajaxurl,nonce:MyScriptData.nonce};jQuery.ajax({url:MyAjax.ajaxurl,type:"POST",data:{action:"fetch_airtable_tables",app_id:appId,security:MyAjax.nonce},success:function(response){var tables;if(typeof response==="string"){tables=JSON.parse(response)}else{tables=response}var tableSelect=jQuery("#wpc-wpcf7-airtable-table-id-selected");tableSelect.children("option:not(:first)").remove();jQuery.each(tables,(function(index,value){tableSelect.append(jQuery("<option>",{value:index,text:value.name}))}));var prevSelectedTable=MyScriptData.table_selected;if(prevSelectedTable&&tableSelect.find('option[value="'+prevSelectedTable+'"]').length){tableSelect.val(prevSelectedTable)}else{tableSelect.val("-1")}}})};var lookUpField=$("#wpc-wpcf7-airtable-table-lookup");var showError=function(message){lookUpField.next(".error,.notice-success").remove();lookUpField.after($('<div class="error"></div>').text(message))};lookUpField.change((function(){var url=$(this).val();var base="https://airtable.com/";if(url.indexOf(base)!==0){showError(wp.i18n.__("Invalid Airtable URL","add-on-cf7-for-airtable"));return}url=url.replace(base,"");var urlParts=url.split("/");if(urlParts.length===0||urlParts.length<2){showError(wp.i18n.__("Invalid Airtable URL","add-on-cf7-for-airtable"));return}lookUpField.next(".error,.notice-success").remove();lookUpField.after($('<div class="notice notice-success"></div>').text(wp.i18n.__("Table found.","add-on-cf7-for-airtable")));$("#wpc-wpcf7-airtable-app-id-selected").val(urlParts[0]);$("#wpc-wpcf7-airtable-table-selected").val(urlParts[1])}));$("#wpc-wpcf7-airtable-enabled").change((function(){if($(this).prop("checked")){$("#wpc-wpcf7-airtable-setup-table, #wpc-wpcf7-airtable-fields-table").removeClass("is-disabled")}else{$("#wpc-wpcf7-airtable-setup-table, #wpc-wpcf7-airtable-fields-table").addClass("is-disabled")}}));function checkAndToggleErrorMessage(){if($("#wpc-wpcf7-airtable-app-id-selected, #wpc-wpcf7-airtable-table-id-selected").length){var selectedAppId=$("#wpc-wpcf7-airtable-app-id-selected").val();var selectedTableId=$("#wpc-wpcf7-airtable-table-id-selected").val();if(selectedAppId!==""&&selectedTableId!==""&&selectedTableId!=="-1"&&(selectedAppId!=MyScriptData.app_id_selected||selectedTableId!=MyScriptData.table_selected)){$(".notice-error").show()}else{$(".notice-error").hide()}}}$("#wpc-wpcf7-airtable-app-id-selected, #wpc-wpcf7-airtable-table-id-selected").change(checkAndToggleErrorMessage);checkAndToggleErrorMessage();$(".airtable-field-select").change((function(){var selectedValue=$(this).val();updateSelectOptions(selectedValue)}));function updateSelectOptions(selectedValue){$(".airtable-field-select option").prop("disabled",false);$(".airtable-field-select").each((function(){var currentValue=$(this).val();if(currentValue){$(".airtable-field-select").not(this).find("option[value="+currentValue+"]").prop("disabled",true)}}))}updateSelectOptions()})); -
add-on-cf7-for-airtable/trunk/includes/contact-form-properties.php
r3087651 r3205510 115 115 'nonce' => wp_create_nonce( 'my-ajax-nonce' ), 116 116 'table_selected' => esc_js( $table_selected ), 117 'app_id_selected' => esc_js( $app_id_selected ), 117 118 ); 118 119 … … 202 203 ?> 203 204 <select name="wpc-wpcf7-airtable[app_id_selected]" id="wpc-wpcf7-airtable-app-id-selected" onchange="fetchAirtableTables(this.value)"> 204 <option value=" " selected><?php echo esc_html__( 'Choose a base', 'add-on-cf7-for-airtable' ); ?></option>205 <option value="-1" <?= $app_id_selected == '-1' || empty($app_id_selected) ? 'selected' : '' ; ?>><?php echo esc_html__( 'Choose a base', 'add-on-cf7-for-airtable' ); ?></option> 205 206 <?php foreach ( $bases as $base_id => $base_name ) : ?> 206 <option value="<?php echo esc_attr( $base_id ); ?>" <?php selected( $base_id, $app_id_selected ); ?>> 207 <option value="<?php echo esc_attr( $base_id ); ?>" 208 <?php selected( $base_id, $app_id_selected ); ?>> 207 209 <?php echo esc_html( $base_name['name'] ); ?> 208 210 </option> … … 248 250 249 251 <td> 252 <?php $tables = Helpers\get_airtable_tables_token( $app_id_selected ); ?> 250 253 <select name="wpc-wpcf7-airtable[table_selected]" id="wpc-wpcf7-airtable-table-id-selected"> 251 <option value="-1" selected><?php echo esc_html__( 'Choose a table', 'add-on-cf7-for-airtable' ); ?></option> 254 <option value="-1" <?= $table_selected == '-1' || empty($app_id_selected) ? 'selected' : '' ; ?>><?php echo esc_html__( 'Choose a table', 'add-on-cf7-for-airtable' ); ?></option> 255 <?php foreach( $tables as $table_id => $table_name ): ?> 256 <option value="<?php echo esc_attr( $table_id ); ?>" 257 <?php selected( $table_id, $table_selected ); ?>> 258 <?php echo esc_html( $table_name['name'] ); ?> 259 </option> 260 <?php endforeach; ?> 252 261 </select> 253 262 </td> … … 422 431 <td> 423 432 <?php 433 424 434 if ( $has_available_mapping ) { 425 435 printf( '<select class="wpc-wpf-at-field-mapper-type" name="wpc-wpcf7-airtable[map_types][%s]">', esc_attr( $tag_name ) ); 436 $i = 0; 426 437 foreach ( $options as $option_value => $option_text ) { 427 printf( '<option value="%s" %s>%s</option>', esc_attr( $option_value ), ( $selected_column_type === $option_value ? 'selected="selected"' : '' ), esc_html( $option_text ) ); 438 printf( '<option value="%s" %s>%s</option>', esc_attr( $option_value ), (!empty($selected_column_type) ? ($selected_column_type === $option_value ? 'selected="selected"' : '') : (!$i ? 'selected="selected"' : '' )), esc_html( $option_text ) ); 439 ++$i; 428 440 } 429 441 printf( '</select>' ); -
add-on-cf7-for-airtable/trunk/languages/add-on-cf7-for-airtable.pot
r3132783 r3205510 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: CF7 to Airtable 2. 3.0\n"5 "Project-Id-Version: CF7 to Airtable 2.4.0\n" 6 6 "Report-Msgid-Bugs-To: https://support.wpconnect.co/\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024- 08-08T07:26:39+00:00\n"12 "POT-Creation-Date: 2024-12-06T10:02:49+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 10.0\n"14 "X-Generator: WP-CLI 2.9.0\n" 15 15 "X-Domain: add-on-cf7-for-airtable\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: add-on-cf7-for-airtable.php19 18 msgid "CF7 to Airtable" 20 19 msgstr "" 21 20 22 21 #. Description of the plugin 23 #: add-on-cf7-for-airtable.php24 22 msgid "Send the entries of your Contact Form 7 forms to your Airtable databases." 25 23 msgstr "" 26 24 27 25 #. Author of the plugin 28 #: add-on-cf7-for-airtable.php29 26 msgid "WP connect" 30 27 msgstr "" 31 28 32 29 #. Author URI of the plugin 33 #: add-on-cf7-for-airtable.php34 30 msgid "https://wpconnect.co/" 35 31 msgstr "" … … 48 44 49 45 #: includes/classes/class-wpcf7-airtable-service.php:71 50 #: includes/contact-form-properties.php:13 251 #: includes/contact-form-properties.php:4 6746 #: includes/contact-form-properties.php:133 47 #: includes/contact-form-properties.php:479 52 48 msgid "Airtable" 53 49 msgstr "" … … 179 175 msgstr "" 180 176 181 #: includes/contact-form-properties.php:14 2177 #: includes/contact-form-properties.php:143 182 178 msgid "Add form submissions to your table" 183 179 msgstr "" 184 180 185 #: includes/contact-form-properties.php:15 7181 #: includes/contact-form-properties.php:158 186 182 msgid "Table lookup" 187 183 msgstr "" 188 184 189 #: includes/contact-form-properties.php:15 8185 #: includes/contact-form-properties.php:159 190 186 msgid "Paste full Airtable table URL, it will populate the Base ID and Table ID fields." 191 187 msgstr "" 192 188 193 #: includes/contact-form-properties.php:17 4189 #: includes/contact-form-properties.php:175 194 190 msgid "Base ID" 195 191 msgstr "" 196 192 197 #: includes/contact-form-properties.php:17 6193 #: includes/contact-form-properties.php:177 198 194 msgid "Use the Table lookup field above or visit the link below to find your Base ID" 199 195 msgstr "" 200 196 201 #: includes/contact-form-properties.php:19 2197 #: includes/contact-form-properties.php:193 202 198 msgid "Base name" 203 199 msgstr "" 204 200 205 #: includes/contact-form-properties.php:19 4201 #: includes/contact-form-properties.php:195 206 202 msgid "Select the target database from the options below" 207 203 msgstr "" 208 204 209 #: includes/contact-form-properties.php:20 4205 #: includes/contact-form-properties.php:205 210 206 msgid "Choose a base" 211 207 msgstr "" 212 208 213 #: includes/contact-form-properties.php:22 2209 #: includes/contact-form-properties.php:224 214 210 msgid "Table ID" 215 211 msgstr "" 216 212 217 #: includes/contact-form-properties.php:22 4213 #: includes/contact-form-properties.php:226 218 214 msgid "Use the Table lookup field above or visit the link below to find your Table ID" 219 215 msgstr "" 220 216 221 #: includes/contact-form-properties.php:24 1217 #: includes/contact-form-properties.php:243 222 218 msgid "Table name" 223 219 msgstr "" 224 220 225 #: includes/contact-form-properties.php:24 3221 #: includes/contact-form-properties.php:245 226 222 msgid "Select the target table from the options below." 227 223 msgstr "" 228 224 229 #: includes/contact-form-properties.php:25 1225 #: includes/contact-form-properties.php:254 230 226 msgid "Choose a table" 231 227 msgstr "" 232 228 233 #: includes/contact-form-properties.php:2 62229 #: includes/contact-form-properties.php:271 234 230 msgid "Please save your settings before mapping your fields." 235 231 msgstr "" 236 232 237 #: includes/contact-form-properties.php:2 87233 #: includes/contact-form-properties.php:296 238 234 msgid "Table fields" 239 235 msgstr "" 240 236 241 #: includes/contact-form-properties.php: 293237 #: includes/contact-form-properties.php:302 242 238 msgid "Enter an Airtable field name for each Contact Form 7 field to map them." 243 239 msgstr "" 244 240 245 #: includes/contact-form-properties.php: 297241 #: includes/contact-form-properties.php:306 246 242 msgid "Be careful, field names should be exactly the same (case sensitive) or the form won't be saved." 247 243 msgstr "" 248 244 249 #: includes/contact-form-properties.php:3 08245 #: includes/contact-form-properties.php:317 250 246 msgid "Starting from the 1.1.0 version, you can now specify the Airtable field type in the mapping below, please double check all types are fine." 251 247 msgstr "" 252 248 253 #: includes/contact-form-properties.php:32 0249 #: includes/contact-form-properties.php:329 254 250 msgid "Contact Form 7 field" 255 251 msgstr "" 256 252 257 #: includes/contact-form-properties.php:3 25253 #: includes/contact-form-properties.php:334 258 254 msgid "Airtable field name" 259 255 msgstr "" 260 256 261 #: includes/contact-form-properties.php:33 0257 #: includes/contact-form-properties.php:339 262 258 msgid "Airtable field type" 263 259 msgstr "" 264 260 265 261 #. translators: %s: tag name 266 #: includes/contact-form-properties.php:3 66262 #: includes/contact-form-properties.php:375 267 263 msgid "%s: mapped" 268 264 msgstr "" 269 265 270 #: includes/contact-form-properties.php:4 50266 #: includes/contact-form-properties.php:462 271 267 msgid "The Airtable's field name below is not mapped yet:" 272 268 msgid_plural "The Airtable's fields name below are not mapped yet:" -
add-on-cf7-for-airtable/trunk/readme.txt
r3132783 r3205510 3 3 Author URI: https://wpconnect.co/ 4 4 Contributors: wpconnectco, staurand 5 Tags: wpconnect, airtable, contactform7, api, forms , nocode, no-code5 Tags: wpconnect, airtable, contactform7, api, forms 6 6 Requires at least: 5.7 7 Tested up to: 6. 57 Tested up to: 6.7 8 8 Requires PHP: 7.0 9 Stable tag: 2. 3.09 Stable tag: 2.4.0 10 10 License: GPLv2 or later 11 11 12 Connect Contact Form 7 to Airtable. Automatically sync form entries with Airtable, including custom fields, for seamless data management. 13 14 == Description == 15 12 16 Connect the WordPress plugin Contact Form 7 to Airtable. This reliable add-on enables you to integrate your Contact Form 7 forms so that when users submit a form entry, the entries get directly added to Airtable. You can link any field type, including custom fields and add information to your Airtable table. Once the form is validated, the information entered will be added to the columns you have selected. 13 14 17 15 18 == Features == … … 96 99 == Changelog == 97 100 101 = 2.4.0 = 102 * Compatibility with WordPress 6.7 103 * Fix: Form edit confirmation message appearing when the form has not been modified 104 98 105 = 2.3.0 = 99 * WordPress 6.6.1 compatibility106 * Compatibility with WordPress 6.6 100 107 * Fix: Fixed issues with field formatting. 101 108 * Feature : Added the ability to define hidden fields and custom form tags for Airtable 102 109 103 110 = 2.2.0 = 104 * WordPress 6.5.0 compatibility111 * Compatibility with WordPress 6.5 105 112 * Fix: JavaScript code that is executed on all pages 106 113 * Feature: Checks for CF7 form file field mapping and enhance server environment validation 107 114 108 115 = 2.1.0 = 109 * WordPress 6.4.0 compatibility116 * Compatibility with WordPress 6.4 110 117 * Feature: Sending an email to the administrator upon an API error 111 118 112 119 = 2.0.0 = 113 * WordPress 6.3.1 compatibility120 * Compatibility with WordPress 6.3.1 114 121 * Improvement: Use Airtable access tokens instead of API key 115 122 * Fix: Error when using the checkbox field type 116 123 117 124 = 1.1.2 = 118 * WordPress 6.2 compatibility125 * Compatibility with WordPress 6.2 119 126 120 127 = 1.1.1 = … … 122 129 123 130 = 1.1.0 = 124 * Feature: 125 * Selection of the Airtable field’s type 126 * New tags 127 * Improvement: 128 * Links in the interface 131 * Feature: Selection of the Airtable field’s type 132 * Feature: New tags 133 * Improvement: Links in the interface 129 134 130 135 = 1.0.2 = 131 136 * Feature: 132 *Activation switch133 *New tooltip (API key)134 *Setup page shortcut in plugin list135 *Admin notices136 *WP connect branding137 - Activation switch 138 - New tooltip (API key) 139 - Setup page shortcut in plugin list 140 - Admin notices 141 - WP connect branding 137 142 * Improvement: 138 *Help links139 *Tooltips style140 *Warning messages color141 *Plugin name143 - Help links 144 - Tooltips style 145 - Warning messages color 146 - Plugin name 142 147 143 148 = 1.0.1 = 144 * Feature: compatibility with new v5.6 of Contact Form 7149 * Feature: Compatibility with new v5.6 of Contact Form 7 145 150 * Improvement: Airtable integration help link 146 151 147 = 1.0 =152 = 1.0.0 = 148 153 * Initial release 149 154 … … 151 156 152 157 == Support == 158 153 159 If you need support, open a ticket on the [Support](https://wordpress.org/support/plugin/add-on-cf7-for-airtable/). 154 160 … … 157 163 Make sure you have created your database and columns in Airtable before linking them to your form fields. 158 164 **Supported Fields : Single line text, Email, URL, Phone number, Number, Date, Multiple select, Checkbox et Attachment** 165
Note: See TracChangeset
for help on using the changeset viewer.