aboutsummaryrefslogtreecommitdiff
path: root/documentation/theming/preview/forms.php
blob: 592f5f844e4395180c313ebd71d6c9aeb9d436d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<?php
/**
 * Form CSS
 */

$title = 'Forms and Buttons';

require dirname(__FILE__) . '/head.php';

$url = current_page_url();

?>
<body>
	<div class="elgg-page mal">
		<h1 class="mbs">
			<a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
		</h1>
		<div class="mbl">
			<a href="nav.php">< previous</a>&nbsp;&nbsp;<a href="objects.php">next ></a>
		</div>
		<h2>Form</h2>
		<form action="#">
			<fieldset>
				<legend>Form legend</legend>
				<p>
					<label for="f1">Text input:</label>
					<?php echo elgg_view('input/text', array(
							'internalname' => 'f1',
							'internalid' => 'f1',
							'value' => 'input text',
							));
					?>
				</p>
				<p>
					<label for="f2">Password input:</label>
					<?php echo elgg_view('input/password', array(
							'internalname' => 'f2',
							'internalid' => 'f2',
							'value' => 'password',
							));
					?>
				</p>
				<p>
					<label for="f3">Radio input:</label><br />
					<?php echo elgg_view('input/radio', array(
							'internalname' => 'f3',
							'internalid' => 'f3',
							'options' => array(1, 2),
							));
					?>
				</p>
				<p>
					<label for="f4">Checkboxes input:</label><br />
					<?php echo elgg_view('input/checkboxes', array(
							'internalname' => 'f4',
							'internalid' => 'f4',
							'options' => array(1, 2),
							));
					?>
				</p>
				<p>
					<label for="f5">Dropdown input:</label><br />
					<?php echo elgg_view('input/dropdown', array(
							'internalname' => 'f5',
							'internalid' => 'f5',
							'options' => array('option 1', 'option 2'),
							));
					?>
				</p>
				<p>
					<label for="f6">Access input:</label>
					<?php echo elgg_view('input/access', array(
							'internalname' => 'f6',
							'internalid' => 'f6',
							'value' => ACCESS_PUBLIC,
							));
					?>
				</p>
				<p>
					<label for="f7">File input:</label>
					<?php echo elgg_view('input/file', array(
							'internalname' => 'f7',
							'internalid' => 'f7',
							));
					?>
				</p>
				<p>
					<label for="f8">URL input:</label>
					<?php echo elgg_view('input/url', array(
							'internalname' => 'f8',
							'internalid' => 'f8',
							'value' => 'http://elgg.org/',
							));
					?>
				</p>
				<p>
					<label for="f9">Tags input:</label>
					<?php echo elgg_view('input/tags', array(
							'internalname' => 'f9',
							'internalid' => 'f9',
							'value' => 'one, two, three',
							));
					?>
				</p>
				<p>
					<label for="f10">Email input:</label>
					<?php echo elgg_view('input/email', array(
							'internalname' => 'f10',
							'internalid' => 'f10',
							'value' => 'noone@elgg.org',
							));
					?>
				</p>
				<p>
					<label for="f11">Autocomplete input:</label>
					<?php echo elgg_view('input/autocomplete', array(
							'internalname' => 'f11',
							'internalid' => 'f11',
							'match_on' => 'users',
							));
					?>
				</p>
				<p>
					<label for="f12">Date picker input:</label>
					<?php echo elgg_view('input/datepicker', array(
							'internalname' => 'f12',
							'internalid' => 'f12',
							));
					?>
				</p>
				<p>
					<label for="f13">User picker input:</label>
					<?php echo elgg_view('input/userpicker', array(
							'internalname' => 'f13',
							'internalid' => 'f13',
							));
					?>
				</p>
				<p>
					<label for="f14">Long text input:</label>
					<?php echo elgg_view('input/longtext', array(
							'internalname' => 'f14',
							'internalid' => 'f14',
							'value' => $ipsum,
							));
					?>
				</p>
				<p>
					<label for="f15">Plain text input:</label>
					<?php echo elgg_view('input/plaintext', array(
							'internalname' => 'f15',
							'internalid' => 'f15',
							'value' => $ipsum,
							));
					?>
				</p>
			</fieldset>
		</form>
		
		<div class="mtl">
			<h2>Buttons</h2>
			<table>
				<thead>
					<tr>
						<th>Anchors</th>
						<th>Default</th>
						<th>Hover</th>
						<th>Focus</th>
						<th>Active</th>
						<th>Disabled</th>
						<th>Selected</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th>Default</th>
						<td><a href="#" class="elgg-button">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-state-hover">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-state-focus">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-state-active">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-state-disabled">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-state-selected">anchor</a></td>
					</tr>
					<tr>
						<th>Action</th>
						<td><a href="#" class="elgg-button elgg-button-action">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-action elgg-state-hover">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-action elgg-state-focus">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-action elgg-state-active">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-action elgg-state-disabled">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-action elgg-state-selected">anchor</a></td>
					</tr>
					<tr>
						<th>Default</th>
						<td><a href="#" class="elgg-button elgg-button-submit">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-submit elgg-state-hover">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-submit elgg-state-focus">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-submit elgg-state-active">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-submit elgg-state-disabled">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-submit elgg-state-selected">anchor</a></td>
					</tr>
					<tr>
						<th>Default</th>
						<td><a href="#" class="elgg-button elgg-button-cancel">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-cancel elgg-state-hover">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-cancel elgg-state-focus">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-cancel elgg-state-active">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-cancel elgg-state-disabled">anchor</a></td>
						<td><a href="#" class="elgg-button elgg-button-cancel elgg-state-selected">anchor</a></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</body>
</html>