template::widget::comment (public)

 template::widget::comment element_reference tag_attributes

Defined in packages/acs-templating/tcl/widget-procs.tcl

Render a comment widget.

Parameters:
element_reference - Reference variable to the form element
tag_attributes - 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::textarea template::widget::textarea (public) template::widget::comment template::widget::comment template::widget::comment->template::widget::menu template::widget::comment->template::widget::textarea

Testcases:
No testcase defined.
Source code:

    upvar $element_reference element

    if { [info exists element(html)] } {
        array set attributes $element(html)
    }

    array set attributes $tag_attributes

    set output {}

    if { [info exists element(history)] } {
        append output "$element(history)"
    }

    if {$element(mode) eq "edit"} {
        if { [info exists element(header)] } {
            append output "<p><b>$element(header)</b></p>"
        }

        append output [textarea $element_reference $tag_attributes]

        if { [info exists element(format_element)]
             && [info exists element(format_options)]
         } {
            append output "<br>Format: [menu $element(format_element) $element(format_options) {} {}]"
        }
    }

    return $output
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-templating/tcl/widget-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: