aboutsummaryrefslogtreecommitdiffstats
path: root/share/skin/default/layout/field
diff options
context:
space:
mode:
authorgroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2007-09-28 18:01:42 +0000
committergroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2007-09-28 18:01:42 +0000
commit5a1a893ef93c22e0aba72a346749753ace194d66 (patch)
treee0e205313394669a385715c0139d7cf18a072127 /share/skin/default/layout/field
parent9de685fc288409d8b92e41f1e23b67562ea407f8 (diff)
downloadreaction-5a1a893ef93c22e0aba72a346749753ace194d66.tar.gz
reaction-5a1a893ef93c22e0aba72a346749753ace194d66.zip
more work towards widgets, split up the templates and added some super basic POD
Diffstat (limited to 'share/skin/default/layout/field')
-rw-r--r--share/skin/default/layout/field/boolean32
-rw-r--r--share/skin/default/layout/field/choose_many66
-rw-r--r--share/skin/default/layout/field/choose_one40
-rw-r--r--share/skin/default/layout/field/date_time24
-rw-r--r--share/skin/default/layout/field/file23
-rw-r--r--share/skin/default/layout/field/hidden_array17
-rw-r--r--share/skin/default/layout/field/number24
-rw-r--r--share/skin/default/layout/field/password24
-rw-r--r--share/skin/default/layout/field/string24
-rw-r--r--share/skin/default/layout/field/text26
-rw-r--r--share/skin/default/layout/field/time_range23
11 files changed, 323 insertions, 0 deletions
diff --git a/share/skin/default/layout/field/boolean b/share/skin/default/layout/field/boolean
new file mode 100644
index 0000000..2ee1da2
--- /dev/null
+++ b/share/skin/default/layout/field/boolean
@@ -0,0 +1,32 @@
+=for layout widget
+
+[% label %] [% field %] [% message %] <br>
+
+=for layout field
+
+[%
+ IF content;
+ checked = 'checked="checked"';
+ ELSE;
+ checked = "";
+ END;
+%]
+
+<!-- We need a replacement for process_attrs -->
+<input type="checkbox" id="[% id | html %]" name="[% name | html %]" value="1" [% checked %] />
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut
diff --git a/share/skin/default/layout/field/choose_many b/share/skin/default/layout/field/choose_many
new file mode 100644
index 0000000..8781021
--- /dev/null
+++ b/share/skin/default/layout/field/choose_many
@@ -0,0 +1,66 @@
+=for layout widget
+
+[% label %]
+<br />
+[% message %]
+[% field %]
+
+=for layout field
+
+<table>
+ <tr>
+ <td> [% available_values %] </td>
+ <td> [% action_buttons %] </td>
+ <td>
+ [% selected_values %]
+ [% current_values %]
+ </td>
+ </tr>
+</table>
+
+=for layout available_values
+
+<select size="10" multiple="multiple" name="[% viewport.event_id_for('add_values') | html %]">
+ [% content %]
+</select>
+
+=for layout selected_values
+
+<select size="10" multiple="multiple" name="[% viewport.event_id_for('remove_values') | html %]">
+ [% content %]
+</select>
+
+=for layout current_values
+
+[% content %]
+
+=for layout hidden_value
+
+<input type="hidden" name="[% viewport.event_id_for('value') | html %]" value="[% content | html %]">
+
+=for layout option
+
+<option value="[% v_value | html %]">[% v_name | html %]</option>
+
+=for layout action_buttons
+
+<input type="submit" value="&gt;&gt;" name="[% viewport.event_id_for('add_all_values') | html %]" />
+<input type="submit" value="&gt;" name="[% viewport.event_id_for('do_add_values') | html %]" /> <br />
+<input type="submit" value="&lt;" name="[% viewport.event_id_for('do_remove_values') | html %]" /> <br />
+<input type="submit" value="&lt;&lt;" name="[% viewport.event_id_for('remove_all_values') | html %]" /> <br />
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span> <br />
+[% END %]
+
+=cut
diff --git a/share/skin/default/layout/field/choose_one b/share/skin/default/layout/field/choose_one
new file mode 100644
index 0000000..2378ff5
--- /dev/null
+++ b/share/skin/default/layout/field/choose_one
@@ -0,0 +1,40 @@
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+<!-- We need a replacement for process_attrs -->
+<select name="[% name | html %]" id="[% id | html %]">
+ [% IF is_required %]
+ <option value="">--</option>
+ [% END %]
+ [% content %]
+</select>
+
+=for layout option
+
+ [% IF is_selected;
+ selected = ' selected="selected"';
+ ELSE;
+ selected = '';
+ END;
+ %]
+ <!-- I should convert this stuff to process_attrs to keep it cleaner -->
+ <option value="[% v_value | html%]" [% selected %]> [% v_name | html %]</option>
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id | html %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut
diff --git a/share/skin/default/layout/field/date_time b/share/skin/default/layout/field/date_time
new file mode 100644
index 0000000..b8dd3ea
--- /dev/null
+++ b/share/skin/default/layout/field/date_time
@@ -0,0 +1,24 @@
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+<!-- We need a replacement for process_attrs -->
+<input type="text" name="[% name | html %]" id="[% id | html%]" value="[% content | html %]" />
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id | html %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut
diff --git a/share/skin/default/layout/field/file b/share/skin/default/layout/field/file
new file mode 100644
index 0000000..4c95907
--- /dev/null
+++ b/share/skin/default/layout/field/file
@@ -0,0 +1,23 @@
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+<input type="file" name="[% name | html%]" id="[% id | html %]" />
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id | html %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut
diff --git a/share/skin/default/layout/field/hidden_array b/share/skin/default/layout/field/hidden_array
new file mode 100644
index 0000000..ebc06af
--- /dev/null
+++ b/share/skin/default/layout/field/hidden_array
@@ -0,0 +1,17 @@
+=for layout widget
+
+[% field %]
+
+=for layout field
+
+[% item %]
+
+=for layout item
+
+<input type="hidden" name="[% name | html %]" value="[% content | html %]" />
+
+=for layout label
+
+=for layout message
+
+=cut
diff --git a/share/skin/default/layout/field/number b/share/skin/default/layout/field/number
new file mode 100644
index 0000000..eaa9593
--- /dev/null
+++ b/share/skin/default/layout/field/number
@@ -0,0 +1,24 @@
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+<!-- We need a replacement for process_attrs -->
+<input type="text" name="[% name | html%]" id="[% id | html %]" value="[% content | html %]" />
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id | html %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut \ No newline at end of file
diff --git a/share/skin/default/layout/field/password b/share/skin/default/layout/field/password
new file mode 100644
index 0000000..ec42e2a
--- /dev/null
+++ b/share/skin/default/layout/field/password
@@ -0,0 +1,24 @@
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+<!-- We need a replacement for process_attrs -->
+<input type="password" name="[% name | html %]" id="[% id | html %]" value="[% content | html %]" />
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id | html %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut \ No newline at end of file
diff --git a/share/skin/default/layout/field/string b/share/skin/default/layout/field/string
new file mode 100644
index 0000000..a17c243
--- /dev/null
+++ b/share/skin/default/layout/field/string
@@ -0,0 +1,24 @@
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+<!-- We need a replacement for process_attrs -->
+<input type="text" name="[% name | html %]" id="[% id | html %]" value="[% content | html %]" />
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id | html %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut
diff --git a/share/skin/default/layout/field/text b/share/skin/default/layout/field/text
new file mode 100644
index 0000000..0c6118a
--- /dev/null
+++ b/share/skin/default/layout/field/text
@@ -0,0 +1,26 @@
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+<!-- We need a replacement for process_attrs -->
+<textarea name="[% name | html %]" id="[% id | html %]">
+ [% content | html %]
+</textarea>
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id | html %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut
diff --git a/share/skin/default/layout/field/time_range b/share/skin/default/layout/field/time_range
new file mode 100644
index 0000000..7b3bb6b
--- /dev/null
+++ b/share/skin/default/layout/field/time_range
@@ -0,0 +1,23 @@
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+TODO
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id | html %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut