Class ::xowiki::includelet::composite-form (public)
::xowiki::IncludeletClass ::xowiki::includelet::composite-form
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
Create a form from the selection
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowiki::includelet {} ::nsf::object::alloc ::xowiki::IncludeletClass ::xowiki::includelet::composite-form {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :aggregating false set :cacheable false set :localized true set :personalized true} ::xowiki::includelet::composite-form instproc render {} { :get_parameters set inner_html [next] #:log "innerhtml=$inner_html" regsub -nocase -all "<form " $inner_html "<div class='form' " inner_html regsub -nocase -all "<form>" $inner_html "<div class='form'>" inner_html regsub -nocase -all "</form *>" $inner_html "</div>" inner_html dom parse -simple <form>$inner_html</form> doc $doc documentElement root set fields [$root selectNodes "//div\[@class = 'wiki-menu'\]"] foreach field $fields {$field delete} set inner_html [$root asHTML] set id ID[${:__including_page} item_id] set base [${:__including_page} pretty_link] #set id ID$item_id #$root setAttribute id $id set as_att_value [::xowiki::Includelet html_encode $inner_html] set save_form [subst { <p> <a id='$id-control' href='#'>Create Form from Content</a> </p> <span id='$id' style='display: none'> Form Name: <form action="$base?m=create-new" method='POST' style='display: inline'> <input name='class' type='hidden' value="::xowiki::Form"> <input name='content' type='hidden' value="$as_att_value"> <input name='name' type='text'> </form> </span> }] template::add_event_listener -id $id-control -script [subst {document.getElementById("$id").style.display="inline";}] return $inner_html$save_form } ::xowiki::includelet::composite-form instparametercmd parameter_declaration ::nsf::relation::set ::xowiki::includelet::composite-form superclass ::xowiki::includelet::selection ::nx::slotObj -container slot ::xowiki::includelet::composite-form ::xowiki::includelet::composite-form::slot eval {set :__parameter { {parameter_declaration { {-edit_links:boolean false} {-pages ""} {-ordered_pages} }} }} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::composite-form::slot::parameter_declaration {set :accessor public set :configurable true set :convert false set :default { {-edit_links:boolean false} {-pages ""} {-ordered_pages} } set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::composite-form set :incremental 0 set :manager ::xowiki::includelet::composite-form::slot::parameter_declaration set :methodname parameter_declaration set :multiplicity 1..1 set :name parameter_declaration set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle