FCKeditor 2.6.6
[freeside.git] / httemplate / elements / fckeditor / editor / dialog / fck_form.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >\r
2 <!--\r
3  * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
4  * Copyright (C) 2003-2010 Frederico Caldeira Knabben\r
5  *\r
6  * == BEGIN LICENSE ==\r
7  *\r
8  * Licensed under the terms of any of the following licenses at your\r
9  * choice:\r
10  *\r
11  *  - GNU General Public License Version 2 or later (the "GPL")\r
12  *    http://www.gnu.org/licenses/gpl.html\r
13  *\r
14  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
15  *    http://www.gnu.org/licenses/lgpl.html\r
16  *\r
17  *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
18  *    http://www.mozilla.org/MPL/MPL-1.1.html\r
19  *\r
20  * == END LICENSE ==\r
21  *\r
22  * Form dialog window.\r
23 -->\r
24 <html xmlns="http://www.w3.org/1999/xhtml">\r
25 <head>\r
26         <title></title>\r
27         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
28         <meta content="noindex, nofollow" name="robots" />\r
29         <script src="common/fck_dialog_common.js" type="text/javascript"></script>\r
30         <script type="text/javascript">\r
31 \r
32 var dialog      = window.parent ;\r
33 var oEditor = dialog.InnerDialogLoaded() ;\r
34 \r
35 // Gets the document DOM\r
36 var oDOM = oEditor.FCK.EditorDocument ;\r
37 \r
38 var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( 'FORM' ) ;\r
39 \r
40 window.onload = function()\r
41 {\r
42         // First of all, translate the dialog box texts\r
43         oEditor.FCKLanguageManager.TranslatePage(document) ;\r
44 \r
45         if ( oActiveEl )\r
46         {\r
47                 GetE('txtName').value   = oActiveEl.name ;\r
48                 GetE('txtAction').value = oActiveEl.getAttribute( 'action', 2 ) ;\r
49                 GetE('txtMethod').value = oActiveEl.method ;\r
50         }\r
51         else\r
52                 oActiveEl = null ;\r
53 \r
54         dialog.SetOkButton( true ) ;\r
55         dialog.SetAutoSize( true ) ;\r
56         SelectField( 'txtName' ) ;\r
57 }\r
58 \r
59 function Ok()\r
60 {\r
61         if ( !oActiveEl )\r
62         {\r
63                 oActiveEl = oEditor.FCK.InsertElement( 'form' ) ;\r
64 \r
65                 if ( oEditor.FCKBrowserInfo.IsGeckoLike )\r
66                         oEditor.FCKTools.AppendBogusBr( oActiveEl ) ;\r
67         }\r
68 \r
69         oActiveEl.name = GetE('txtName').value ;\r
70         SetAttribute( oActiveEl, 'action', GetE('txtAction').value ) ;\r
71         oActiveEl.method = GetE('txtMethod').value ;\r
72 \r
73         return true ;\r
74 }\r
75 \r
76         </script>\r
77 </head>\r
78 <body style="overflow: hidden">\r
79         <table width="100%" style="height: 100%">\r
80                 <tr>\r
81                         <td align="center">\r
82                                 <table cellspacing="0" cellpadding="0" width="80%" border="0">\r
83                                         <tr>\r
84                                                 <td>\r
85                                                         <span fcklang="DlgFormName">Name</span><br />\r
86                                                         <input style="width: 100%" type="text" id="txtName" />\r
87                                                 </td>\r
88                                         </tr>\r
89                                         <tr>\r
90                                                 <td>\r
91                                                         <span fcklang="DlgFormAction">Action</span><br />\r
92                                                         <input style="width: 100%" type="text" id="txtAction" />\r
93                                                 </td>\r
94                                         </tr>\r
95                                         <tr>\r
96                                                 <td>\r
97                                                         <span fcklang="DlgFormMethod">Method</span><br />\r
98                                                         <select id="txtMethod">\r
99                                                                 <option value="get" selected="selected">GET</option>\r
100                                                                 <option value="post">POST</option>\r
101                                                         </select>\r
102                                                 </td>\r
103                                         </tr>\r
104                                 </table>\r
105                         </td>\r
106                 </tr>\r
107         </table>\r
108 </body>\r
109 </html>\r