;( function( $ ) { $( function() { // Close modal. var wpformsModalClose = function() { if ( $( '#wpforms-modal-select-form' ).length ) { $( '#wpforms-modal-select-form' ).get( 0 ).selectedIndex = 0; $( '#wpforms-modal-checkbox-title, #wpforms-modal-checkbox-description' ).prop( 'checked', false ); } $( '#wpforms-modal-backdrop, #wpforms-modal-wrap' ).css( 'display', 'none' ); $( document.body ).removeClass( 'modal-open' ); }; // Open modal when media button is clicked. $( document ).on( 'click', '.wpforms-insert-form-button', function( event ) { event.preventDefault(); $( '#wpforms-modal-backdrop, #wpforms-modal-wrap' ).css( 'display', 'block' ); $( document.body ).addClass( 'modal-open' ); } ); // Close modal on close or cancel links. $( document ).on( 'click', '#wpforms-modal-close, #wpforms-modal-cancel a', function( event ) { event.preventDefault(); wpformsModalClose(); } ); // Insert shortcode into TinyMCE. $( document ).on( 'click', '#wpforms-modal-submit', function( event ) { event.preventDefault(); var shortcode; shortcode = '[wpforms id="' + $( '#wpforms-modal-select-form' ).val() + '"'; if ( $( '#wpforms-modal-checkbox-title' ).is( ':checked' ) ) { shortcode = shortcode + ' title="true"'; } if ( $( '#wpforms-modal-checkbox-description' ).is( ':checked' ) ) { shortcode = shortcode + ' description="true"'; } shortcode = shortcode + ']'; wp.media.editor.insert( shortcode ); wpformsModalClose(); } ); } ); }( jQuery ) );
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
builder | Folder | 0755 |
|
|
challenge | Folder | 0755 |
|
|
education | Folder | 0755 |
|
|
Folder | 0755 |
|
||
forms | Folder | 0755 |
|
|
logger | Folder | 0755 |
|
|
pages | Folder | 0755 |
|
|
payments | Folder | 0755 |
|
|
share | Folder | 0755 |
|
|
splash | Folder | 0755 |
|
|
admin-editor.js | File | 1.53 KB | 0644 |
|
admin-editor.min.js | File | 993 B | 0644 |
|
admin-notifications.js | File | 3.82 KB | 0644 |
|
admin-notifications.min.js | File | 2.01 KB | 0644 |
|
admin.js | File | 76.11 KB | 0644 |
|
admin.min.js | File | 38.15 KB | 0644 |
|
form-embed-wizard.js | File | 13.94 KB | 0644 |
|
form-embed-wizard.min.js | File | 7.32 KB | 0644 |
|
notices.js | File | 1.41 KB | 0644 |
|
notices.min.js | File | 656 B | 0644 |
|