source: trunk/plugins/Forms/popups/textarea.html @ 236

Last change on this file since 236 was 236, checked in by gocher, 14 years ago

new elements for plugin forms
file, fieldset, label

and for existing elements more attributes

File size: 3.2 KB
Line 
1<html>
2
3<head>
4  <title>Insert/Edit Form Element TEXTAREA</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_value", "f_cols", "f_rows", "f_wrap", "f_tabindex", "f_accesskey", "f_readonly", "f_disabled"];
11
12function Init() {
13  window.resizeTo(480,260);
14  __dlg_translate("Forms");
15        __dlg_init();
16        var param = window.dialogArguments;
17  for (var i in fields) {
18    switch (fields[i]) {
19    case "f_readonly":
20    case "f_disabled":
21      document.getElementById(fields[i]).checked = param[fields[i]]=="true"; break;
22    default:
23      document.getElementById(fields[i]).value = param[fields[i]]; break;
24    }
25  }
26  document.getElementById("f_name").focus();
27};
28
29function onOK() {
30        var el = document.getElementById("f_name");
31        if (!el.value) {
32        alert("You must enter a Name");
33                el.focus();
34          return false;
35        }
36  // pass data back to the calling window
37  var param = new Object();
38  for (var i in fields) {
39    switch (fields[i]) {
40    case "f_readonly":
41    case "f_disabled":
42      param[fields[i]] = (document.getElementById(fields[i]).checked)?"true":""; break;
43    default:
44      param[fields[i]] = document.getElementById(fields[i]).value; break;
45    }
46  }
47  __dlg_close(param);
48  return false;
49};
50
51function onCancel() {
52        __dlg_close(null);
53        return false;
54};
55</script>
56</head>
57
58<body onload="Init()">
59<div id="f_type" class="title">Form Element: TEXTAREA</div>
60<form action="" method="get">
61  <div class="fr">Name/ID:</div>
62  <input type="text" name="name" id="f_name" title="name of the textarea" />
63  <p />
64  <fieldset>
65        <legend>Dimensions</legend>
66    <div class="fr">Columns:</div>
67    <input type="text" name="cols" id="f_cols" size="5" title="Width in number of characters" />
68    <p />
69    <div class="fr">Rows:</div>
70                <input type="text" name="rows" id="f_rows" size="5" title="Height in number of rows" />
71    <p />
72        </fieldset>
73  <div class="space"></div>
74  <div class="fr">Wrap Mode:</div>
75  <select name="wrap" id="f_wrap">
76    <option value=""></option>
77    <option value="off">Off</option>
78    <option value="soft">Soft</option>
79    <option value="hard">Hard</option>
80    <option value="physical">Physical</option>
81    <option value="virtual">Virtual</option>
82    <option value="normal">normal</option>
83    <option value="nowrap">nowrap</option>
84    <option value="pre">pre</option>   
85  </select>
86  <p />
87  <div class="fr">Read Only</div>
88  <input type="checkbox" name="readonly" id="f_readonly" value="readonly" />
89  <p />
90  <div class="fr">Disabled</div>
91  <input type="checkbox" name="disabled" id="f_disabled" value="disabled" />
92  <p />
93  <div class="fr">Tab Index:</div>
94  <input type="text" name="tabindex" id="f_tabindex" />
95  <p />
96  <div class="fr">Access Key:</div>
97  <input type="text" name="accesskey" id="f_accesskey" />
98  <p />
99 
100  <div class="fr">Initial Text:</div>
101  <input type="text" name="value" id="f_value" title="Default text (optional)" />
102  <div id="buttons">
103    <button type="button" name="ok" onclick="return onOK();">OK</button>
104    <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
105  </div> 
106</form>
107
108</body>
109</html>
Note: See TracBrowser for help on using the repository browser.