event refactor, landing on HEAD!
[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-2007 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 oEditor = window.parent.InnerDialogLoaded() ;\r
33 \r
34 // Gets the document DOM\r
35 var oDOM = oEditor.FCK.EditorDocument ;\r
36 \r
37 var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( 'FORM' ) ;\r
38 \r
39 window.onload = function()\r
40 {\r
41         // First of all, translate the dialog box texts\r
42         oEditor.FCKLanguageManager.TranslatePage(document) ;\r
43 \r
44         if ( oActiveEl )\r
45         {\r
46                 GetE('txtName').value   = oActiveEl.name ;\r
47                 GetE('txtAction').value = oActiveEl.getAttribute( 'action', 2 ) ;\r
48                 GetE('txtMethod').value = oActiveEl.method ;\r
49         }\r
50         else\r
51                 oActiveEl = null ;\r
52 \r
53         window.parent.SetOkButton( true ) ;\r
54 }\r
55 \r
56 function Ok()\r
57 {\r
58         if ( !oActiveEl )\r
59         {\r
60                 oActiveEl = oEditor.FCK.EditorDocument.createElement( 'FORM' ) ;\r
61                 oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;\r
62                 oActiveEl.innerHTML = '&nbsp;' ;\r
63         }\r
64 \r
65         oActiveEl.name = GetE('txtName').value ;\r
66         SetAttribute( oActiveEl, 'action'       , GetE('txtAction').value ) ;\r
67         oActiveEl.method = GetE('txtMethod').value ;\r
68 \r
69         return true ;\r
70 }\r
71 \r
72         </script>\r
73 </head>\r
74 <body style="overflow: hidden">\r
75         <table width="100%" style="height: 100%">\r
76                 <tr>\r
77                         <td align="center">\r
78                                 <table cellspacing="0" cellpadding="0" width="80%" border="0">\r
79                                         <tr>\r
80                                                 <td>\r
81                                                         <span fcklang="DlgFormName">Name</span><br />\r
82                                                         <input style="width: 100%" type="text" id="txtName" />\r
83                                                 </td>\r
84                                         </tr>\r
85                                         <tr>\r
86                                                 <td>\r
87                                                         <span fcklang="DlgFormAction">Action</span><br />\r
88                                                         <input style="width: 100%" type="text" id="txtAction" />\r
89                                                 </td>\r
90                                         </tr>\r
91                                         <tr>\r
92                                                 <td>\r
93                                                         <span fcklang="DlgFormMethod">Method</span><br />\r
94                                                         <select id="txtMethod">\r
95                                                                 <option value="get" selected="selected">GET</option>\r
96                                                                 <option value="post">POST</option>\r
97                                                         </select>\r
98                                                 </td>\r
99                                         </tr>\r
100                                 </table>\r
101                         </td>\r
102                 </tr>\r
103         </table>\r
104 </body>\r
105 </html>\r