• Publicity: Public Only All

widget-procs.tcl

Form widgets for the ArsDigita Templating System

Location:
packages/acs-templating/tcl/widget-procs.tcl
Authors:
Karl Goldstein <karlg@arsdigita.com>
Stanislav Freidin <sfreidin@arsdigita.com>
CVS Identification:
$Id: widget-procs.tcl,v 1.66 2024/09/11 06:15:48 gustafn Exp $

Procedures in this file

Detailed information

template::data::transform::checkbox_text (public)

 template::data::transform::checkbox_text element_ref
Parameters:
element_ref (required)
Returns:
Error:
Author:
Timo Hentschel <timo@timohentschel.de>
Created:
2004-10-17

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

template::data::transform::radio_text (public)

 template::data::transform::radio_text element_ref
Parameters:
element_ref (required)
Returns:
Error:
Author:
Timo Hentschel <timo@timohentschel.de>
Created:
2004-10-17

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

template::data::transform::search (public)

 template::data::transform::search element_ref

Process a submitted search widget's data.

Parameters:
element_ref (required)
Reference variable to the form element
Returns:
Transformed value

Partial Call Graph (max 5 caller/called nodes):
%3 db_list_of_lists db_list_of_lists (public) template::element::set_error template::element::set_error (public) template::data::transform::search template::data::transform::search template::data::transform::search->db_list_of_lists template::data::transform::search->template::element::set_error

Testcases:
No testcase defined.

template::data::transform::select_text (public)

 template::data::transform::select_text element_ref
Parameters:
element_ref (required)
Returns:
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-07-18

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

template::data::validate::checkbox_text (public)

 template::data::validate::checkbox_text value_ref message_ref

validate a checkbox_other datatype

Parameters:
value_ref (required)
message_ref (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_validate_text validate_text (test acs-templating) template::data::validate::checkbox_text template::data::validate::checkbox_text test_validate_text->template::data::validate::checkbox_text

Testcases:
validate_text

template::data::validate::party_search (public)

 template::data::validate::party_search value_ref message_ref

Validate the party search entry form.

Parameters:
value_ref (required)
A reference to the value input by the user.
message_ref (required)
A reference to the form element error field.
Returns:
true - all input for this datatype is valid.

Partial Call Graph (max 5 caller/called nodes):
%3 test_validate_search validate_search (test acs-templating) template::data::validate::party_search template::data::validate::party_search test_validate_search->template::data::validate::party_search

Testcases:
validate_search

template::data::validate::radio_text (public)

 template::data::validate::radio_text value_ref message_ref

validate a radio_other datatype

Parameters:
value_ref (required)
message_ref (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_validate_text validate_text (test acs-templating) template::data::validate::radio_text template::data::validate::radio_text test_validate_text->template::data::validate::radio_text

Testcases:
validate_text

template::data::validate::select_text (public)

 template::data::validate::select_text value_ref message_ref

validate a select_text datatype

Parameters:
value_ref (required)
message_ref (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_validate_text validate_text (test acs-templating) template::data::validate::select_text template::data::validate::select_text test_validate_text->template::data::validate::select_text

Testcases:
validate_text

template::util::checkbox_text::get_property (public)

 template::util::checkbox_text::get_property what checkbox_list
Parameters:
what (required)
checkbox_list (required)
Returns:
Error:
Author:
Timo Hentschel <timo@timohentschel.de>
Created:
2004-10-17

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::checkbox_text template::widget::checkbox_text (public) template::util::checkbox_text::get_property template::util::checkbox_text::get_property template::widget::checkbox_text->template::util::checkbox_text::get_property

Testcases:
No testcase defined.

template::util::radio_text::get_property (public)

 template::util::radio_text::get_property what radio_list
Parameters:
what (required)
radio_list (required)
Returns:
Error:
Author:
Timo Hentschel <timo@timohentschel.de>
Created:
2004-10-17

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::radio_text template::widget::radio_text (public) template::util::radio_text::get_property template::util::radio_text::get_property template::widget::radio_text->template::util::radio_text::get_property

Testcases:
No testcase defined.

template::util::select_text::get_property (public)

 template::util::select_text::get_property what select_text_list
Parameters:
what (required)
select_text_list (required)
Returns:
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-07-18

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::select_text template::widget::select_text (public) template::util::select_text::get_property template::util::select_text::get_property template::widget::select_text->template::util::select_text::get_property

Testcases:
No testcase defined.

template::widget::attachment (public)

 template::widget::attachment element_reference tag_attributes

Render an attachment input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::submit template::widget::submit (public) template::widget::attachment template::widget::attachment template::widget::attachment->template::widget::input template::widget::attachment->template::widget::submit

Testcases:
No testcase defined.

template::widget::block (public)

 template::widget::block element_reference tag_attributes

Widget for blocks of radio-buttoned questions

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::block template::widget::block template::widget::block->template::widget::merge_tag_attributes

Testcases:
No testcase defined.

template::widget::button (public)

 template::widget::button element_reference tag_attributes

Render a button input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::button template::widget::button template::widget::button->template::widget::input

Testcases:
No testcase defined.

template::widget::checkbox (public)

 template::widget::checkbox element_reference tag_attributes

Render a checkbox input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::menu template::widget::menu (public) template::widget::checkbox template::widget::checkbox template::widget::menu->template::widget::checkbox template::widget::input template::widget::input (public) template::widget::checkbox->template::widget::input

Testcases:
No testcase defined.

template::widget::checkbox_text (public)

 template::widget::checkbox_text element_reference tag_attributes

Implements the complex widget checkbox_other which combines a checkbox widget with a text widget

Parameters:
element_reference (required)
tag_attributes (required)
Returns:
Error:
Author:
Timo Hentschel <timo@timohentschel.de>
Created:
2004-10-17

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) template::util::checkbox_text::get_property template::util::checkbox_text::get_property (public) template::util::list_to_lookup template::util::list_to_lookup (public) template::widget::input template::widget::input (public) template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::checkbox_text template::widget::checkbox_text template::widget::checkbox_text->_ template::widget::checkbox_text->template::util::checkbox_text::get_property template::widget::checkbox_text->template::util::list_to_lookup template::widget::checkbox_text->template::widget::input template::widget::checkbox_text->template::widget::merge_tag_attributes

Testcases:
No testcase defined.

template::widget::color (public)

 template::widget::color element_reference tag_attributes

Render a color input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::color template::widget::color template::widget::color->template::widget::input

Testcases:
No testcase defined.

template::widget::comment (public)

 template::widget::comment element_reference tag_attributes

Render a comment widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::menu template::widget::menu (public) template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::textarea template::widget::textarea (public) template::widget::comment template::widget::comment template::widget::comment->template::widget::menu template::widget::comment->template::widget::merge_tag_attributes template::widget::comment->template::widget::textarea

Testcases:
No testcase defined.

template::widget::email (public)

 template::widget::email element_reference tag_attributes

Render a email input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::email template::widget::email template::widget::email->template::widget::input

Testcases:
No testcase defined.

template::widget::file (public)

 template::widget::file element_reference tag_attributes

Generate a file widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_widget_file template_widget_file (test acs-templating) template::widget::file template::widget::file test_template_widget_file->template::widget::file template::widget::input template::widget::input (public) template::widget::file->template::widget::input template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::file->template::widget::merge_tag_attributes

Testcases:
template_widget_file

template::widget::hidden (public)

 template::widget::hidden element_reference tag_attributes
Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::hidden template::widget::hidden template::widget::input->template::widget::hidden

Testcases:
No testcase defined.

template::widget::inform (public)

 template::widget::inform element_reference tag_attributes

A static information widget that does not submit any data

Parameters:
element_reference (required)
tag_attributes (required)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

template::widget::input (public)

 template::widget::input type element_reference tag_attributes

General proc used by a wide variety of widgets to output input HTML tags.

Parameters:
type (required)
The type of widget (checkbox, radio, text etc)
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to hang on the input tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::attachment template::widget::attachment (public) template::widget::input template::widget::input template::widget::attachment->template::widget::input template::widget::button template::widget::button (public) template::widget::button->template::widget::input template::widget::checkbox template::widget::checkbox (public) template::widget::checkbox->template::widget::input template::widget::checkbox_text template::widget::checkbox_text (public) template::widget::checkbox_text->template::widget::input template::widget::color template::widget::color (public) template::widget::color->template::widget::input template::widget::hidden template::widget::hidden (public) template::widget::input->template::widget::hidden template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::input->template::widget::merge_tag_attributes

Testcases:
No testcase defined.

template::widget::menu (public)

 template::widget::menu widget_name options_list values_list \
    attribute_reference [ mode ] [ widget_type ]

Render a menu widget (a "select" dropdown menu by default).

Parameters:
widget_name (required)
Name of the widget
options_list (required)
List of option/value pairs (i.e. dropdown menu items)
values_list (required)
List of values (i.e. the selected default value)
attribute_reference (required)
Reference variable to the caller's tag_attributes param
mode (optional, defaults to "edit")
If "edit" the widget is rendered, otherwise values are passed along using hidden input HTML tags
widget_type (optional, defaults to "select")
Select, checkbox, etc
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::ampmFragment template::widget::ampmFragment (public) template::widget::menu template::widget::menu template::widget::ampmFragment->template::widget::menu template::widget::category template::widget::category (public) template::widget::category->template::widget::menu template::widget::comment template::widget::comment (public) template::widget::comment->template::widget::menu template::widget::monthFragment template::widget::monthFragment (public) template::widget::monthFragment->template::widget::menu template::widget::multiselect template::widget::multiselect (public) template::widget::multiselect->template::widget::menu template::util::list_to_lookup template::util::list_to_lookup (public) template::widget::menu->template::util::list_to_lookup template::widget::checkbox template::widget::checkbox (public) template::widget::menu->template::widget::checkbox template::widget::input template::widget::input (public) template::widget::menu->template::widget::input template::widget::radio template::widget::radio (public) template::widget::menu->template::widget::radio template::widget::select template::widget::select (public) template::widget::menu->template::widget::select

Testcases:
No testcase defined.

template::widget::merge_tag_attributes (public)

 template::widget::merge_tag_attributes element_reference \
    tag_attributes

Consolidates the logics to compute the final tag attributes by merging those explicitly supplied and those in the element definition.

Parameters:
element_reference (required)
tag_attributes (required)
Returns:
dict

Partial Call Graph (max 5 caller/called nodes):
%3 template::form::render template::form::render (private) template::widget::merge_tag_attributes template::widget::merge_tag_attributes template::form::render->template::widget::merge_tag_attributes template::widget::block template::widget::block (public) template::widget::block->template::widget::merge_tag_attributes template::widget::checkbox_text template::widget::checkbox_text (public) template::widget::checkbox_text->template::widget::merge_tag_attributes template::widget::comment template::widget::comment (public) template::widget::comment->template::widget::merge_tag_attributes template::widget::date template::widget::date (public) template::widget::date->template::widget::merge_tag_attributes

Testcases:
No testcase defined.

template::widget::multiselect (public)

 template::widget::multiselect element_reference tag_attributes

Render a select widget which allows any number of values to be selected.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::menu template::widget::menu (public) template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::multiselect template::widget::multiselect template::widget::multiselect->template::widget::menu template::widget::multiselect->template::widget::merge_tag_attributes

Testcases:
No testcase defined.

template::widget::number (public)

 template::widget::number element_reference tag_attributes

Render a number input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::number template::widget::number template::widget::number->template::widget::input

Testcases:
No testcase defined.

template::widget::party_search (public)

 template::widget::party_search element_reference tag_attributes

A widget that searches for parties (persons, groups and relational_segments) and lets the user select one from the search results.

It only searches in all parties from the system currently. It should probably be extended to allow one to restrict the search to a specific subsite, as well as searching only for groups or persons.

Parameters:
element_reference (required)
tag_attributes (required)
Author:
Tilmann Singer

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::select template::widget::select (public) template::widget::party_search template::widget::party_search template::widget::party_search->template::widget::input template::widget::party_search->template::widget::select

Testcases:
No testcase defined.

template::widget::password (public)

 template::widget::password element_reference tag_attributes

Generate a password input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::password template::widget::password template::widget::password->template::widget::input

Testcases:
No testcase defined.

template::widget::radio (public)

 template::widget::radio element_reference tag_attributes

Render a radio input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::menu template::widget::menu (public) template::widget::radio template::widget::radio template::widget::menu->template::widget::radio template::widget::input template::widget::input (public) template::widget::radio->template::widget::input

Testcases:
No testcase defined.

template::widget::radio_text (public)

 template::widget::radio_text element_reference tag_attributes

Implements the complex widget radio_text which combines a radio widget with a text widget

Parameters:
element_reference (required)
tag_attributes (required)
Returns:
Error:
Author:
Timo Hentschel <timo@timohentschel.de>
Created:
2004-10-17

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) template::util::list_to_lookup template::util::list_to_lookup (public) template::util::radio_text::get_property template::util::radio_text::get_property (public) template::widget::input template::widget::input (public) template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::radio_text template::widget::radio_text template::widget::radio_text->_ template::widget::radio_text->template::util::list_to_lookup template::widget::radio_text->template::util::radio_text::get_property template::widget::radio_text->template::widget::input template::widget::radio_text->template::widget::merge_tag_attributes

Testcases:
No testcase defined.

template::widget::search (public)

 template::widget::search element_reference tag_attributes

Return a widget consisting of either a search box or a search pull-down list. Here is an example of using the search widget with ad_form:

    ad_form -name test -form {
        {user:search,optional
            {result_datatype integer}
            {label "Email"}
            {help_text "Search for a user by email address"}
            {search_query {
                select email from cc_users where lower(email) like '%'||lower(:value)||'%'
            }}
        }
    }
Can be either a select widget initially if options supplied or a search box which on submit changes to a select widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
If the "options" attribute is passed in, a select widget is created, otherwise a search box.
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::select template::widget::select (public) template::widget::search template::widget::search template::widget::search->template::widget::input template::widget::search->template::widget::select

Testcases:
No testcase defined.

template::widget::select (public)

 template::widget::select element_reference tag_attributes

Render a select widget which allows only one value to be selected.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::menu template::widget::menu (public) template::widget::select template::widget::select template::widget::menu->template::widget::select template::widget::party_search template::widget::party_search (public) template::widget::party_search->template::widget::select template::widget::search template::widget::search (public) template::widget::search->template::widget::select template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::select->template::widget::merge_tag_attributes

Testcases:
No testcase defined.

template::widget::select_text (public)

 template::widget::select_text element_reference tag_attributes

Implements the complex widget select_text which combines a select widget with a text widget

Parameters:
element_reference (required)
tag_attributes (required)
Returns:
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-07-18

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) template::util::select_text::get_property template::util::select_text::get_property (public) template::widget::input template::widget::input (public) template::widget::menu template::widget::menu (public) template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::select_text template::widget::select_text template::widget::select_text->_ template::widget::select_text->template::util::select_text::get_property template::widget::select_text->template::widget::input template::widget::select_text->template::widget::menu template::widget::select_text->template::widget::merge_tag_attributes

Testcases:
No testcase defined.

template::widget::submit (public)

 template::widget::submit element_reference tag_attributes

Render a submit input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::attachment template::widget::attachment (public) template::widget::submit template::widget::submit template::widget::attachment->template::widget::submit template::widget::input template::widget::input (public) template::widget::submit->template::widget::input

Testcases:
No testcase defined.

template::widget::tel (public)

 template::widget::tel element_reference tag_attributes

Render a tel input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::tel template::widget::tel template::widget::tel->template::widget::input

Testcases:
No testcase defined.

template::widget::text (public)

 template::widget::text element_reference tag_attributes

Generate a text widget (not to be confused with textarea)

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) template::util::spellcheck::spellcheck_properties template::util::spellcheck::spellcheck_properties (public) template::widget::input template::widget::input (public) template::widget::menu template::widget::menu (public) template::widget::text template::widget::text template::widget::text->_ template::widget::text->template::util::spellcheck::spellcheck_properties template::widget::text->template::widget::input template::widget::text->template::widget::menu

Testcases:
No testcase defined.

template::widget::textarea (public)

 template::widget::textarea element_reference tag_attributes

A widget for the HTML form input textarea element. Includes spellchecker.

Parameters:
element_reference (required)
Reference to the form element.
tag_attributes (required)
Html attributes to set in the widget.
Returns:
Form HTML for widget
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::comment template::widget::comment (public) template::widget::textarea template::widget::textarea template::widget::comment->template::widget::textarea _ _ (public) template::widget::textarea->_ template::util::spellcheck::spellcheck_properties template::util::spellcheck::spellcheck_properties (public) template::widget::textarea->template::util::spellcheck::spellcheck_properties template::widget::menu template::widget::menu (public) template::widget::textarea->template::widget::menu template::widget::merge_tag_attributes template::widget::merge_tag_attributes (public) template::widget::textarea->template::widget::merge_tag_attributes template::widget::textarea_internal template::widget::textarea_internal (private) template::widget::textarea->template::widget::textarea_internal

Testcases:
No testcase defined.

template::widget::url (public)

 template::widget::url element_reference tag_attributes

Render a URL input widget.

Parameters:
element_reference (required)
Reference variable to the form element
tag_attributes (required)
HTML attributes to add to the tag
Returns:
Form HTML for widget

Partial Call Graph (max 5 caller/called nodes):
%3 template::widget::input template::widget::input (public) template::widget::url template::widget::url template::widget::url->template::widget::input

Testcases:
No testcase defined.
[ show source ]