Index: openacs-4/packages/acs-templating/tcl/data-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/data-procs.tcl,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-templating/tcl/data-procs.tcl 24 Jan 2003 09:31:40 -0000 1.6.2.2 +++ openacs-4/packages/acs-templating/tcl/data-procs.tcl 21 Feb 2003 12:25:22 -0000 1.6.2.3 @@ -10,7 +10,20 @@ # http://www.fsf.org/copyleft/gpl.html ad_proc -public template::data::validate { type value_ref message_ref } { + This proc invokes the validation code for a given type. + @see template::data::validate::boolean + @see template::data::validate::date + @see template::data::validate::email + @see template::data::validate::filename + @see template::data::validate::integer + @see template::data::validate::keyword + @see template::data::validate::search + @see template::data::validate::string + @see template::data::validate::text + @see template::data::validate::url +} { + return [validate::$type $value_ref $message_ref] } @@ -65,6 +78,12 @@ return 1 } +ad_proc -public template::data::validate::string { value_ref message_ref } { + + # anything is valid for string + return 1 +} + ad_proc -public template::data::validate::keyword { value_ref message_ref } { upvar 2 $message_ref message $value_ref value @@ -108,7 +127,7 @@ upvar 2 $message_ref message $value_ref value - set expr {^(http://)?([a-zA-Z0-9_\-\.]+(:[0-9]+)?)?[a-zA-Z0-9_.%/?=&-]+$} + set expr {^(https?://)?([a-zA-Z0-9_\-\.]+(:[0-9]+)?)?[a-zA-Z0-9_.%/?=&-]+$} set result [regexp $expr $value] if { ! $result } { Index: openacs-4/packages/acs-templating/tcl/element-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/element-procs.tcl,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/acs-templating/tcl/element-procs.tcl 24 Sep 2002 09:06:04 -0000 1.9 +++ openacs-4/packages/acs-templating/tcl/element-procs.tcl 21 Feb 2003 12:25:22 -0000 1.9.2.1 @@ -10,11 +10,12 @@ # License. Full text of the license is available from the GNU Project: # http://www.fsf.org/copyleft/gpl.html ad_proc -public element { command form_id element_id args } { - form is really template::element although when in - the "template" namespace you may omit the - template:: + element is really template::element although when in the + "template" namespace you may omit the template:: qualifier. + See the template::form api for creating the form element container. @see template::element + @see template::form } - ad_proc -public template::element { command form_id element_id args } { @@ -96,7 +97,12 @@ @option optional A flag indicating that no value is required for this element. If a default value is specified, the default is used instead. + + @see template::widget + @see template::data::validate + @see template::form::create } { + set level [template::adp_level] # add the element to the element list Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 24 Sep 2002 09:06:04 -0000 1.7 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 21 Feb 2003 12:25:22 -0000 1.7.2.1 @@ -18,12 +18,14 @@ template:: @see template::form + @see template::element } - ad_proc -public template::form { command args } { - template::form command invokes form functions. - Please see the individual functions for - their arguments. + + template::form command invokes form functions. Please see the + individual functions for their arguments. The template::element + api is used to manipulate form elements. @see template::form::create @see template::form::exists @@ -36,6 +38,7 @@ @see template::form::section @see template::form::set_values @see template::form::size + @see template::element } { eval template::form::$command $args } Index: openacs-4/packages/acs-templating/tcl/widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/widget-procs.tcl,v diff -u -r1.14 -r1.14.2.1 --- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 15 Sep 2002 20:48:59 -0000 1.14 +++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 21 Feb 2003 12:25:22 -0000 1.14.2.1 @@ -9,7 +9,32 @@ # This is free software distributed under the terms of the GNU Public # License. Full text of the license is available from the GNU Project: # http://www.fsf.org/copyleft/gpl.html +ad_proc -public template::widget {} { + The template::widget namespace contains the code + for the various input widgets. + @see template::data::transform::search + @see template::widget::button + @see template::widget::checkbox + @see template::widget::comment + @see template::widget::file + @see template::widget::hidden + @see template::widget::inform + @see template::widget::input + @see template::widget::menu + @see template::widget::multiselect + @see template::widget::password + @see template::widget::radio + @see template::widget::search + @see template::widget::select + @see template::widget::submit + @see template::widget::text + @see template::widget::textarea + + @see template::element::create +} - + + ad_proc -public template::widget::search { element_reference tag_attributes } { upvar $element_reference element