PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 3.6.61
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v3.6.61
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / resources / assets / admin / fluentform_editor_script.js

fluentform_editor_script.js in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 3.6.61, at resources/assets/admin/fluentform_editor_script.js

37 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(document).ready(function ($) {
2 fluentform_editor_vars.forms.unshift({value:'', text:'--Select Form--'});
3 $('#fluent_form_insert_button').on('click', function (e) {
4 e.preventDefault();
5 var editor = tinyMCE.activeEditor;
6 var uid = 'fluentform-forms-popup-error'+(new Date()).getTime();
7 editor.windowManager.open({
8 width: 400,
9 height: 100,
10 title: 'Add Form',
11 body: [{
12 type: 'listbox',
13 name: 'form_id',
14 label: 'Select a Form:',
15 values: fluentform_editor_vars.forms
16 }],
17 onselect: function(e) {
18 $('#'+uid).remove();
19 },
20 onsubmit: function(e) {
21 if (e.data.form_id) {
22 editor.insertContent('[fluentform id='+e.data.form_id+']');
23 } else {
24 e.preventDefault();
25 var alert = e.target.$el.find('#'+uid);
26 alert = alert.length || $('<div/>', {
27 class:'error',
28 id: uid,
29 style: 'text-align:center;color:#dc3232',
30 html: 'No form is selected!'
31 }).appendTo(e.target.$el);
32 }
33 }
34 });
35 });
36 });
37