Up to [Local Repository] / interchange / code / Widget
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Fix incorrect license in headers GPL v2 -> GPL v2 "or later". Update copyrights.
Fix incorrect license in headers GPL v2 -> GPL v2 "or later". Update copyrights.
* Add header and license information
* Add descriptions to widgets
* Remove "File Upload" tab from meta_editor, which only served one widget. * Relocate name_to and size_to from "File Upload" to ExtraMeta for uploadblob widget, where it now belongs.
* Add ability for Vend::Data::update_data to store filename and file size info in one upload. Adds the variable definitions: mv_data_file_name_to_$name mv_data_file_size_to_$name For instance, if you do: <INPUT TYPE=hidden NAME="mv_data_file_name_to_body" VALUE="filename"> <INPUT TYPE=hidden NAME="mv_data_file_size_to_body" VALUE="size"> <INPUT TYPE=hidden NAME="mv_data_file_field" VALUE="body"> <INPUT TYPE=file NAME="body"> the uploaded file would be stored to the "body" field, its name to "filename", and its size to "size". Size is a simple integer with all its implied limits. In actual practice HTTP server timeouts and browser file upload limits will ensure the value is large enough. * Add new uploadblob widget with core and meta-editor support. If you have a BLOB field and want to upload files to it, select the "uploadblob=File upload to BLOB" widget. It will present a file upload widget, and provide the proper fields to do the upload. If you select the extended.size_to = <fieldname> option in the meta editor, the size of the uploaded file will be stored to <fieldname>. Ditto for extended.name_to, which stores the file name (minus prepending path) to <fieldname>. For example, you might do: [display type=uploadblob name=body size_to=size name_to=filename ] This will produce: <INPUT TYPE=hidden NAME="mv_data_file_name_to_body" VALUE="filename"> <INPUT TYPE=hidden NAME="mv_data_file_size_to_body" VALUE="size"> <INPUT TYPE=hidden NAME="mv_data_file_field" VALUE="body"> <INPUT TYPE=file NAME="body"> * Add ability to define your widget types for display in the meta editor in the Variable UI_WIDGET_TYPES. Includes metadata formatting for the Preferences editor.