source: trunk/plugins/Forms/popups/form.html @ 967

Last change on this file since 967 was 854, checked in by gocher, 13 years ago

change htmlarea to Xinha in plugin Forms and some formating

  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 2.3 KB
Line 
1<html>
2
3<head>
4  <title>Insert/Edit Form</title>
5  <link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
6  <script type="text/javascript" src="../../../popups/popup.js"></script>
7
8<script type="text/javascript">
9
10var fields = ["f_name", "f_action", "f_method", "f_enctype", "f_target"];
11
12function Init() {
13  __dlg_translate("Forms");
14  __dlg_init(null,{width:360, height:280});
15  var param = window.dialogArguments;
16  for (var i in fields) {
17    document.getElementById(fields[i]).value = param[fields[i]];
18  }
19  document.getElementById("f_name").focus();
20}
21
22function onOK() {
23  var required = {
24    "f_name": "You must enter the form name"
25  };
26  for (var i in required) {
27    var el = document.getElementById(i);
28    if (!el.value) {
29      alert(Xinha._lc(required[i],"Forms"));
30      el.focus();
31      return false;
32    }
33  }
34  // pass data back to the calling window
35  var param = new Object();
36  for (var i in fields) {
37    param[fields[i]] = document.getElementById(fields[i]).value;
38  }
39  __dlg_close(param);
40  return false;
41}
42
43function onCancel() {
44  __dlg_close(null);
45  return false;
46}
47</script>
48</head>
49
50<body class="dialog" onload="Init()">
51<div class="title">Form</div>
52<form action="" method="get">
53  <div class="fr">Form Name:</div>
54  <input type="text" name="name" id="f_name" size="20" title="Name" />
55  <p />
56
57  <fieldset>
58  <legend>Form handler script</legend>
59  <div class="space"></div>
60  <div class="fr">Action URL:</div>
61  <input name="action" id="f_action" type="text" size="30">
62  <p />
63  <div class="fr">Method:</div>
64  <select name="f_method" id="f_method">
65    <option value=""></option>
66    <option value="post">Post</option>
67    <option value="get">Get</option>
68  </select>
69  <div class="space"></div>
70  <div class="fr">Encoding:</div>
71  <select name="enctype" id="f_enctype">
72    <option value=""></option>
73    <option value="application/x-www-form-urlencoded">HTML-Form to CGI (default)</option>
74    <option value="multipart/form-data">multipart Form Data (File-Upload)</option>
75  </select>
76  <p />
77  <div class="fr">Target Frame:</div>
78  <input name="target" id="f_target" type="text" size="30">
79  <p />
80  </fieldset>
81
82<div id="buttons">
83  <button type="button" name="ok" onclick="return onOK();">OK</button>
84  <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
85</div>
86</form>
87
88</body>
89</html>
Note: See TracBrowser for help on using the repository browser.