PluginProbe
Contact Forms by Cimatti / 1.3
Contact Forms by Cimatti v1.3
2.3.6 2.3.5 2.3.0 2.2.32 2.2.4 2.2.0 2.1.2 2.1.1 trunk 1.0 1.1 1.2 1.2.1 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 All 62 releases
contact-forms / accua-shortcode-button-popup.php

accua-shortcode-button-popup.php in Contact Forms by Cimatti 1.3, at accua-shortcode-button-popup.php

132 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 die;
4 }
5
6 wp_enqueue_script('jquery');
7 wp_enqueue_script('tiny_mce_popup', includes_url( 'js/tinymce/tiny_mce_popup.js' ));
8
9 ?>
10 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
11 <html xmlns="http://www.w3.org/1999/xhtml">
12 <head>
13 <title>WordPress Contact Forms by Cimatti</title>
14 <?php
15 wp_print_styles();
16 wp_print_head_scripts();
17 ?>
18 <style>
19 #button-dialog div {
20 padding: 5px 0;
21 height: 20px;
22 }
23
24 #button-dialog label {
25 display: block;
26 float: left;
27 margin: 0 8px 0 0;
28 width: 80px;
29 }
30
31 #button-dialog select,#button-dialog input {
32 display: block;
33 float: right;
34 width: 100px;
35 padding: 3px 5px;
36 }
37
38 #button-dialog select {
39 width: 112px;
40 }
41
42 #button-dialog #insert {
43 display: block;
44 line-height: 24px;
45 text-align: center;
46 margin: 10px 0 0 0;
47 float: right;
48 }
49
50 #accua-dialog div {
51 padding: 0px 0 3px 0;
52 }
53
54 #opzioni_fancy label {
55 display: block;
56 float: left;
57 width: 82px;
58 color: #ccc;
59 }
60
61 #accua-dialog #select_form select,#accua-dialog #select_file select,#accua-dialog #select_azione select
62 {
63 font-size: 11px;
64 padding: 4px;
65 width: 234px;
66 }
67
68 #accua-dialog #select_form label,#accua-dialog #select_file label,#accua-dialog #select_azione label
69 {
70 display: block;
71 float: left;
72 font-size: 13px;
73 line-height: 25px;
74 margin-right: 10px;
75 width: 50px;
76 }
77 </style>
78
79 <script type="text/javascript">
80 function insertAccuaFormButtonDialog() {
81 AccuaFormButtonDialog.insert(AccuaFormButtonDialog.local_ed);
82 }
83
84 var AccuaFormButtonDialog = {
85 local_ed : 'ed',
86 init : function(ed) {
87 AccuaFormButtonDialog.local_ed = ed;
88 tinyMCEPopup.resizeToInnerSize();
89 },
90 insert : function insertButton(ed) {
91 var fid = jQuery('#accua-dialog select#accua-fid').val();
92 var contenuto = jQuery('#accua-dialog textarea#accua-contenuto').val();
93
94 if (fid=='no-sel') {
95 alert( <?php echo json_encode(__("Please select a form", 'accua-form-api')); ?> );
96 } else {
97 // Try and remove existing style / blockquote
98 tinyMCEPopup.execCommand('mceRemoveNode', false, null);
99
100 var output = '[accua-form fid="'+ fid +'"]';
101
102 tinyMCEPopup.execCommand('mceReplaceContent', false, output);
103 tinyMCEPopup.close();
104 }
105 }
106 };
107 tinyMCEPopup.onInit.add(AccuaFormButtonDialog.init, AccuaFormButtonDialog);
108
109 </script>
110
111 </head>
112 <body>
113 <div id="accua-dialog">
114 <form action="/" method="get" accept-charset="<?php echo get_option('blog_charset'); ?>">
115 <div id="select_form">
116 <?php $accua_form=get_option('accua_forms_saved_forms', array()); ?>
117 <label for="accua-fid"><?php _e('Form') ?></label>
118 <select name="accua-fid" id="accua-fid">
119 <option value="no-sel"><?php _e('Select') ?></option>
120 <?php foreach($accua_form as $fid => $form) { ?>
121 <option value="<?php echo $fid; ?>"> <?php $title=empty($form['title']) ? $fid : $form['title']; echo $title; ?></option>
122 <?php } ?>
123
124 </select>
125 </div> <br clear="all" />
126 <div>
127 <input type="button" id="insert" name="insert" value="<?php _e('Insert', 'accua-form-api'); ?>" onclick="insertAccuaFormButtonDialog(); " />
128 </div>
129 </form>
130 </div>
131 </body>
132 </html>