implements 'widget_class_for' => as {
my ($self, $layout_set) = @_;
- my $base = ref($self);
+ my $base = $self->blessed;
my $tail = $layout_set->widget_type;
my $class = join('::', $base, 'Widget', $tail);
Class::MOP::load_class($class);
widget renders [qw/header fields buttons footer/
=> { viewport => func('self','viewport') } ];
- fields renders [viewport over func('self','ordered_fields')];
+ fields renders [viewport over func('viewport','ordered_fields')];
buttons renders [ string {"DUMMY"} ], {message => func('viewport','message');
header renders [ string {"DUMMY"} ];
__END__;
-=for layout widget
- <form action="" method="post" enctype="multipart/form-data">
- [% header %]
- [% fields %]
- [% buttons %]
- [% footer %]
- </form>
+=head1 NAME
-=for layout header
+Reaction::UI::Widget::ActionForm
-<h2>Le Header</h2>
+=head1 DESCRIPTION
-=for layout fields
+=head1 FRAGMENTS
-[% content %] <br />
+=head2 widget
-=for layout buttons
+Additional variables available in topic hash: "viewport".
- [% IF message; %]
- <span>[% message %]</span> <br />
- [% END; %]
+Renders "header", "fields", "buttons" and "footer"
- [% allowed_events = viewport.accept_events; %]
- [% IF allowed_events.grep('^ok$').size; %]
- <input type="submit" name="[% viewport.event_id_for('ok') | html%]" value="ok" />
- [% END; %]
+=head2 fields
- [% IF (viewport.ordered_fields.size != 0) && allowed_events.grep('^apply$').size; %]
- <input type="submit" name="[% viewport.event_id_for('apply') | html%]" value="apply" />
- [% END; %]
+Sequentially renders the C<ordered_fields> of the viewport
- [% IF allowed_events.grep('^close$').size; %]
- <input type="submit" name="[% viewport.event_id_for('close') | html%]" value="cancel" />
- [% END; %]
- <br />
+=head2 buttons
-=for layout footer
+Additional variables available in topic hash: "message"
- <h2>Le Footer</h2>
+=head2 header
+
+Content is a dummy value
+
+=head2 footer
+
+Content is a dummy value
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
+
--- /dev/null
+package Reaction::UI::Widget::DisplayField;
+
+use Reaction::UI::WidgetClass;
+
+class Text, which {
+ widget renders [ qw/label value/ => { viewport => func(self => 'viewport') } ];
+ label renders [ string { $_{viewport}->label } ];
+ value renders [ string { $_{viewport}->value } ];
+};
+
+1;
+
+=head1 NAME
+
+Reaction::UI::Widget::DisplayField
+
+=head1 DESCRIPTION
+
+=head1 FRAGMENTS
+
+=head2 widget
+
+Additional variables available in topic hash: "viewport".
+
+Renders "label" and "field"
+
+=head2 field
+
+ C<content> will contain the value, if any, of the field.
+
+=head2 label
+
+ C<content> will contain the label, if any, of the field.
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
+
+=cut
use Reaction::UI::WidgetClass;
-class Boolean, which {
- widget renders [ qw/label value/ => { viewport => func(self => 'viewport') } ];
- label renders [ string { $_{viewport}->label } ];
+class Boolean is 'Reaction::UI::Widget::DisplayField', which {
value renders [ string { $_{viewport}->value_string } ];
};
__END__;
-=for layout widget
+=head1 NAME
-[% content %]
+Reaction::UI::Widget::DisplayField::Boolean
-=for layout label
+=head1 DESCRIPTION
-<strong > [ % content %]: </strong>
+See L<Reaction::UI::Widget::DisplayField>
-=for layout value
+=head1 FRAGMENTS
-[% content %]
+=head2 value
-=cut
+C<content> contains the viewport's value_string
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
+
+=cut
use Reaction::UI::WidgetClass;
class Collection, which {
- widget renders [ qw/label list item/ => { viewport => func(self => 'viewport') } ];
+ widget renders [ qw/label list/ => { viewport => func(self => 'viewport') } ];
label renders [ string { $_{viewport}->label } ];
list renders [ item over func('viewport', 'value_names') ];
- item renders [ string { $_{_} } ];
+ item renders [ string { $_ } ];
};
1;
__END__;
-=for layout widget
-[% label %]
-[% list %]
+=head1 NAME
-=for layout label
+Reaction::UI::Widget::DisplayField::Collection
-<strong > [ % content %]: </strong>
+=head1 DESCRIPTION
-=for layout list
+=head1 FRAGMENTS
-<ul>
-[% item %]
-</ul>
+=head2 widget
-=for layout item
+renders C<label> and C<list> passing additional variable "viewport"
-<li>[% content %]</li>
+=head2 label
+
+C<content> contains the viewport's label
+
+=head2 list
+
+renders fragment item over the viewport's C<value_names>
+
+=head2 item
+
+C<content> contains the value of the current item ($_ / $_{_})
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
use Reaction::UI::WidgetClass;
-class DateTime, which {
- widget renders [ qw/label value/ => { viewport => func(self => 'viewport') } ];
- label renders [ string { $_{viewport}->label } ];
- value renders [ string { $_{viewport}->value_string } ];
+class DateTime is 'Reaction::UI::Widget::DisplayField', which {
+ value renders [ string { $_{viewport}->value_string } ];
};
1;
__END__;
-=for layout widget
+=head1 NAME
-[% content %]
+Reaction::UI::Widget::DisplayField::DateTime
-=for layout label
+=head1 DESCRIPTION
-<strong > [ % content %]: </strong>
+See L<Reaction::UI::Widget::DisplayField>
-=for layout value
+=head1 FRAGMENTS
-[% content %]
+=head2 value
+
+C<content> contains the viewport's value_string
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
__END__;
-=for layout widget
+=head1 NAME
-[% label %]
-[% list %]
+Reaction::UI::Widget::DisplayField::List
-=for layout label
+=head1 DESCRIPTION
-<strong > [ % content %]: </strong>
+=head1 FRAGMENTS
-=for layout list
+=head2 widget
-<ul>
-[% item %]
-</ul>
+renders C<label> and C<list> passing additional variable "viewport"
-=for layout item
+=head2 label
-<li>[% content %]</li>
+C<content> contains the viewport's label
+
+=head2 list
+
+renders fragment item over the viewport's C<value_names>
+
+=head2 item
+
+C<content> contains the value of the current item ($_ / $_{_})
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
use Reaction::UI::WidgetClass;
-class Number, which {
- widget renders [ qw/label value/ => { viewport => func(self => 'viewport') } ];
- label renders [ string { $_{viewport}->label } ];
- value renders [ string { $_{viewport}->value } ];
+class Number is 'Reaction::UI::Widget::DisplayField', which {
+
};
1;
__END__;
-=for layout widget
+=head1 NAME
+
+Reaction::UI::Widget::DisplayField::Numberx
+
+=head1 DESCRIPTION
-[% content %]
+See L<Reaction::UI::Widget::DisplayField>
-=for layout label
+=head1 AUTHORS
-<strong > [ % content %]: </strong>
+See L<Reaction::Class> for authors.
-=for layout value
+=head1 LICENSE
-[% content %]
+See L<Reaction::Class> for the license.
=cut
use Reaction::UI::WidgetClass;
-class RelatedObject, which {
- widget renders [ qw/label value/ => { viewport => func(self => 'viewport') } ];
- label renders [ string { $_{viewport}->label } ];
+class RelatedObject is 'Reaction::UI::Widget::DisplayField', which {
value renders [ string { $_{viewport}->value_string } ];
};
__END__;
-=for layout widget
+=head1 NAME
-[% content %]
+Reaction::UI::Widget::DisplayField::RelatedObject
-=for layout label
+=head1 DESCRIPTION
-<strong > [ % content %]: </strong>
+See L<Reaction::UI::Widget::DisplayField>
-=for layout value
+=head1 FRAGMENTS
-[% content %]
+=head2 value
+
+C<content> contains the viewport's value_string
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
use Reaction::UI::WidgetClass;
-class String, which {
- widget renders [ qw/label value/ => { viewport => func(self => 'viewport') } ];
- label renders [ string { $_{viewport}->label } ];
- value renders [ string { $_{viewport}->value } ];
+class String is 'Reaction::UI::Widget::DisplayField', which {
+
};
1;
__END__;
-=for layout widget
+=head1 NAME
+
+Reaction::UI::Widget::DisplayField::String
+
+=head1 DESCRIPTION
-[% content %]
+See L<Reaction::UI::Widget::DisplayField>
-=for layout label
+=head1 AUTHORS
-<strong > [ % content %]: </strong>
+See L<Reaction::Class> for authors.
-=for layout value
+=head1 LICENSE
-[% content %]
+See L<Reaction::Class> for the license.
=cut
use Reaction::UI::WidgetClass;
-class Text, which {
- widget renders [ qw/label value/ => { viewport => func(self => 'viewport') } ];
- label renders [ string { $_{viewport}->label } ];
- value renders [ string { $_{viewport}->value } ];
+class Text is 'Reaction::UI::Widget::DisplayField', which {
+
};
1;
__END__;
-=for layout widget
+=head1 NAME
+
+Reaction::UI::Widget::DisplayField::Text
+
+=head1 DESCRIPTION
-[% content %]
+See L<Reaction::UI::Widget::DisplayField>
-=for layout label
+=head1 AUTHORS
-<strong > [ % content %]: </strong>
+See L<Reaction::Class> for authors.
-=for layout value
+=head1 LICENSE
-[% content %]
+See L<Reaction::Class> for the license.
=cut
1;
+=head1 NAME
+
+Reaction::UI::Widget::Field
+
+=head1 DESCRIPTION
+
+=head1 ATTRIBUTES
+
+=head2 id
+
+Str, lazy builds.
+
+=head2 name
+
+Str, lazy builds.
+
+=head1 METHODS
+
+=head2 build_id
+
+Returns the viewport's C<event_id_for('value')>
+
+=head2 build_name
+
+Returns the viewport's C<event_id_for('value')>
+
+=head1 FRAGMENTS
+
+=head2 widget
+
+Additional variables available in topic hash: "viewport", "id", "name".
+
+Renders "label","field" and "message"
+
+=head2 field
+
+ C<content> will contain the value, if any, of the field.
+
+=head2 label
+
+ C<content> will contain the label, if any, of the field.
+
+=head2 message
+
+ C<content> will contain the message, if any, of the field.
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
+
+=cut
1;
-=for layout widget
+=head1 NAME
-[% label %] [% field %] [% message %] <br>
+Reaction::UI::Widget::Field::Boolean
-=for layout field
+=head1 DESCRIPTION
-[%
- IF content;
- checked = 'checked="checked"';
- ELSE;
- checked = "";
- END;
-%]
+See L<Reaction::UI::Widget::Field>
-<!-- We need a replacement for process_attrs -->
-<input type="checkbox" id="[% id | html %]" name="[% name | html %]" value="1" [% checked %] />
+=head1 AUTHORS
-=for layout label
+See L<Reaction::Class> for authors.
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id %]"> [% content | html %]: </label>
-[% END %]
+=head1 LICENSE
-=for layout message
-
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
+=head1 NAME
-[% label %]
-<br />
-[% message %]
-[% field %]
+Reaction::UI::Widget::Field::ChooseMany
-=for layout field
+=head1 DESCRIPTION
-<table>
- <tr>
- <td> [% available_values %] </td>
- <td> [% action_buttons %] </td>
- <td>
- [% selected_values %]
- [% current_values %]
- </td>
- </tr>
-</table>
+See L<Reaction::UI::Widget::Field>
-=for layout available_values
+This needs a refactor to not be tied to a dual select box, but ENOTIME
-<select size="10" multiple="multiple" name="[% viewport.event_id_for('add_values') | html %]">
- [% content %]
-</select>
+=head1 FRAGMENTS
-=for layout selected_values
+=head2 field
-<select size="10" multiple="multiple" name="[% viewport.event_id_for('remove_values') | html %]">
- [% content %]
-</select>
+renders C<available_values>, C<action_buttons>, C<selected_values> and C<current_values>
-=for layout current_values
+=head2 current values
-[% content %]
+renders the viewport's current_value_choices over hidden_value
-=for layout hidden_value
+=head2 hidden_value
-<input type="hidden" name="[% viewport.event_id_for('value') | html %]" value="[% content | html %]">
+C<content> is the value of the current choice
-=for layout option
+=head2 available_value
-<option value="[% v_value | html %]">[% v_name | html %]</option>
+rendersthe viewport's current_available_value_choices over the option fragment
-=for layout action_buttons
+=head2 selected_value
-<input type="submit" value=">>" name="[% viewport.event_id_for('add_all_values') | html %]" />
-<input type="submit" value=">" name="[% viewport.event_id_for('do_add_values') | html %]" /> <br />
-<input type="submit" value="<" name="[% viewport.event_id_for('do_remove_values') | html %]" /> <br />
-<input type="submit" value="<<" name="[% viewport.event_id_for('remove_all_values') | html %]" /> <br />
+rendersthe viewport's current_selected_value_choices over the option fragment
-=for layout label
+=head2 option
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label> [% content | html %]: </label>
-[% END %]
+C<content> is a dummy value but C<v_value> and C<v_name> are both set.
-=for layout message
+=head1 AUTHORS
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span> <br />
-[% END %]
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
-[% label %] [% field %] [% message %]
+=head1 NAME
-=for layout field
+Reaction::UI::Widget::Field::ChooseOne
-<!-- We need a replacement for process_attrs -->
-<select name="[% name | html %]" id="[% id | html %]">
- [% IF is_required %]
- <option value="">--</option>
- [% END %]
- [% content %]
-</select>
+=head1 DESCRIPTION
-=for layout option
+See L<Reaction::UI::Widget::Field>
- [% 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>
+=head1 FRAGMENTS
-=for layout label
+=head2 field
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id | html %]"> [% content | html %]: </label>
-[% END %]
+Renders a series fragment C<option> for each C<value_choices> in the viewport
-=for layout message
+Additional varibles set: C<is_required> - Boolean, self-explanatory
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+=head2 option
+
+C<content> is a dummy variable, but th additional variables C<v_value>, C<v_name>
+and C<is_selected> are set
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
-[% label %] [% field %] [% message %]
+=head1 NAME
-=for layout field
+Reaction::UI::Widget::Field::DateTime
-<!-- We need a replacement for process_attrs -->
-<input type="text" name="[% name | html %]" id="[% id | html%]" value="[% content | html %]" />
+=head1 DESCRIPTION
-=for layout label
+See L<Reaction::UI::Widget::Field>
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id | html %]"> [% content | html %]: </label>
-[% END %]
+=head1 FRAGMENTS
-=for layout message
+=head2 field
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+C<content> contains viewport's C<value_string>
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
+=head1 NAME
-[% label %] [% field %] [% message %]
+Reaction::UI::Widget::Field::File
-=for layout field
+=head1 DESCRIPTION
-<input type="file" name="[% name | html%]" id="[% id | html %]" />
+See L<Reaction::UI::Widget::Field>
-=for layout label
+=head1 AUTHORS
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id | html %]"> [% content | html %]: </label>
-[% END %]
+See L<Reaction::Class> for authors.
-=for layout message
+=head1 LICENSE
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
+=head1 NAME
-[% field %]
+Reaction::UI::Widget::Field::HiddenArray
-=for layout field
+=head1 DESCRIPTION
-[% item %]
+See L<Reaction::UI::Widget::Field>
-=for layout item
+=head1 FRAGMENTS
-<input type="hidden" name="[% name | html %]" value="[% content | html %]" />
+=head2 field
-=for layout label
+renders fragment C<item> over the values of 'value' arrayref
-=for layout message
+=head2 item
+
+C<content> is $_{_} / $_ (current item in the 'value' array)
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
-[% label %] [% field %] [% message %]
+=head1 NAME
-=for layout field
+Reaction::UI::Widget::Field::Number
-<!-- We need a replacement for process_attrs -->
-<input type="text" name="[% name | html%]" id="[% id | html %]" value="[% content | html %]" />
+=head1 DESCRIPTION
-=for layout label
+See L<Reaction::UI::Widget::Field>
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id | html %]"> [% content | html %]: </label>
-[% END %]
+=head1 AUTHORS
-=for layout message
+See L<Reaction::Class> for authors.
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
-[% label %] [% field %] [% message %]
+=head1 NAME
-=for layout field
+Reaction::UI::Widget::Field::Password
-<!-- We need a replacement for process_attrs -->
-<input type="password" name="[% name | html %]" id="[% id | html %]" value="[% content | html %]" />
+=head1 DESCRIPTION
-=for layout label
+See L<Reaction::UI::Widget::Field>
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id | html %]"> [% content | html %]: </label>
-[% END %]
+=head1 AUTHORS
-=for layout message
+See L<Reaction::Class> for authors.
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
+=head1 NAME
-[% label %] [% field %] [% message %]
+Reaction::UI::Widget::Field::String
-=for layout field
+=head1 DESCRIPTION
-<!-- We need a replacement for process_attrs -->
-<input type="text" name="[% name | html %]" id="[% id | html %]" value="[% content | html %]" />
+See L<Reaction::UI::Widget::Field>
-=for layout label
+=head1 AUTHORS
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id | html %]"> [% content | html %]: </label>
-[% END %]
+See L<Reaction::Class> for authors.
-=for layout message
+=head1 LICENSE
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
-[% label %] [% field %] [% message %]
+=head1 NAME
-=for layout field
+Reaction::UI::Widget::Field::Text
-<!-- We need a replacement for process_attrs -->
-<textarea name="[% name | html %]" id="[% id | html %]">
- [% content | html %]
-</textarea>
+=head1 DESCRIPTION
-=for layout label
+See L<Reaction::UI::Widget::Field>
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id | html %]"> [% content | html %]: </label>
-[% END %]
+=head1 AUTHORS
-=for layout message
+See L<Reaction::Class> for authors.
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
1;
-=for layout widget
+=head1 NAME
-[% label %] [% field %] [% message %]
+Reaction::UI::Widget::Field::TimeRange
-=for layout field
+=head1 DESCRIPTION
-TODO
+Warning: INCOMPLETE CLASS
-=for layout label
+See L<Reaction::UI::Widget::Field>
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <label for="[% id | html %]"> [% content | html %]: </label>
-[% END %]
+=head1 AUTHORS
-=for layout message
+See L<Reaction::Class> for authors.
-<!-- This conditional goes away when mst comes up with something better -->
-[% IF content %]
- <span> [% content | html %] </span>
-[% END %]
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
class ObjectView, which {
widget renders [ fields => { viewport => func('self', 'viewport') } ];
- field renders [ viewport over func('viewport','ordered_fields') } ];
+ fields renders [ viewport over func('viewport','ordered_fields') } ];
};
1;
__END__;
-=for layout widget
- [% field %]
+=head1 NAME
-=for layout field
+Reaction::UI::Widget::ObjectView
- [% content %]<br>
+=head1 DESCRIPTION
+
+=head1 FRAGMENTS
+
+=head2 widget
+
+Additional variables available in topic hash: "viewport".
+
+Renders "fields"
+
+=head2 fields
+
+Sequentially renders the C<ordered_fields> of the viewport
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
=cut
--- /dev/null
+=for layout widget
+
+ <form action="" method="post" enctype="multipart/form-data">
+ [% header %]
+ [% fields %]
+ [% buttons %]
+ [% footer %]
+ </form>
+
+=for layout header
+
+<h2>Le Header</h2>
+
+=for layout fields
+
+[% content %] <br />
+
+=for layout buttons
+
+ [% IF message; %]
+ <span>[% message %]</span> <br />
+ [% END; %]
+
+ [% allowed_events = viewport.accept_events; %]
+ [% IF allowed_events.grep('^ok$').size; %]
+ <input type="submit" name="[% viewport.event_id_for('ok') | html%]" value="ok" />
+ [% END; %]
+
+ [% IF (viewport.ordered_fields.size != 0) && allowed_events.grep('^apply$').size; %]
+ <input type="submit" name="[% viewport.event_id_for('apply') | html%]" value="apply" />
+ [% END; %]
+
+ [% IF allowed_events.grep('^close$').size; %]
+ <input type="submit" name="[% viewport.event_id_for('close') | html%]" value="cancel" />
+ [% END; %]
+ <br />
+
+=for layout footer
+
+ <h2>Le Footer</h2>
+
+=cut
--- /dev/null
+=for layout widget
+
+[% content %]
+
+=for layout label
+
+<strong > [ % content %]: </strong>
+
+=for layout value
+
+[% content %]
+
+=cut
\ No newline at end of file
--- /dev/null
+=for layout widget
+
+[% label %]
+[% list %]
+
+=for layout label
+
+<strong > [ % content %]: </strong>
+
+=for layout list
+
+<ul>
+[% item %]
+</ul>
+
+=for layout item
+
+<li>[% content %]</li>
+
+=cut
--- /dev/null
+=for layout widget
+
+[% content %]
+
+=for layout label
+
+<strong > [ % content %]: </strong>
+
+=for layout value
+
+[% content %]
+
+=cut
--- /dev/null
+=for layout widget
+
+[% label %]
+[% list %]
+
+=for layout label
+
+<strong > [ % content %]: </strong>
+
+=for layout list
+
+<ul>
+[% item %]
+</ul>
+
+=for layout item
+
+<li>[% content %]</li>
+
+=cut
\ No newline at end of file
--- /dev/null
+=for layout widget
+
+[% content %]
+
+=for layout label
+
+<strong > [ % content %]: </strong>
+
+=for layout value
+
+[% content %]
+
+=cut
--- /dev/null
+=for layout widget
+
+[% content %]
+
+=for layout label
+
+<strong > [ % content %]: </strong>
+
+=for layout value
+
+[% content %]
+
+=cut
--- /dev/null
+=for layout widget
+
+[% content %]
+
+=for layout label
+
+<strong > [ % content %]: </strong>
+
+=for layout value
+
+[% content %]
+
+=cut
\ No newline at end of file
--- /dev/null
+=for layout widget
+
+[% content %]
+
+=for layout label
+
+<strong > [ % content %]: </strong>
+
+=for layout value
+
+[% content %]
+
+=cut
\ No newline at end of file
--- /dev/null
+=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
--- /dev/null
+=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=">>" name="[% viewport.event_id_for('add_all_values') | html %]" />
+<input type="submit" value=">" name="[% viewport.event_id_for('do_add_values') | html %]" /> <br />
+<input type="submit" value="<" name="[% viewport.event_id_for('do_remove_values') | html %]" /> <br />
+<input type="submit" value="<<" 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
--- /dev/null
+=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
--- /dev/null
+=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
--- /dev/null
+=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
--- /dev/null
+=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
--- /dev/null
+=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
--- /dev/null
+=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
--- /dev/null
+=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
--- /dev/null
+=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
--- /dev/null
+=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
--- /dev/null
+=for layout widget
+
+ [% fields %]
+
+=for layout fields
+
+ [% content %]<br>
+
+=cut