| @@ -44,10 +44,9 @@ | ||
| 44 | 44 | } |
| 45 | 45 | break; |
| 46 | 46 | |
| 47 | 47 | case 'svg': |
| 48 | - case 'use': | |
| 49 | - clicked = null !== element.closest( '.frm-embed-form' ); | |
| 48 | + clicked = element.parentNode.classList.contains( 'frm-embed-form' ); | |
| 50 | 49 | if ( clicked ) { |
| 51 | 50 | state.type = 'form'; |
| 52 | 51 | } |
| 53 | 52 | break; |
| @@ -134,9 +133,9 @@ | ||
| 134 | 133 | /* translators: %s type: ie form, view. */ |
| 135 | 134 | const newPageDescription = __( 'Put your %s on a newly created page.', 'formidable' ).replace( '%s', typeDescription ); |
| 136 | 135 | |
| 137 | 136 | /* translators: %s type: ie form, view. */ |
| 138 | - const insertManuallyDescription = __( 'Use shortcodes or PHP code to put the %s anywhere.', 'formidable' ).replace( '%s', typeDescription ); | |
| 137 | + const insertManuallyDescription = __( 'Use WP shortcodes or PHP code to put the %s in any place.', 'formidable' ).replace( '%s', typeDescription ); | |
| 139 | 138 | |
| 140 | 139 | const options = [ |
| 141 | 140 | { |
| 142 | 141 | icon: '#frm_file_icon', |
| @@ -208,12 +207,8 @@ | ||
| 208 | 207 | } |
| 209 | 208 | |
| 210 | 209 | frmDom.autocomplete.initAutocomplete( 'page', dropdownWrapper ); |
| 211 | 210 | |
| 212 | - // Prevent cutoff issue with the autocomplete dropdown. | |
| 213 | - // This also adds visible overflow even if autocomplete is not activated, but that's fine for this page. | |
| 214 | - modal.querySelector( '.postbox' ).style.overflow = 'visible'; | |
| 215 | - | |
| 216 | 211 | function redirectToExistingPageWithInjectedShortcode( event ) { |
| 217 | 212 | event.preventDefault(); |
| 218 | 213 | |
| 219 | 214 | const pageDropdown = modal.querySelector( '[name="frm_page_dropdown"]' ); |
| @@ -357,10 +352,8 @@ | ||
| 357 | 352 | textWrapper.appendChild( getLabel( label ) ); |
| 358 | 353 | textWrapper.appendChild( div( description ) ); |
| 359 | 354 | output.appendChild( textWrapper ); |
| 360 | 355 | |
| 361 | - output.appendChild( div({ className: 'caret' }) ); | |
| 362 | - | |
| 363 | 356 | output.addEventListener( |
| 364 | 357 | 'click', |
| 365 | 358 | function() { |
| 366 | 359 | modal.classList.add( 'frm-on-page-2' ); |
| @@ -371,9 +364,9 @@ | ||
| 371 | 364 | } |
| 372 | 365 | |
| 373 | 366 | function wrapModalOptionIcon( iconHref ) { |
| 374 | 367 | return div({ |
| 375 | - className: 'frm-icon-wrapper', | |
| 368 | + className: 'frm-embed-modal-icon-wrapper', | |
| 376 | 369 | child: svg({ href: iconHref }) |
| 377 | 370 | }); |
| 378 | 371 | } |
| 379 | 372 | |
| @@ -383,15 +376,15 @@ | ||
| 383 | 376 | |
| 384 | 377 | let examples = [ |
| 385 | 378 | { |
| 386 | 379 | label: __( 'WordPress shortcode', 'formidable' ), |
| 387 | - example: '[formidable id=' + formId + ']', | |
| 380 | + example: '[formidable id=' + formId + ' title=true description=true]', | |
| 388 | 381 | link: 'https://formidableforms.com/knowledgebase/publish-a-form/#kb-insert-the-shortcode-manually', |
| 389 | 382 | linkLabel: __( 'How to use shortcodes in WordPress', 'formidable' ) |
| 390 | 383 | }, |
| 391 | 384 | { |
| 392 | 385 | label: __( 'Use PHP code', 'formidable' ), |
| 393 | - example: '<?php echo FrmFormsController::get_form_shortcode( array( \'id\' => ' + formId + ' ) ); ?>' | |
| 386 | + example: '<?php echo FrmFormsController::get_form_shortcode( array( \'id\' => ' + formId + ', \'title\' => true, \'description\' => true ) ); ?>' | |
| 394 | 387 | } |
| 395 | 388 | ]; |
| 396 | 389 | |
| 397 | 390 | const filterArgs = { formId, formKey }; |