Changeset 1937172
- Timestamp:
- 09/07/2018 02:12:14 AM (8 years ago)
- Location:
- forms-3rdparty-integration/trunk
- Files:
-
- 5 edited
-
README.md (modified) (1 diff)
-
forms-3rdparty-integration.php (modified) (5 diffs)
-
plugin-ui.php (modified) (2 diffs)
-
plugin.admin.js (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
forms-3rdparty-integration/trunk/README.md
r1909395 r1937172 241 241 242 242 ## Changelog ## 243 244 ### 1.7.8 ### 245 * adding per-service delimiter, supports newlines 246 * 'add new service' button after metaboxes 247 * minor ui fixes 243 248 244 249 ### 1.7.7 ### -
forms-3rdparty-integration/trunk/forms-3rdparty-integration.php
r1909395 r1937172 6 6 Description: Send plugin Forms Submissions (Gravity, CF7, Ninja Forms, etc) to a 3rd-party URL 7 7 Author: zaus, atlanticbt, spkane 8 Version: 1.7. 78 Version: 1.7.8 9 9 Author URI: http://drzaus.com 10 10 Changelog: … … 37 37 1.7.6 - exposing http method (get/post); result redirection 38 38 1.7.7 - destination mapping is textarea to make other plugins easier, hooks to add more columns 39 1.7.8 - adding per-service delimiter, supports newlines; 'add new service' button after metaboxes 39 40 */ 40 41 … … 536 537 $post = array(); 537 538 538 $service['separator'] = $debug['separator']; // alias here for reporting 539 if(!isset($service['delim']) || empty($service['delim'])) 540 $service['delim'] = $debug['separator']; // alias here for reporting and using default 539 541 540 542 //find mapping … … 572 574 573 575 // fix for multiple values 574 switch($service[' separator']) {576 switch($service['delim']) { 575 577 case '[#]': 576 578 // don't do anything to include numerical index (default behavior of `http_build_query`) … … 586 588 break; 587 589 default: 590 // special case: newlines were escaped 591 if($service['delim'] == '\\r\\n') $service['delim'] = "\r\n"; 592 elseif($service['delim'] == '\\n') $service['delim'] = "\n"; 593 588 594 // otherwise, find the arrays and implode 589 595 foreach($post as $f => &$v) { 590 596 ###_log('checking array', $f, $v, is_array($v) ? 'array' : 'notarray'); 591 597 592 if(is_array($v)) $v = implode($service[' separator'], $v);598 if(is_array($v)) $v = implode($service['delim'], $v); 593 599 } 594 600 break; -
forms-3rdparty-integration/trunk/plugin-ui.php
r1910098 r1937172 170 170 <div class="field"> 171 171 <label for="timeout-<?php echo $eid?>">Request timeout</label> 172 <input id="tim out-<?php echo $eid?>" type="text" class="text" name="<?php echo $P?>[<?php echo $eid?>][timeout]" value="<?php echo esc_attr($entity['timeout'])?>" />172 <input id="timeout-<?php echo $eid?>" type="text" class="text" name="<?php echo $P?>[<?php echo $eid?>][timeout]" value="<?php echo esc_attr($entity['timeout'])?>" /> 173 173 <em class="description"><?php echo sprintf(__('How long (in seconds) to attempt the 3rd-party remote request before giving up. Default %d', $P), self::DEFAULT_TIMEOUT);?>.</em> 174 </div> 175 176 <div class="field"> 177 <label for="delim-<?php echo $eid?>">Separator</label> 178 <input id="delim-<?php echo $eid?>" type="text" class="text" name="<?php echo $P?>[<?php echo $eid?>][delim]" value="<?php echo esc_attr($entity['delim'])?>" /> 179 <em class="description"><?php _e('Separator for multiple-mapped fields (i.e. if `fname` and `lname` are mapped to the `name` field, how to separate them). Uses plugin setting if not defined per-service.', $P);?>.</em> 174 180 </div> 175 181 </div> … … 302 308 <div class="buttons"> 303 309 <input type="submit" id="submit" name="submit" class="button button-primary" value="Save" /> 310 311 <span class="button"><a href="#" class="actn" data-actn="clone" data-after="metabox" data-target="div.meta-box-sortables div.meta-box:last">Add Another Service</a></span> 304 312 </div> 305 313 -
forms-3rdparty-integration/trunk/plugin.admin.js
r1910110 r1937172 12 12 13 13 var $o = $(this) 14 , $target = $o.closest( $o.data('rel') ) //get the target off the link "rel", and find it from the parent-chain 14 , target = $o.data('target') 15 , $target = target ? $(target) : $o.closest( $o.data('rel') ) //get the target off the link "rel", and find it from the parent-chain 15 16 , after = $o.data('after') 16 17 , action = $o.data('actn') … … 63 64 $clone.find('tr.fields').slice(1).empty().remove(); // only save the first row 64 65 var $title = $clone.find('h3 span:last'); 65 $title.html( $title.html().split(':')[0] ); 66 $title.html( $title.html().split(':')[0] ) 67 // and reapply data 68 .parent() 69 .data('actn', "toggle") 70 .data('rel', ".postbox"); 66 71 67 72 // toggle hooks appropriately -- since the next call will 'reset' all fields, force collapsed -
forms-3rdparty-integration/trunk/readme.txt
r1909395 r1937172 234 234 235 235 == Changelog == 236 237 = 1.7.8 = 238 * adding per-service delimiter, supports newlines 239 * 'add new service' button after metaboxes 240 * minor ui fixes 236 241 237 242 = 1.7.7 =
Note: See TracChangeset
for help on using the changeset viewer.