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.50.8.4 -r1.50.8.5 --- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 11 Oct 2013 09:49:13 -0000 1.50.8.4 +++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 23 Oct 2014 07:21:36 -0000 1.50.8.5 @@ -486,24 +486,46 @@ return [input password element $tag_attributes] } - ad_proc -public template::widget::hidden { element_reference tag_attributes } { - Render a hidden input widget. @param element_reference Reference variable to the form element @param tag_attributes HTML attributes to add to the tag @return Form HTML for widget } { - upvar $element_reference element - return [input hidden element $tag_attributes] + # + # If there is a "values" element provided, but no "value", treat + # this a multivalued (multiple) entry. + # + + if { [info exists element(values)] && ![info exists element(value)] } { + ns_log notice "hidden form element with multiple values: <$element(values)>" + set output {} + set count 0 + foreach itemvalue $element(values) { + append output [subst { + + }] + incr count + } + return $output + + } else { + + # + # Standard case + # + return [input hidden element $tag_attributes] + } + } + ad_proc -public template::widget::submit { element_reference tag_attributes Index: openacs-4/packages/file-storage/www/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/delete.tcl,v diff -u -r1.7.6.2 -r1.7.6.3 --- openacs-4/packages/file-storage/www/delete.tcl 5 Aug 2014 17:46:33 -0000 1.7.6.2 +++ openacs-4/packages/file-storage/www/delete.tcl 23 Oct 2014 07:21:35 -0000 1.7.6.3 @@ -1,37 +1,31 @@ ad_page_contract { delete items } { - object_id:naturalnum,notnull,multiple + object_id:multiple,naturalnum,notnull {confirm_p:optional,boolean 0} {return_url ""} -} -errors {object_id:,notnull,integer,multiple {Please select at least one item to delete.} } + set user_id [ad_conn user_id] - template::list::create \ - -name delete_list \ - -multirow delete_list \ - -key fs_object_id \ - -no_data "No items selected" \ - -elements { - name { - label "\#file-storage.Name\#" - } - delete_message { - label "" - } - } +template::list::create \ + -name delete_list \ + -multirow delete_list \ + -key fs_object_id \ + -no_data "No items selected" \ + -elements { + name { + label "\#file-storage.Name\#" + } + delete_message { + label "" + } + } set allowed_count 0 set not_allowed_count 0 -# make sure none of these items are root folders. There is no way to -# click a checkbox, but who knows how the item_id might get in there -if {[llength $object_id] == 1} { - set object_id [split [lindex $object_id 0]] -} - set root_folders_count [db_string count_root_folders "" -default 0] if {$root_folders_count > 0} { ad_complain [_ file-storage.lt_You_may_not_delete_th] @@ -52,13 +46,12 @@ } set total_count [template::multirow size delete_list] - set delete_inform [_ file-storage.lt_Do_you_want_to_delete] -ad_form -name delete_confirm -cancel_url $return_url -form { +ad_form -name delete_confirm -method GET -cancel_url $return_url -form { {notice:text(inform) {label ""} {value $delete_inform}} {return_url:text(hidden) {value $return_url}} - {object_id:text(hidden) {value $object_id}} + {object_id:naturalnum(hidden) {values $object_id}} } ad_form -extend -name delete_confirm -on_submit { Index: openacs-4/packages/file-storage/www/file-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/file-add.tcl,v diff -u -r1.17.2.8 -r1.17.2.9 --- openacs-4/packages/file-storage/www/file-add.tcl 6 Aug 2014 16:08:43 -0000 1.17.2.8 +++ openacs-4/packages/file-storage/www/file-add.tcl 23 Oct 2014 07:21:35 -0000 1.17.2.9 @@ -188,7 +188,7 @@ set upload_files [list $title] set upload_tmpfiles [list $tmp_filename] } - ns_log notice "file_add mime_type='${mime_type}'" + # ns_log notice "file_add mime_type='${mime_type}'" set i 0 set number_upload_files [llength $upload_files] foreach upload_file $upload_files tmpfile $upload_tmpfiles {