HTML-FormHandler-0.40064 000755 000770 000024 0 12576552253 14401 5 ustar 00gshank staff 000000 000000 TODO 100644 000770 000024 174 12576552253 15134 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 Unique support for non-top-level fields?
Improve example of Repeatable form (BookDB, User) to do adds & deletes with js
README 100644 000770 000024 445 12576552253 15325 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064
This archive contains the distribution HTML-FormHandler,
version 0.40064:
HTML forms using Moose
This software is copyright (c) 2014 by Gerda Shank.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Changes 100644 000770 000024 102015 12576552253 16014 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 0.40064 Thu Sep 17, 2015
Don't warn about date format unless set to `date`
Wrap checkbox in CheckboxGroup, if requested
Create es_es.pm
Create ca_es.pm
select field invalid value message: encode the select value
typo in link to the example app
remove css_class from Captcha field
0.40063 Mon Jun 29, 2015
Raised Moose prereq to 2.1403 because 2.0604 causes failing tests
0.40062 Fri Jun 25, 2015
Separate out test using Type::Tiny::Enum to skip_all
0.40061 Thu Jun 25, 2015
Add skip for Type::Tiny::Enum
0.40060 Wed Jun 24, 2015
Field validation can use Type::Tiny subclasses
Replace NoTabTests and EOLTests
switch from List::AllUtils+List::MoreUtils to List::Util (in core)
add render_elementx and renderx methods to allow setting attributes at render time
Warning if Date field is html5 and not ISO
0.40059 Thu Feb 25, 2015
Remove clear->item_id that snaked in via merge error
Pass subfield name to repeatable element wrapper
0.40058 Thu Feb 25, 2015
add HorizCheckboxGroup for alternative CheckboxGroup rendering
minor doc typos
do $class->meta->make_immutable after new_with_traits
Czech translation
'get_errors' synonym for 'errors' on form
add repeatable_element_wrapper ability
0.40057 Fri Aug 1, 2014
added support for tag 'inline' in bootstrap3 wrapper
add test for inline-checkboxes
add test for prefilled with init_object form reuse
clear item and init_object which are required for form reuse
add failing test for element_class override through build_update_subfields
add a bit of doc about handling DBIC new results & 'use_default_over_obj'
=encoding utf-8 in Manual/Rendering.pod
remove deprecated css_class and input_class attributes
add param_to_values method to convert parameters to init_object-like hashref
Add code to respect the label_no_filter tag on checkboxes for Bootstrap
and the Base widgets.
fix bootstrap3 input_append_button
Respect label_no_filter on checkbox labels.
add Arabic translations
use time_zone and locale options in Date field
0.40056 Mon Feb 20, 2014
use sorted_fields in 'dump_validated'
added Type::Tiny support
Use alert-danger rather than alert-error with in Bootstrap3
Fixes RT#91966 (deprecated way to call enum warning)
bug in reloading repeatable fields; skip inactive fields
0.40055 Thu Jan 2, 2014
handle SelectCSV field in as_label method of Select field
2014 bug in t/compound/basic.t test (rt91793)
0.40054 Tue Nov 26, 2013
Check for old unimplemented parameter to wrap_checkbox, and check
for existence of option_wrapper
add language handle to bootstrap3 tests
pass event to repeatable js click handler
stop forcing undefined Checkbox fields to 0; didn't allow undef for value
different inline class for Bootstrap3 for checkboxes and radios
select options: add coercion of arrayref of hashrefs from arrayref of strings
allow Date field to use DateTime subclasses
0.40053 Tue Oct 22, 2013
Bad version number on prereq
0.40052 Mon Oct 21, 2013
allow overriding layout_classes in Bootstrap3 wrapper
allow passing in value to 'as_label' method in Select field
0.40051 Thu Oct 17, 2013
Update Italian message file
Minor doc updates
add errors_by_name and errors_by_id to result
add Bootstrap3 theme for those using the Bootstrap theme
better form-horizontal Bootstrap 3.0 support
provide method in result (form_and_field_errors) to return form and field errors
0.40050 Thu Sep 26, 2013
*** 'widget_tags' in a field have been deprecated for a long time; removing.
There are still widget_tags in the form and compound fields.
Use 'tags' in a field instead.
*** Initial support of Bootstrap3 - still EXPERIMENTAL. Do not use in
production yet. Changes in interface may occur over the next few weeks.
Supporting Bootstrap 3.0 required a surprising amount of minor refactoring:
Bootstrap3 checkboxes and radio elements now have an additional div wrapping them.
This required setting flags in the wrapper that could be seen by the
field widgets. Used 'wrapper_tags' attribute, which is not the most satisfying
solution but does work. The former 'controls' div now doesn't have the
'controls' class, but is used for sizing. Added new attribute
'element_wrapper_class' to provide these classes. Split out addition of
classes to the wrapper and element into 'add_standard_wrapper_classes' and
'add_standard_element_classes', because B3.0 now wants 'has-error' and
'has-warning' instead of the former 'error' class. 'control-group' was
changed to 'form-group'. The 'form-control' class has been added to
text, password, textarea, and select fields.
Add 'preserve_case' attribute to Email field
0.40028 Sat Sep 21, 2013
Fixed bug when rendering blocks with 'run' (results)
Sort the deflated values of SelectCSV field
Allow passing Email::Valid params to Email field
Typos fixed
Add 'use_init_obj_when_no_accessor_in_item' flag for dual-purpose init_obj
0.40027 Thu Aug 8, 2013
Add 'options_ref' method for using options in TT templates
Add unique messages to field messages hash
0.40026 Wed Jul 3, 2013
Add Italian message file
Doc tweaks
Add errors_by_id and errors_by_name convenience methods
0.40025 Thu May 9, 2013
Add skip in t/setup_form_config.t unless YAML::Syck (Config::Any)
0.40024 Tue May 7, 2013
Add 'no_option_validation' flag to select field.
Remove HtmlArea field. (Has always been broken, and there were complaints about
not prereqing HTML::Tidy, which I won't do due to difficulty of installing)
Change 'use' of GD::SecurityImage to a 'require'. (Will not prereq this one either.)
0.40023 Tue Apr 30, 2013
Add Brazilian Portuguese translation file
Fix bug in process of re-loading repeatables without primary keys after db update
Add TextCSV field for multiple values in a text field (useful with js libraries)
0.40022 Mon Mar 18, 2013
Remove 'writeonly' flag from Display field, because fix to not pull
values from an item/init_object with that flag meant that values were not
being applied to Display fields, when people were relying on that.
Switch to using github issues instead of RT
0.40021 Mon Mar 4, 2013
Don't validate disabled fields
check for existence of field in match_when before getting $field->fif,
improve error message
add type_attr to Select field; update t/render/ff.t to use it
cleanup select field options_method building
0.40020 Sun Feb 20, 2013
More support for repeatable javascript:
Tweak Bootsrap wrapper to check do_wrapper instead of do_label when rendering
'controls' div
Reminder: It's always a good idea to make your own set of of widgets so that
updates don't throw off your rendering. This change was hardly noticeable
in the FH testcases, but it's possible you were relying on the old behavior
for CSS.
Add 'controls_div' to Simple wrapper.
Add RmElement example field.
0.40019 Fri Feb 8, 2013
Move back 'before_element' tag; breaks existing rendering. Add additional
'before_element_inside_div' tag instead.
0.40018 Thur Feb 7, 2013
Don't put 'control-group' on Bootstrap hidden field div because of spacing issues
Support for repeatable add/remove javascript
add 'setup_for_js' flag to Field::Repeatable
add HTML::FormHandler::Render::RepeatableJs
add HTML::FormHandler::Field::AddElement
add before_wrapper and after_wrapper tags
add 'id' to wrappers of compound fields
update Display field to use 'render_method'
allow applying wrapper widget even if field has render method
Fix positioning of 'before_element' tag in Bootstrap wrapper
0.40017 Sat Dec 1, 2012
Fix bad html in Span widget
Fix unitialized warning processing has_field with '+'
Use get_default_value in Submit/Reset field
Improve doc for bootstrap theme, use BootstrapFormMessages role
Add lazy to render_filter for random failures in 5.17.6
0.40016 Mon Oct 15, 2012
Fix bug with DBIC model interface
0.40015 Sun Oct 14, 2012
Remove extraneous use of Data::Printer
Correct spelling of PadWalker
0.40014 Sat Oct 13, 2012
Add useful message and die in field widgets with no result
Use string instead of object in LANGUAGE_HANDLE
Fix bug in required_when when value is 0
Allow using arrayref for sort_column.
Select field as_label for multiple fields.
Minor doc fixes
Bug - option group label attributes
Add info_message to form and rendering.
Add 'use_fields_for_input_without_param' flag
Call inflate_default_method on repeatable elements
0.40013 Sun Jun 24, 2012
Re-write elimination of PrimaryKey field from repeatable value,
add 'no_value_if_empty' attribute
Fix bug with labels '0' not being displayed
Change 'missing' to an attribute.
Submit field has 'submit' html5_type_attr
Add html5_type_attr to Hidden, Reset, and Password fields
Add new behavior for compound fields and 'not_nullable' flag,
where compound field value is not set to undef when all
subfields are empty. This is needed for some kinds of db
relationships, to ensure that subfields are set to null.
0.40012 Fri Jun 15, 2012
Bug cloning merging repeatable instances; form reference garbage collected
Doc typos
0.40011 Tue Jun 5, 2012
Remove automatic building of field results. If you have field tests, you
need to add $field->build_result after creating field with 'new'.
Possible memory cycle if result is accessed when not built.
Add 'required_when'
Add Bulgarian message file (dpetrov)
Bootstrap input_append/prepend: no linefeeds between input
Add input_append_button tag to Bootstrap wrapper
Correct camelcase for widgets in two fields
Add 'value_when_empty' for multiple select
Add SelectCSV multiple field
Change Select to use sort_options_method for sorting
0.40010 Sun May 20, 2012
Add 'when' clause to apply actions
Fix memory leak on fields with defaults due to missing 'my' causing
$self to be closed over so that RAM was leaked if forms were constructed
but never processed. (in default_ & validate_
methods)
0.40009 Mon May 14, 2012
Re-implement improved version of 'reload_after_update'.
0.40008 Fri May 11, 2012
Add 'missing' method to Field
Use result in Bootstrap render_form_messages
Fix Render::Table
Propagate errors when they're added, so $form->has_errors
works in sub validate
Use do_render_label in Bootstrap wrapper to allow setting
label class/attributes
Add subfield convenience method.
Remove 'reload_after_update'. Didn't work anyway. Bug: duplicate
results with repeatables. (avoid with reload_after_update => 0)
Re-factor RadioGroup widget to allow individually rendered options
Support option groups in 'Select', 'RadioGroup' & 'CheckboxGroup' widgets
0.40007 Tues Apr 24, 2012
Re-factor widget to provide 'render_element' method
Various doc updates
Move 'by_flag' processing into '_merge_updates'
Handle disabled fields better; result_from_fields if no input
Fix bug: html_attributes callback called with 'input' instead of 'element'
0.40006 Tues Apr 10, 2012
Render::Table incorrect table start
Minor doc cleanup
Add 'build_label_method'
Re-do merging of widget_tags
Implement experimental 'include' list for Form/Compound fields
Refactor merge_updates and update_subfields to handle contains
Add 'by_type' to update_subfields
0.40005 Mon Mar 26, 2012
prevent undef from being passed to maketext
expand use of 'posted' flag to check false values
add wrap_label method
0.40004 Fri Mar 23, 2012
Don't put element attributes on select options
Make render_list lazy
Better defaults for compound fields
Provide package name for die when not extending
Add block_list to provide blocks
Defaults for repeatable fields
0.40003 Wed Mar 14, 2012
Move dfv test that fails prereqs
0.40002 Tue Mar 13, 2012
Put form wrappers that are fieldsets inside form tag; outside not legal HTML
Doc updates
Add 'NonEditable' field and 'Span' field widget
Patch HTMLAttributes (compatibility for older style custom widgets)
0.40001 Wed Mar 7, 2012
Remove \K in regex for ucc_widget; doesn't work pre 5.10
Switch DateTime field to use inflate_default_method
0.40000 Tue Mar 6, 2012
**** There are many changes to rendering, many of them incompatible.
These changes *will* break existing form rendering.
You must check that your rendering works before upgrading. Making a copy
of the old code (the widget and rendering roles) may be helpful (or use
the compatibility libraries -- see below).
I always prefer to maintain backward compatibility if possible, but
a number of the improvements were not possible without breaking
compatibility, so I did a lot of changes at once.
Compatibility libraries are provided to help support rendering that relied
on the earlier libriaries at:
git://github.com/gshank/html-formhandler_pre-0.40_compat.git
README at: https://github.com/gshank/html-formhandler_pre-0.40_compat/blob/master/README
Add Twitter Bootstrap 2.0 widget wrapper
Add 'no_update' flag to allow skipping model_update.
Remove 'deflate_to' flag; provide new inflation/deflation methods.
see HTML::FormHandler::Manual::InflationDeflation
New 'build_id_method' to provide different builder method for field IDs.
'auto_fieldset' and 'no_auto_fieldset' no longer used. No automatic fieldsets.
Can be added with do_wrapper => 1 and a tag of wrapper_tag => 'fieldset'
Localize the value of the reset button.
Tests and fix for form 'validate_' and 'default_' method
for repeatables fields.
Change default radiogroup rendering to not use elements. Add back
with tag radio_br_after => 1
Switch to using coderef for deflate_method; custom fields with deflate sub
will need to be modified.
Add block rendering (HTML::FormHandler::Blocks)
Re-do code for default & validate method construction; now provides
'default_method' and 'validate_method' coderef setting
Remove 'init_value_*' from Field (deprecated for years).
Use Hash::Merge in merging update field info on creation
Fix bug in copying tags to fields by cloning field definitions
Switch to using name 'element_attr' in fields instead of 'html_attr'
Put wrapper class 'hfh-repinst' on Repeatable Instances unless they already have a wrapper class
Remove 'javascript' field attribute. Put into *_attr hashref.
Automatically put 'error' on element and wrapper.
Switch to having the 'class' as a separate attribute from the _attr collection.
Use 'element_class', 'wrapper_class' & 'label_class' arrayrefs
Switch to having widget names by default be camel case; provide convenience
methods for templates - uwidget, uwrapper, twidget, twrapper.
** this change will affect existing template systems, if they use the
$field->widget method to get the widget name. See example templates.
and conversion methods 'ucc_widget' and 'cc_widget' in HTML::FormHandler::Render::Util
Create t/share/templates/form/form_in_one.tt
Switch default rendering of checkbox to have label wrap input. Checkboxes are
complicated. See t/render/checkbox.t for various options.
Add 'build_update_subfields' to 'update_fields' processing to allow moving
more of rendering settings into a separate role
Change form 'html_attr' to 'form_element_attr', and use builder
Change interface of html_field_attributes to also return attr (instead of just in-place)
Remove 'label_no_colon', make labels without colon the default.
Add widget tag 'label_after'. Use "label_after => ': '" for old behavior
Add widget tag 'label_tag'. Default 'label'.
Widget_tags replaced with 'form_tags' in form and 'tags' in Field.
takes builder 'build_form_tags' instead of default
Repeatable elements get automatic 'div' wrapper
Remove attribute 'auto_fieldset'; wrapping form is no longer a default;
Add back with sub build_do_form_wrapper {1},
and form_tags => { wrapper_tag => 'fieldset' }
Remove automatic wrapping of compounds.
Enable wrapping with do_wrapper => 1 (there's also do_label => 1)
Put form wrapper around form tag instead of inside
wrapper_start and wrapper_end tags not used to skip wrapper; use do_wrapper => 0
The 'get_tag' method now returns '' instead of undef if tag doesn't exist.
0.36001 Tues Jan 24, 2012
Add two more widget tags: 'no_auto_fieldset' and 'no_compound_wrapper'
Remove automatic addition of 'class="label"' to labels; if you want that
behavior, add it in with form sub field_html_attributes.
Add 'SKIP' to t/config.t test for Template.
Update Captcha so it might actually work.
0.36000 Sun Jan 22, 2012
Switch to using 'process_attrs' function to process attributes in rendering;
*** There were lots of updates to rendering. You should verify your custom
rendering, to make sure that nothing has broken. The '_add_html_attributes'
method is no longer used.
Add shorthand method for setting defaults in fields
Add widget_tags 'label_no_colon' & 'wrapper_tag'
Update and reorganize TT templates
Add flags 'use_defaults_over_obj' & 'use_init_obj_over_item'
Add 'num_extra' to Repeatable
Update Turkish message file; add Float field
Add lazy to 'html' attribute in Display field
Add 'label_attr' and 'wrapper_attr' to Field
Add 'Array' trait to field_name_space and widget_name_space
Bug with selected/checked hash key in Multiple; switch to creating default
Bug with repeatable contains; not using full name for accessor.
Die if using HTML::FormHandler::Moose without HTML::FormHandler
Field::TextArea extends Field::Text to reuse its validations (min/max length)
Add is_html5 attribute to forms which causes forms to have the additional
HTML 5 attributes which can be used by HTML 5 capable clients for validation
0.35005 Sat Oct 8, 2011
Fix bug repeatable result not returned for num_when_empty
Fix bug repeatable required flag not propagated
Fix bug building nested compound fields
Allow html attributes on radio group elements
Undefined string warning in select rendering
Add Japanese message file
0.35004 Wed Oct 5, 2011
Fix bug setting multiple selects with init_object
Provide html_attr for form attributes
Use Moose type for field_name_space and widget_name_space
0.35003 Wed Sep 7, 2011
Fix bug constructing classes for Class::Load, revealed by Class::Load 0.10
0.35002 Mon Aug 8, 2011
Change to use Class::Load due to speed.
0.35001 Mon Jul 25, 2011
Undid setting processed flag when building result in BUILD. Breaks
existing apps. Re-thinking that part for now.
0.35000 Thu Jul 21, 2011
Add support for tabindex attribute.
Generic html attribute setting (html_attr)
Set 'processed' flag when building results in BUILD to fix problem
with garbage collected results.
*** it's possible that this may break code if field values were being
set outside of FormHandler, or params were set on new. Pass params
on process. Set fields inside FormHandler, or run clear first, then
set values. In general, it works best to update fields inside a
FormHandler class, in a method or method modifier.
Building results in 'new' happened originally because people expected
to be able to do $form->render after new, without process. But you're
better off always running 'process'.
Add flag 'no_preload' to skip building results in new (BUILD) if not needed
Add flag 'no_widgets' to skip applying widgets to fields if not needed
Fix for Date fields in compounds.
Types Printable & SingleWord use class messages
Add link to the bug tracker into the HELP section in the Pod.
Change how field_traits work: apply traits to field objects, add
new class method apply_traits (Stephen Thirlwall)
0.34001 Mon May 16, 2011
Fiz another memory cycle using Select field
Tweak code creating results for Field testing
0.34000 Mon May 16, 2011
Fixed memory cycles; 1 in HFH code, others by requiring Moose 2.0007
Localize value of a button
Allow limited use of has_many multiple select
Add SimpleInline & TableInline widgets to not wrap compound fields
0.33002 Tues Feb 22, 2011
Accidentally left off compatibility for 'required_message' attribute
messages => { required => '...' } is new style and worked
0.33001 Mon Feb 21, 2011
Remove unnecessary with of HFH::Validate::Actions
0.33000 Mon Feb 21, 2011
bug - empty_select check defined
Add button field, widget, template
Check html attributes for definedness not truth
Add ability to set field inactive on new & process
in addition to setting active
Move 'no_render_label' into Field
Use form's language_handle in fields
Improve PrimaryKey doc
Return empty hashref from $form->value instead of undef
Merge experimental Wizard into master
Render disabled select options
Repeatable contains rendering incorrectly, skipping empty elements
Add rendering of form_errors to widgets and Render::Simple
*** If you were using form_errors (there are none by default)
and were using HFH rendering, check for compatibility
Allow specifying full class for widget with '+'
Document removing wrapper div from Simple wrapper
Re-do how field messages are stored and accessed. Use messages => {...}
instead of various _message attributes
Add utilities in util to pull out class messages and check I18N
Update I18N messages files (those that were provided by translators)
Change render_filter Coderef setting because of leak;
*** Possible incompatibility: if you have a form render_filter,
change to function instead of method
Change _localize to a Coderef to allow easier changing.
*** If you have a custom _localize method, check for compatibility
0.32005 Wed Oct 20, 2010
Removed '//'; incompatible with earlier versions of Perl
0.32004 Wed Oct 20, 2010
Minor doc cleanup
Switch away from MooseX::Traits; memory leak because of non-cached
composed classes
0.32003 Sun Oct 3, 2010
Fix syntax for 'with', excludes => -excludes
Use labels in radio group widgets
Add 'is_active' and 'is_inactive' convenience methods in Field
Select options - check defined instead of truth
Misc minor doc and test improvements
Coderef allowed for messages in apply actions
Limit removing of numbers when constructing method names
Use html_filter when rendering labels
Allow undefining min_size and max_size in upload field
Return in render_filter if string is not defined
Change rendering of repeatable subfields
0.32002 Thu July 29, 2010
Update to handle newer Moose (error msg with Moose::Util::MetaRole API)
Swich to Dist::Zilla
Add customization of form tag attributes
Add test prereqs
0.32001 Fri June 25, 2010
Add prereqs for DateTime::Format::Strptime and Email::Valid
0.32000 Fri June 25, 2010
Accept arrayref messages in add_error
Add initial fieldset wrapper
Flag (localize_labels) in Select field for rendering; localize empty_select
Add posted flag for forms containing only fields with no params when unselected
Add 'update_fields' methods and 'update_field_list' for preference-type field updates
Fix incorrect error message in duration field
Use LANGUAGE_HANDLE instead of LANG in tests
Add 'input_class' for class attribute on input fields
Allow deflation in fif, flag 'deflate_to' => 'value'/'fif'
Fix bug with unselected Select field (move input_without_param & not_nullable into field)
Add resultset example to cookbook
Doc to look at input for multiple submit fields
Fix bug in _set_dependency; use 'has_some_value' to determine emptiness
Add form_errors for non-field errors
Remove deprecated 'min_length' attribute ('minlength' is supported)
Allow upload field to be passed a file handle
Pass values to Display field (for display-only db fields)
Change I18N to allow duck_type classes; add test for Data::Localize
Added 'peek' diagnostic function for viewing field & result trees
Fix bug with extra results in repeatable elements
Strip empty pks and empty elements from repeatable values (avoid DB errors)
Localize value of submit button
Make '+' unnecessary in front of field name space types
0.31003 Fri May 7, 2010
Change precedence of defaults over item/init_object; add 'default_over_obj' for
cases where that behavior is desired.
Fix errors in filtering HTML in rendering
Call deflation in InitResult::_result_from_obj
Split localization of labels into separate 'loc_label' method
Call loc_label where label is used in error messages
Enable empty strings for wrapper_start and wrapper_end
Set locale to en_us where needed in test
Fix widget_name_space use in fields
0.31002 Wed Apr 21, 2010
Remove unused HTML::Entities from Simple form widget
Move locale test file into xt because of env variable issues in test
0.31001 Tues Apr 20, 2010
Use full length version number
Updates to translated messages & messages in Validate::Actions
0.31 Fri Apr 16, 2010
Remove use of HTML::Entities for filtering. New render_filter coderef for filering.
Minor doc fixes for typos
Use _html_attributes in widgets (for disabled, readonly, javascript)
Localize default required field message
Add 'render_upload' to Render::Simple
Fix allowing array for field_name_space
Selected_option for select lists
Add example to cookbook and tests for setting a coderef for validation
Checkbox group use 'eq' instead of '=='
Fixes to tutorial to match Catalyst tutorial
Allow arrayref for 'has_field' (like Moose 'has')
Die on maketext errors
Move deflation from fif to get_value called by '_result_from_object'.
Possible incompatibility, except it was probably not working to start with...
0.30003 Sun Feb 21, 2010
Partial fix for lack of defaults for compound fields
Support for using model_fields roles (DBICFields)
Use 'eq' instead of '==' when constructing html for multiple selects
Remove deprecated 'auto' syntax
0.30002 Thu Feb 11, 2010
Don't convert widget names that contain uppercase
Better error messages for missing field classes
Field attribute 'input_param' to allow input names different than field names
Make field 'default' rw
Clean up doc on init_object
0.30001 Fri Feb 5, 2009
Remove unnecessary IO::All use causing dep problems
Changes to Turkish messages
Russian and Urkainian message files
Use HTML::FormHandlerX namespace for fields and widgets
Fix bug with defaults set to 0
0.30 Mon Feb 1, 2010
Improve Display Field, adding more ways to set html
Add initial pass at more automatic TT rendering
Change readonly, html attributes to 'rw'
Set widget in Reset field
Fix bugs and oddities in HFH::types
Fix bug allowing hashref to be passed to constructor
Improve doc on 'trim'
Add more doc on dynamic form creation
Allow 'options_' attributes in form
Add Turkish message file
Add 'empty_select' to Select field
Fix bug displaying empty repeatable element if no values from object
Improvements in I18N factoring
0.29002 Wed Dec 16, 2009
Remove locale.t from dist until issues solved
0.29001 Tues Dec 15, 2009
Fix bug with passing widget_wrapper to fields
Fix bug with generated method names for form methods
0.29 Wed Dec 2, 2009
Add CheckboxGroup widget, add MooseX::Traits to Form & Field class
Fix bug where defaults were not being used with an initial object
Fix DateTime field to trap DateTime errors, pass hash in value
Use build_label for field labels
Remove use of Class::Load, instead use Class::MOP::load_class()
Add set_active and make switching fields to active simpler
Fix bug when options lists from db are empty
Add encode_entities to rendering widgets
Switch from init_value_ to default_
Change upload field.
Improve setting of method defaults for set_default, set_validate, set_options
0.28
Switched to using native traits
Add Widget roles
Major refactor to support result classes
Reformatting source to more Perl standard
Fix bug generating CSS classes in Render::Simple (mazpe)
Fix POD example in ::Intro (mazpe)
0.27006 Mon Aug 17, 2009
Add ability to set params class and arguments
0.27005 Wed Aug 12, 2009
DateTime::Format::Strptime dep again
0.27004 Tues Aug 11, 2009
Date inherits from Text. Fix loading compound fields from related.
Call load_options for forms with no init_obj & params
0.27003 Sat Aug 2, 2009
Indexing failure missing version in Date
0.27002 Sat Aug 2, 2009
Fix missing dependency on DateTime::Format::Strptime
Doc tweaks
0.27001 Fri July 31, 2009
Doc fixes, fix Date field.
0.27 Sat July 25, 2009
Split HTML::FormHandler::Model::DBIC into separate distribution
Add 'inactive' flag. Cleanup Makefile.PL. 'size' split into 'size' and
'maxlength'. 'min_length' renamed to 'minlength'. Add Catalyst pod.
'html_name' used for field 'id'. Fix DateMDY field.
0.26 Tues June 23, 2009
Fix dependency test failures on UNIVERSAL::require and version
0.25 Sat June 20, 2009
Add dependency for DateTime::Format::SQLite
0.24 Sat June 20, 2009
Refactor validation processing for api consistency
Skip empty undef array elements. Update Password and PrimaryKey fields.
Fix bugs: calling validate_ method, recognizing errors in repeatable fields,
handling empty repeatable elements,
incorrect cloning in Repeatable, rendering fixes/updates.
0.23 Fri May 22, 2009
Refactor HTH to use only 'process'. Deprecate 'validate' and 'update'
Add field_list array, deprecate other usages.
Clean up documentation
Add Repeatable field to support has_many relationships
0.22 Fri May 1, 2009, 17:00
Removed development only test from distribution
Expanded apply documentation.
0.21 Thu Apr 30, 2009, 20:00
Removed podcoverage, added skip to generator.t test, added
'apply' sugar for adding actions, doc for compound field
0.20 Thu Apr 23, 2009, 17:00
Added apply constraints, transforms, checks. Refactored code for future
use of nested fields. Improvements to compound fields. Bug fix for
checkboxes. Added ability to redefine attributes of existing fields
with '+fieldname'.
0.19 Thu Mar 05, 2009, 17:00
Fix problem with empty values from form. Add Compound field.
0.18 Sun Feb 22 2009, 15:00
Add missing test prereq DateTime::Format::MySQL.
Add 'values' method to form. Add 'accessor' attribute
to field.
0.17 Thurs Feb 19 2009, 17:30
Refactor validate, adding validate_form method
0.16 Thurs Feb 19 2009, 17:00
Add ability to use arrayrefs for primary key
Clear 'fif' for non-db forms. Allow init_object for non-db forms.
0.15 Mon Feb 16 2009, 19:00
Fix inheritance of has_field. Add ability to use has_field
in roles. Some refactoring of 'clear'. If a field is not
in params, don't touch in db.
0.14 Fri Feb 06 2009, 18:00
Wrong version in META.yml. Fix fif for password fields.
0.13 Wed Feb 04 2009, 23:00
Fix validate to set params if hash
0.12 Wed Feb 04 2009, 18:00
Fix 'dump_fields'. Add more output for verbose. Change so
that 'validate' doesn't require a separate 'clear' for
persistent forms. The controller test will only execute
with an environment variable.
0.11 Mon Feb 02 2009, 17:00
Change to use BEGIN block in controllers for Catalyst 5.80.
0.10 Thu Jan 29 2009, 07:00
Remove unnecessary 'use' from Render::Simple to eliminate install
failures. Change handling of 'has_field'.
0.09 Sun Jan 25 2009, 17:00
Minor changes.
0.08 Sat Jan 24 2009, 11:00
Remove controller and role. Refactor to support persistent
forms. Remove update_from_form method. Add 'process', and
'update' methods. Update documentation to match. Update tutorial.
0.07 Thurs Jan 22 2009, 04:00
Add prereq of DateTime. Minor doc changes.
0.06 Wed Jan 21 2009, 04:00
Add prereq skip tests to controller test. Clean up Makefile.PL.
Convert test controller Book.pm to use chained. Support empty
rows.
0.05 Mon Jan 19 2009, 15:00
Add skip test to htmlarea test. Add action, http_method, & submit to form.
Add javascript to field. Create widget directory for templates.
0.04 Fri Jan 16 2009, 19:00
Move example to test directory. Change controller; add controller
test. Add use for HashRefInflator. Add more documentation.
0.03 Tues Jan 12 2009, 16:00
Pod fix, remove failing test from htmlarea
0.02 Tues Jan 12 2009, 03:00
Fixed pod formatting, naming of files
0.01 Mon Jan 12 2009, 17:00
Released on an unsuspecting world
Conversion of Form::Processor to Moose, including
renaming many attributes and methods and refactoring
LICENSE 100644 000770 000024 43650 12576552253 15517 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 This software is copyright (c) 2014 by Gerda Shank.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Terms of the Perl programming language system itself
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2014 by Gerda Shank.
This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
51 Franklin St, Suite 500, Boston, MA 02110-1335 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
exchange for a fee.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C) 19yy
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2014 by Gerda Shank.
This is free software, licensed under:
The Artistic License 1.0
The Artistic License
Preamble
The intent of this document is to state the conditions under which a Package
may be copied, such that the Copyright Holder maintains some semblance of
artistic control over the development of the package, while giving the users of
the package the right to use and distribute the Package in a more-or-less
customary fashion, plus the right to make reasonable modifications.
Definitions:
- "Package" refers to the collection of files distributed by the Copyright
Holder, and derivatives of that collection of files created through
textual modification.
- "Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
- "Copyright Holder" is whoever is named in the copyright or copyrights for
the package.
- "You" is you, if you're thinking about copying or distributing this Package.
- "Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
- "Freely Available" means that no fee is charged for the item itself, though
there may be fees involved in handling the item. It also means that
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided that
you insert a prominent notice in each changed file stating how and when you
changed that file, and provided that you do at least ONE of the following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or an
equivalent medium, or placing the modifications on a major archive site
such as ftp.uu.net, or by allowing the Copyright Holder to include your
modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict with
standard executables, which must also be provided, and provide a separate
manual page for each non-standard executable that clearly documents how it
differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or executable
form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where to
get the Standard Version.
b) accompany the distribution with the machine-readable source of the Package
with your modifications.
c) accompany any non-standard executables with their corresponding Standard
Version executables, giving the non-standard executables non-standard
names, and clearly documenting the differences in manual pages (or
equivalent), together with instructions on where to get the Standard
Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package. You
may not charge a fee for this Package itself. However, you may distribute this
Package in aggregate with other (possibly commercial) programs as part of a
larger (possibly commercial) software distribution provided that you do not
advertise this Package as a product of your own.
6. The scripts and library files supplied as input to or produced as output
from the programs of this Package do not automatically fall under the copyright
of this Package, but belong to whomever generated them, and may be sold
commercially, and may be aggregated with this Package.
7. C or perl subroutines supplied by you and linked into this Package shall not
be considered part of this Package.
8. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
INSTALL 100644 000770 000024 1726 12576552253 15521 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064
This is the Perl distribution HTML-FormHandler.
Installing HTML-FormHandler is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm HTML::FormHandler
If you are installing into a system-wide directory, you may need to pass the
"-S" flag to cpanm, which uses sudo to install the module:
% cpanm -S HTML::FormHandler
## Installing with the CPAN shell
Alternatively, if your CPAN shell is set up, you should just be able to do:
% cpan HTML::FormHandler
## Manual installation
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
If you are installing into a system-wide directory, you may need to run:
% sudo make install
## Documentation
HTML-FormHandler documentation is available as POD.
You can run perldoc from a shell to read the documentation:
% perldoc HTML::FormHandler
dist.ini 100644 000770 000024 3354 12576552253 16133 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 ; Everything starting with ';' is a comment
name = HTML-FormHandler
main_module = lib/HTML/FormHandler.pm
author = FormHandler Contributors - see HTML::FormHandler
license = Perl_5
copyright_holder = Gerda Shank
copyright_year = 2014
version = 0.40064
[@Git]
tag_format = %v
[@Basic]
[InstallGuide]
[MetaJSON]
[MetaResources]
bugtracker.web = http://github.com/gshank/html-formhandler/issues
; If you have a repository...
repository.url = git://github.com/gshank/html-formhandler.git
repository.web = http://github.com/gshank/html-formhandler
repository.type = git
; You have to have Dist::Zilla::Plugin:: for these to work
[PodWeaver]
[Test::NoTabs]
[Test::EOL]
[Signature]
[CheckChangeLog]
[Prereqs]
Class::Load = 0.06
Carp = 0
; raised Moose prereq because 2.0604 fails
Moose = 2.1403
Locale::Maketext = 1.09
DateTime = 0
DateTime::Format::Strptime = 0
MooseX::Getopt = 0.16
MooseX::Types = 0.20
MooseX::Types::Common = 0
MooseX::Types::LoadableClass = 0.006
aliased = 0
File::Spec = 0
File::ShareDir = 0
Try::Tiny = 0
namespace::autoclean = 0.09
Email::Valid = 0
Sub::Exporter = 0
HTML::TreeBuilder = 3.23
Sub::Name = 0
Data::Clone = 0
JSON = 0
List::Util = 1.33
HTML::Entities = 0
[Prereqs / TestRequires]
Test::More = 0.94
Test::Differences = 0
Test::Exception = 0
Test::Memory::Cycle = 1.04
Test::Warn = 0
PadWalker = 0
xt 000755 000770 000024 0 12576552253 14755 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 dfv.t 100644 000770 000024 1460 12576552253 16062 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::I18N;
$ENV{LANGUAGE_HANDLE} = 'en_en';
{
package MyApp::Form::Test;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
use Data::FormValidator::Constraints ('match_state');
has_field 'my_state' => (
apply => [ { check => \&match_state, message => 'Invalid State' } ] );
has_field 'two';
has_field 'three';
}
my $form = MyApp::Form::Test->new;
ok( $form );
my $params = { my_state => 'XX', two => 1, three => 2 };
$form->process( params => $params );
ok( ! $form->validated, 'form did not validate' );
my @errors = $form->errors;
is( $errors[0], 'Invalid State', 'correct error message' );
$params->{my_state} = 'NY';
ok( $form->process( params => $params ), 'correct State validated' );
done_testing;
eol.t 100644 000770 000024 307 12576552253 16041 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
eval 'use Test::EOL';
plan skip_all => 'Test::EOL required' if $@;
all_perl_files_ok({ trailing_whitespace => 1, all_reasons => 1 }, ('lib', 't', 'xt') );
META.yml 100644 000770 000024 2222 12576552253 15731 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 ---
abstract: 'HTML forms using Moose'
author:
- 'FormHandler Contributors - see HTML::FormHandler'
build_requires:
PadWalker: 0
Test::Differences: 0
Test::Exception: 0
Test::Memory::Cycle: 1.04
Test::More: 0.94
Test::Warn: 0
configure_requires:
ExtUtils::MakeMaker: 6.30
File::ShareDir::Install: 0.03
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: HTML-FormHandler
requires:
Carp: 0
Class::Load: 0.06
Data::Clone: 0
DateTime: 0
DateTime::Format::Strptime: 0
Email::Valid: 0
File::ShareDir: 0
File::Spec: 0
HTML::Entities: 0
HTML::TreeBuilder: 3.23
JSON: 0
List::Util: 1.33
Locale::Maketext: 1.09
Moose: 2.1403
MooseX::Getopt: 0.16
MooseX::Types: 0.20
MooseX::Types::Common: 0
MooseX::Types::LoadableClass: 0.006
Sub::Exporter: 0
Sub::Name: 0
Try::Tiny: 0
aliased: 0
namespace::autoclean: 0.09
resources:
bugtracker: http://github.com/gshank/html-formhandler/issues
repository: git://github.com/gshank/html-formhandler.git
version: 0.40064
MANIFEST 100644 000770 000024 26352 12576552253 15643 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
SIGNATURE
TODO
dist.ini
lib/HTML/FormHandler.pm
lib/HTML/FormHandler/Base.pm
lib/HTML/FormHandler/Blocks.pm
lib/HTML/FormHandler/BuildFields.pm
lib/HTML/FormHandler/BuildPages.pm
lib/HTML/FormHandler/Field.pm
lib/HTML/FormHandler/Field/AddElement.pm
lib/HTML/FormHandler/Field/BoolSelect.pm
lib/HTML/FormHandler/Field/Boolean.pm
lib/HTML/FormHandler/Field/Button.pm
lib/HTML/FormHandler/Field/Captcha.pm
lib/HTML/FormHandler/Field/Checkbox.pm
lib/HTML/FormHandler/Field/Compound.pm
lib/HTML/FormHandler/Field/Date.pm
lib/HTML/FormHandler/Field/DateMDY.pm
lib/HTML/FormHandler/Field/DateTime.pm
lib/HTML/FormHandler/Field/Display.pm
lib/HTML/FormHandler/Field/Duration.pm
lib/HTML/FormHandler/Field/Email.pm
lib/HTML/FormHandler/Field/File.pm
lib/HTML/FormHandler/Field/Float.pm
lib/HTML/FormHandler/Field/Hidden.pm
lib/HTML/FormHandler/Field/Hour.pm
lib/HTML/FormHandler/Field/IntRange.pm
lib/HTML/FormHandler/Field/Integer.pm
lib/HTML/FormHandler/Field/Minute.pm
lib/HTML/FormHandler/Field/Money.pm
lib/HTML/FormHandler/Field/Month.pm
lib/HTML/FormHandler/Field/MonthDay.pm
lib/HTML/FormHandler/Field/MonthName.pm
lib/HTML/FormHandler/Field/Multiple.pm
lib/HTML/FormHandler/Field/Nested.pm
lib/HTML/FormHandler/Field/NoValue.pm
lib/HTML/FormHandler/Field/NonEditable.pm
lib/HTML/FormHandler/Field/Password.pm
lib/HTML/FormHandler/Field/PasswordConf.pm
lib/HTML/FormHandler/Field/PosInteger.pm
lib/HTML/FormHandler/Field/PrimaryKey.pm
lib/HTML/FormHandler/Field/Repeatable.pm
lib/HTML/FormHandler/Field/Repeatable/Instance.pm
lib/HTML/FormHandler/Field/Reset.pm
lib/HTML/FormHandler/Field/Result.pm
lib/HTML/FormHandler/Field/RmElement.pm
lib/HTML/FormHandler/Field/Second.pm
lib/HTML/FormHandler/Field/Select.pm
lib/HTML/FormHandler/Field/SelectCSV.pm
lib/HTML/FormHandler/Field/Submit.pm
lib/HTML/FormHandler/Field/Text.pm
lib/HTML/FormHandler/Field/TextArea.pm
lib/HTML/FormHandler/Field/TextCSV.pm
lib/HTML/FormHandler/Field/Upload.pm
lib/HTML/FormHandler/Field/Weekday.pm
lib/HTML/FormHandler/Field/Year.pm
lib/HTML/FormHandler/Fields.pm
lib/HTML/FormHandler/Foo.pm
lib/HTML/FormHandler/I18N.pm
lib/HTML/FormHandler/I18N/ar_kw.pm
lib/HTML/FormHandler/I18N/bg_bg.pm
lib/HTML/FormHandler/I18N/ca_es.pm
lib/HTML/FormHandler/I18N/cs_cz.pm
lib/HTML/FormHandler/I18N/de_de.pm
lib/HTML/FormHandler/I18N/en_us.pm
lib/HTML/FormHandler/I18N/es_es.pm
lib/HTML/FormHandler/I18N/hu_hu.pm
lib/HTML/FormHandler/I18N/it_it.pm
lib/HTML/FormHandler/I18N/ja_jp.pm
lib/HTML/FormHandler/I18N/pt_br.pm
lib/HTML/FormHandler/I18N/ru_ru.pm
lib/HTML/FormHandler/I18N/sv_se.pm
lib/HTML/FormHandler/I18N/tr_tr.pm
lib/HTML/FormHandler/I18N/ua_ua.pm
lib/HTML/FormHandler/InitResult.pm
lib/HTML/FormHandler/Manual.pod
lib/HTML/FormHandler/Manual/Catalyst.pod
lib/HTML/FormHandler/Manual/Cookbook.pod
lib/HTML/FormHandler/Manual/Database.pod
lib/HTML/FormHandler/Manual/Defaults.pod
lib/HTML/FormHandler/Manual/Errors.pod
lib/HTML/FormHandler/Manual/Fields.pod
lib/HTML/FormHandler/Manual/FromDFV.pod
lib/HTML/FormHandler/Manual/FromFF.pod
lib/HTML/FormHandler/Manual/InflationDeflation.pod
lib/HTML/FormHandler/Manual/Intro.pod
lib/HTML/FormHandler/Manual/Reference.pod
lib/HTML/FormHandler/Manual/Rendering.pod
lib/HTML/FormHandler/Manual/RenderingCookbook.pod
lib/HTML/FormHandler/Manual/Templates.pod
lib/HTML/FormHandler/Manual/Testing.pod
lib/HTML/FormHandler/Manual/Tutorial.pod
lib/HTML/FormHandler/Manual/Validation.pod
lib/HTML/FormHandler/Merge.pm
lib/HTML/FormHandler/Meta/Role.pm
lib/HTML/FormHandler/Model.pm
lib/HTML/FormHandler/Model/CDBI.pm
lib/HTML/FormHandler/Model/Object.pm
lib/HTML/FormHandler/Moose.pm
lib/HTML/FormHandler/Moose/Role.pm
lib/HTML/FormHandler/Page.pm
lib/HTML/FormHandler/Page/Simple.pm
lib/HTML/FormHandler/Pages.pm
lib/HTML/FormHandler/Params.pm
lib/HTML/FormHandler/Render/RepeatableJs.pm
lib/HTML/FormHandler/Render/Simple.pm
lib/HTML/FormHandler/Render/Table.pm
lib/HTML/FormHandler/Render/Util.pm
lib/HTML/FormHandler/Render/WithTT.pm
lib/HTML/FormHandler/Result.pm
lib/HTML/FormHandler/Result/Role.pm
lib/HTML/FormHandler/Test.pm
lib/HTML/FormHandler/TraitFor/Captcha.pm
lib/HTML/FormHandler/TraitFor/I18N.pm
lib/HTML/FormHandler/TraitFor/Types.pm
lib/HTML/FormHandler/Traits.pm
lib/HTML/FormHandler/Types.pm
lib/HTML/FormHandler/Validate.pm
lib/HTML/FormHandler/Widget/ApplyRole.pm
lib/HTML/FormHandler/Widget/Block.pm
lib/HTML/FormHandler/Widget/Block/Bootstrap.pm
lib/HTML/FormHandler/Widget/Field/Button.pm
lib/HTML/FormHandler/Widget/Field/ButtonTag.pm
lib/HTML/FormHandler/Widget/Field/Captcha.pm
lib/HTML/FormHandler/Widget/Field/Checkbox.pm
lib/HTML/FormHandler/Widget/Field/CheckboxGroup.pm
lib/HTML/FormHandler/Widget/Field/Compound.pm
lib/HTML/FormHandler/Widget/Field/Hidden.pm
lib/HTML/FormHandler/Widget/Field/HorizCheckboxGroup.pm
lib/HTML/FormHandler/Widget/Field/NoRender.pm
lib/HTML/FormHandler/Widget/Field/Password.pm
lib/HTML/FormHandler/Widget/Field/RadioGroup.pm
lib/HTML/FormHandler/Widget/Field/Repeatable.pm
lib/HTML/FormHandler/Widget/Field/Reset.pm
lib/HTML/FormHandler/Widget/Field/Role/HTMLAttributes.pm
lib/HTML/FormHandler/Widget/Field/Role/SelectedOption.pm
lib/HTML/FormHandler/Widget/Field/Select.pm
lib/HTML/FormHandler/Widget/Field/Span.pm
lib/HTML/FormHandler/Widget/Field/Submit.pm
lib/HTML/FormHandler/Widget/Field/Text.pm
lib/HTML/FormHandler/Widget/Field/Textarea.pm
lib/HTML/FormHandler/Widget/Field/Upload.pm
lib/HTML/FormHandler/Widget/Form/Role/HTMLAttributes.pm
lib/HTML/FormHandler/Widget/Form/Simple.pm
lib/HTML/FormHandler/Widget/Form/Table.pm
lib/HTML/FormHandler/Widget/Theme/Bootstrap.pm
lib/HTML/FormHandler/Widget/Theme/Bootstrap3.pm
lib/HTML/FormHandler/Widget/Theme/BootstrapFormMessages.pm
lib/HTML/FormHandler/Widget/Wrapper/Base.pm
lib/HTML/FormHandler/Widget/Wrapper/Bootstrap.pm
lib/HTML/FormHandler/Widget/Wrapper/Bootstrap3.pm
lib/HTML/FormHandler/Widget/Wrapper/Fieldset.pm
lib/HTML/FormHandler/Widget/Wrapper/None.pm
lib/HTML/FormHandler/Widget/Wrapper/Simple.pm
lib/HTML/FormHandler/Widget/Wrapper/SimpleInline.pm
lib/HTML/FormHandler/Widget/Wrapper/Table.pm
lib/HTML/FormHandler/Widget/Wrapper/TableInline.pm
lib/HTML/FormHandler/Wizard.pm
share/templates/field/button.tt
share/templates/field/checkbox.tt
share/templates/field/checkbox_group.tt
share/templates/field/compound.tt
share/templates/field/hidden.tt
share/templates/field/password.tt
share/templates/field/radio_group.tt
share/templates/field/repeatable.tt
share/templates/field/reset.tt
share/templates/field/select.tt
share/templates/field/submit.tt
share/templates/field/text.tt
share/templates/field/textarea.tt
share/templates/field/upload.tt
share/templates/foo/checkbox_tag.tt
share/templates/foo/end_form.tt
share/templates/foo/field.tt
share/templates/foo/form.tt
share/templates/foo/input.tt
share/templates/foo/input_tag.tt
share/templates/foo/label.tt
share/templates/foo/start_form.tt
share/templates/form/form.tt
share/templates/form/form22.tt
share/templates/form/form_end.tt
share/templates/form/form_in_one.tt
share/templates/form/form_start.tt
share/templates/wrapper/fieldset.tt
share/templates/wrapper/label.tt
share/templates/wrapper/none.tt
share/templates/wrapper/simple.tt
share/templates/wrapper/wrap_label.tt
t/01app.t
t/author-eol.t
t/basic.t
t/blocks/basic.t
t/blocks/block_list.t
t/blocks/blocktags.t
t/blocks/loading.t
t/blocks/nested.t
t/blocks/render_units.t
t/bootstrap/basic.t
t/bootstrap/control_states.t
t/bootstrap/controls.t
t/bootstrap/ext_controls.t
t/bootstrap/inline.t
t/bootstrap/other.t
t/bootstrap/search.t
t/bootstrap3/basic.t
t/bootstrap3/controls.t
t/bootstrap3/horiz.t
t/bootstrap3/horiz_checkboxgroup.t
t/bootstrap3/inlinecheckboxes.t
t/bootstrap3/layout_classes.t
t/compound/basic.t
t/compound/default.t
t/compound/empty.t
t/compound/include.t
t/compound/select.t
t/errors/basic.t
t/errors/compound.t
t/errors/form_messages.t
t/errors/messages.t
t/errors/req_message.t
t/field_setup/checkbox.t
t/field_setup/compound_update_fields.t
t/field_setup/defaults.t
t/field_setup/disabled.t
t/field_setup/id.t
t/field_setup/inactive.t
t/field_setup/init_object.t
t/field_setup/input_param.t
t/field_setup/missing.t
t/field_setup/plus_field.t
t/field_setup/update_fields.t
t/field_setup/update_subfields.t
t/fields/dates.t
t/fields/display.t
t/fields/fields.t
t/fields/float.t
t/fields/formhandlerx.t
t/fields/novalue.t
t/fields/password.t
t/fields/repeatable.t
t/fields/select.t
t/fields/select2.t
t/fields/selectcsv.t
t/fields/textcsv.t
t/form_setup/api.t
t/form_setup/clone.t
t/form_setup/compound_field_list.t
t/form_setup/config.t
t/form_setup/dynamic.t
t/form_setup/include.t
t/form_setup/init_obj.t
t/form_setup/no_update.t
t/form_setup/posted.t
t/form_setup/render_roles.t
t/infl_defl/comp_field.t
t/infl_defl/default.t
t/infl_defl/defl_lives.t
t/infl_defl/infl_defl.t
t/infl_defl/infl_transform.t
t/infl_defl/variations.t
t/lib/BookDB/Form/Upload.pm
t/lib/Field/Address.pm
t/lib/Field/AltText.pm
t/lib/Field/MyField.pm
t/lib/Form/Address.pm
t/lib/Form/AddressRole.pm
t/lib/Form/Multiple.pm
t/lib/Form/MultipleRole.pm
t/lib/Form/NoExtForm.pm
t/lib/Form/Person.pm
t/lib/Form/PersonRole.pm
t/lib/Form/Test.pm
t/lib/Form/Two.pm
t/lib/MyApp/Component/Section.pm
t/lib/MyApp/I18N/abc_de.pm
t/lib/Widget/Block/Test.pm
t/lib/Widget/Field/Omega.pm
t/lib/Widget/Field/TestWidget.pm
t/memory_cycles.t
t/moose/build_id.t
t/moose/composed.t
t/moose/field_traits.t
t/moose/no_extend.t
t/moose/subclass_roles.t
t/release-no-tabs.t
t/render/actions.t
t/render/array.t
t/render/basic.t
t/render/checkbox.t
t/render/checkbox_group.t
t/render/classes.t
t/render/compound.t
t/render/compound2.t
t/render/display.t
t/render/errors.t
t/render/escaping.t
t/render/ff.t
t/render/filter.t
t/render/form_errors.t
t/render/get_tag.t
t/render/html5_attributes.t
t/render/html_attr.t
t/render/html_attributes.t
t/render/inline.t
t/render/label.t
t/render/noneditable.t
t/render/optgroup.t
t/render/radio_group.t
t/render/rep_fieldset.t
t/render/rep_wrapper.t
t/render/repeatable.t
t/render/result.t
t/render/select.t
t/render/simple.t
t/render/submit.t
t/render/table.t
t/render/tags.t
t/render/tt_render_elementx.t
t/render/util.t
t/render/widget_loading.t
t/render/widget_tags.t
t/render/widgets.t
t/render/with_class.t
t/render/withtt.t
t/repeatable/defaults.t
t/repeatable/empty.t
t/repeatable/has_many.t
t/repeatable/hash.t
t/repeatable/js.t
t/repeatable/list.t
t/repeatable/nested.t
t/repeatable/nested2.t
t/repeatable/num_extra.t
t/repeatable/reload.t
t/repeatable/set_methods.t
t/repeatable/subfield.t
t/result/basic.t
t/result/blocks.t
t/result/compound.t
t/result/errors.t
t/result/repeatable.t
t/structured.t
t/template.t
t/validation/apply.t
t/validation/constraints.t
t/validation/dependency.t
t/validation/filters.t
t/validation/reqwhen.t
t/validation/type_tiny.t
t/validation/types.t
t/validation/validate_coderef.t
t/validation/when.t
t/var/form1.pl
t/var/form1.yml
t/wizard/basic.t
util/check_I18N.pl
util/get_messages.pl
util/messages
xt/02pod.t
xt/add_field.t
xt/captcha.t
xt/captcha2.t
xt/chbox_group.t
xt/check_selected_option.t
xt/custom_fields.t
xt/cycles.t
xt/dfv.t
xt/display.t
xt/email.t
xt/eol.t
xt/field_list.t
xt/form_errors.t
xt/init.t
xt/lib/MyCatalystApp.pm
xt/lib/MyCatalystApp/Controller/Captcha.pm
xt/lib/MyCatalystApp/Controller/Root.pm
xt/load_field.t
xt/locale.t
xt/locale_data_localize.t
xt/mb_form.t
xt/model_cdbi.t
xt/multiple_forms.t
xt/order.t
xt/params.t
xt/posted.t
xt/repeatable_clone.t
xt/submit.t
xt/upload.t
t 000755 000770 000024 0 12576552253 14565 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 01app.t 100644 000770 000024 510 12576552253 16007 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t use Test::More;
use_ok( 'HTML::FormHandler::Model' );
use_ok( 'HTML::FormHandler' );
use_ok( 'HTML::FormHandler::Field' );
use_ok( 'HTML::FormHandler::Field::Select' );
use_ok( 'HTML::FormHandler::Field::Compound' );
use_ok( 'HTML::FormHandler::Field::Repeatable' );
use_ok( 'HTML::FormHandler::Model::CDBI' );
done_testing;
basic.t 100644 000770 000024 14217 12576552253 16220 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t use strict;
use warnings;
use Test::More;
use HTML::FormHandler::I18N;
$ENV{LANGUAGE_HANDLE} = 'en_en';
use_ok('HTML::FormHandler');
{
package My::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+name' => ( default => 'testform_' );
has '+no_preload' => ( default => 1 );
has_field 'optname' => ( temp => 'First' );
has_field 'reqname' => ( required => 1 );
has_field 'somename';
has_field 'my_selected' => ( type => 'Checkbox' );
has_field 'must_select' => ( type => 'Checkbox', required => 1 );
sub field_list
{
return [
fruit => 'Select',
optname => { temp => 'Second' }
];
}
sub options_fruit
{
return (
1 => 'apples',
2 => 'oranges',
3 => 'kiwi',
);
}
}
my $form = My::Form->new;
is( $form->field('optname')->temp, 'Second', 'got second optname field' );
ok( !$form->process, 'Empty data' );
is_deeply( $form->value, {}, 'no values returns hashref');
my $good = {
reqname => 'hello',
optname => 'not req',
fruit => 2,
must_select => 1,
};
ok( $form->process($good), 'Good data' );
is( $form->field('somename')->value, undef, 'no value for somename' );
ok( !$form->field('somename')->has_value, 'predicate no value' );
$good->{somename} = 'testing';
$form->process($good);
is( $form->field('somename')->value, 'testing', 'use input for extra data' );
is( $form->field('my_selected')->value, 0, 'correct value for unselected checkbox' );
ok( !$form->process( {} ), 'form doesn\'t validate with empty params' );
is( $form->num_errors, 0, 'form doesn\'t have errors with empty params' );
my $bad_1 = {
reqname => '',
optname => 'not req',
fruit => 4,
};
ok( !$form->process($bad_1), 'bad 1' );
ok( $form->field('fruit')->has_errors, 'fruit has error' );
ok( $form->field('reqname')->has_errors, 'reqname has error' );
ok( $form->field('must_select')->has_errors, 'must_select has error' );
ok( !$form->field('optname')->has_errors, 'optname has no error' );
is( $form->field('fruit')->id, "fruit", 'field has id' );
is( $form->field('fruit')->label, 'Fruit', 'field label' );
ok( !$form->process( {} ), 'no leftover params' );
is( $form->num_errors, 0, 'no leftover errors' );
ok( !$form->field('reqname')->has_errors, 'no leftover error in field' );
ok( !$form->field('optname')->fif, 'no lefover fif values' );
my $init_object = {
reqname => 'Starting Perl',
optname => 'Over Again'
};
# if you're going to load something on new and expect it to work without
# process, you need to have no_preload turned off
$form = My::Form->new( init_object => $init_object, no_preload => 0 );
is( $form->field('optname')->value, 'Over Again', 'value with init_obj' );
# non-posted params
$form->process( params => {} );
ok( !$form->validated, 'form validated' );
# it's not crystal clear what the behavior should be here, but I think
# this is more correct than the previous behavior
# it fills in the missing fields, which is what always happened for an
# initial object (as opposed to hash), but it used to behave
# differently for a hash, which seems wrong
# TODO verify behavior is correct
my $init_obj_plus_defaults = {
'fruit' => undef,
'must_select' => undef,
'my_selected' => undef,
'optname' => 'Over Again',
'reqname' => 'Starting Perl',
'somename' => undef,
};
is_deeply( $form->value, $init_obj_plus_defaults, 'value with empty params' );
$init_object->{my_selected} = 0; # checkboxes must be forced to 0
$init_object->{must_select} = 0;
my %fif = %$init_object;
$fif{somename} = '';
$fif{fruit} = '';
$fif{must_select} = '';
$fif{my_selected} = '';
is_deeply( $form->fif, \%fif, 'get right fif with init_object' );
# make sure that checkbox is 0 in values
$init_object->{must_select} = 1;
$fif{must_select} = 1;
ok( $form->process($init_object), 'form validates with params' );
#my %init_obj_value = (%$init_object, fruit => undef );
#is_deeply( $form->value, \%init_obj_value, 'value init obj' );
$init_object->{fruit} = undef;
is_deeply( $form->value, $init_object, 'value init obj' );
$fif{must_select} = 1;
$fif{my_selected} = 0;
is_deeply( $form->fif, \%fif, 'get right fif with init_object' );
$form->clear;
ok( !$form->has_value, 'Form value cleared' );
ok( !$form->has_input, 'Form input cleared' );
# check that form is cleared if fif is done before process
$form->fif;
$form->process($init_object);
is_deeply( $form->fif, \%fif, 'get right fif when process preceded by fif');
$form = HTML::FormHandler->new( field_list => [ foo => { type => 'Text', required => 1 } ] );
if ( !$form->process( params => { bar => 1, } ) )
{
# On some versions, the above process() returned false, but
# error_fields did not return anything.
my @fields = $form->error_fields;
if ( is( scalar @fields, 1, "there is an error field" ) )
{
my @errors = $fields[0]->all_errors;
is( scalar @errors, 1, "there is an error" );
is( $errors[0], $fields[0]->label . " field is required", "error messages match" );
}
else
{
fail("there is an error");
fail("error messages match");
}
}
# 'image' input produces { foo => bar, 'foo.x' => 42, 'foo.y' => 23 }
$form = HTML::FormHandler->new( name => 'baz', html_prefix => 1, field_list => [ 'foo' ] );
eval{ $form->process( params => { 'baz.foo' => 'bar', 'baz.foo.x' => 42, 'baz.foo.y' => 23 } ) };
ok( !$@, 'image field processed' ) or diag $@;
is_deeply( $form->field( 'foo' )->value, { '' => 'bar', x => 42, y => 23 }, 'image field' );
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'foo';
has_field 'bar';
sub validate {
my $self = shift;
if( $self->field('foo')->value eq 'cow' ) {
$self->field('foo')->value('bovine');
}
}
}
$form = Test::Form->new;
$form->process( { foo => 'cow', bar => 'horse' } );
is_deeply( $form->value, { foo => 'bovine', bar => 'horse' }, 'correct value' );
# check for hashref constructor
$form = HTML::FormHandler->new( { name => 'test_form', field_list => { one => 'Text', two => 'Text' } } );
ok( $form, 'form constructed ok' );
done_testing;
init.t 100644 000770 000024 3331 12576552253 16245 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
{
package My::Default;
use Moose::Role;
sub build_default_over_obj {
return 'From Method';
}
}
{
package My::Other::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+name' => ( default => 'testform_' );
has_field 'optname' => ( temp => 'First' );
has_field 'reqname' => ( required => 1, default_over_obj => 'From Attribute' );
has_field 'altname' => ( traits => ['My::Default'] );
has_field 'somename';
has_field 'extraname' => ( default_over_obj => '' );
sub default_somename {
my $self = shift;
return 'SN from meth';
}
}
my $init_object = { reqname => 'Starting Perl', optname => 'Over Again', altname => 'test',
extraname => 'not_empty',
};
my $form = My::Other::Form->new;
ok( $form, 'get form' );
my $params = { reqname => 'Sweet', optname => 'Charity', somename => 'Exists' };
$form->process( init_object => $init_object, params => $params );
ok( $form->validated, 'form with init_obj & params validated' );
is( $form->field('reqname')->init_value, 'From Attribute', 'correct init_value');
is( $form->field('optname')->init_value, 'Over Again', 'correct init_value no meth');
is( $form->field('altname')->init_value, 'From Method', 'correct init_value from trait');
is( $form->field('somename')->init_value, 'SN from meth', 'correct for init_obj undef');
is( $form->field('somename')->value, 'Exists', 'correct value for init_obj undef');
is( $form->field('extraname')->init_value, '', 'correct value for empty string default');
$form = My::Other::Form->new( init_object => $init_object );
is( $form->field('somename')->init_value, 'SN from meth', 'correct init_value new w init_obj');
done_testing;
META.json 100644 000770 000024 4375 12576552253 16114 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 {
"abstract" : "HTML forms using Moose",
"author" : [
"FormHandler Contributors - see HTML::FormHandler"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "HTML-FormHandler",
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.30",
"File::ShareDir::Install" : "0.03"
}
},
"develop" : {
"requires" : {
"Test::EOL" : "0",
"Test::More" : "0.88",
"Test::NoTabs" : "0"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Class::Load" : "0.06",
"Data::Clone" : "0",
"DateTime" : "0",
"DateTime::Format::Strptime" : "0",
"Email::Valid" : "0",
"File::ShareDir" : "0",
"File::Spec" : "0",
"HTML::Entities" : "0",
"HTML::TreeBuilder" : "3.23",
"JSON" : "0",
"List::Util" : "1.33",
"Locale::Maketext" : "1.09",
"Moose" : "2.1403",
"MooseX::Getopt" : "0.16",
"MooseX::Types" : "0.20",
"MooseX::Types::Common" : "0",
"MooseX::Types::LoadableClass" : "0.006",
"Sub::Exporter" : "0",
"Sub::Name" : "0",
"Try::Tiny" : "0",
"aliased" : "0",
"namespace::autoclean" : "0.09"
}
},
"test" : {
"requires" : {
"PadWalker" : "0",
"Test::Differences" : "0",
"Test::Exception" : "0",
"Test::Memory::Cycle" : "1.04",
"Test::More" : "0.94",
"Test::Warn" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "http://github.com/gshank/html-formhandler/issues"
},
"repository" : {
"type" : "git",
"url" : "git://github.com/gshank/html-formhandler.git",
"web" : "http://github.com/gshank/html-formhandler"
}
},
"version" : "0.40064"
}
SIGNATURE 100644 000770 000024 73471 12576552253 16002 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.73.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
It will check each file's integrity, as well as the signature's
validity. If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
SHA1 cac04c2342f117700d15a9fff016f4516f2c4d82 Changes
SHA1 2972c49b6d6e4d8bcc3360a734ee629ac16c6d8c INSTALL
SHA1 b371bb7c182cf84dcc932ebdf50da8c1b810da89 LICENSE
SHA1 ba72bfb734ba4059133d9d4d969087db44800d8d MANIFEST
SHA1 08ecd5bf2d9bd7b1f30d1d60283c1a51bbf4311d META.json
SHA1 40d318339189934adca2b196bce06bdb64a4199b META.yml
SHA1 78420f99b82743267cf7a7c44efc2871168aecd4 Makefile.PL
SHA1 8aa966ec5f9260fb05d066042be3d0a697192d1e README
SHA1 d764cc72a4d6465a03e8d04bdbf58096068c619d TODO
SHA1 ce60580e4dd6bb7c37c1d990fe9538b535917a01 dist.ini
SHA1 61ae94fec036a15f55ca2ae5e82864f26244bc20 lib/HTML/FormHandler.pm
SHA1 e36e0f556a678a5c118055f9c6cb03ee7a147f92 lib/HTML/FormHandler/Base.pm
SHA1 bd42ace7583e98f11927de7d9fdc2a45a8b4938f lib/HTML/FormHandler/Blocks.pm
SHA1 e59444511c98ea54196433bab55fffa8abaabfe0 lib/HTML/FormHandler/BuildFields.pm
SHA1 61cf96b2476259930a8a21fede5fc76406cae76e lib/HTML/FormHandler/BuildPages.pm
SHA1 2791b7fd559316751b57fd6f204d44990eb9e01b lib/HTML/FormHandler/Field.pm
SHA1 aaf8d3b65c9e2608849bf82f774c367fa4789109 lib/HTML/FormHandler/Field/AddElement.pm
SHA1 8061798449dec3289c1580eb0d471600043e56dd lib/HTML/FormHandler/Field/BoolSelect.pm
SHA1 5a1fc911b6b400bbb9cfb7fa0b85389101ca7dc2 lib/HTML/FormHandler/Field/Boolean.pm
SHA1 d7782623a63e37bb091d6026f725c10990d4a019 lib/HTML/FormHandler/Field/Button.pm
SHA1 d22f5a23dba0fa4b3f5dd0ab052b633631bcc550 lib/HTML/FormHandler/Field/Captcha.pm
SHA1 98bdcd811321b09be0792d884680ccd8ad8c98e4 lib/HTML/FormHandler/Field/Checkbox.pm
SHA1 fce80090bd166cbf99411ffee401211e12912f73 lib/HTML/FormHandler/Field/Compound.pm
SHA1 e2e2af2c7ef0b7cf61a2a50766fc35471eca9fd4 lib/HTML/FormHandler/Field/Date.pm
SHA1 c0797006e83495eb69eecfad7394f0096ca22af7 lib/HTML/FormHandler/Field/DateMDY.pm
SHA1 f01dd47c8544278ab87bc019a68b1b2169f16bcd lib/HTML/FormHandler/Field/DateTime.pm
SHA1 10ad077784545979198cf264ff48780e7dcef80f lib/HTML/FormHandler/Field/Display.pm
SHA1 da05b2f869f1e47df1ffed9041363cd50632c57c lib/HTML/FormHandler/Field/Duration.pm
SHA1 ee6b54dcac206877dbc21a6873900b8cdc524214 lib/HTML/FormHandler/Field/Email.pm
SHA1 978f16334572544daf65d675d2c0cb7c8bc411fa lib/HTML/FormHandler/Field/File.pm
SHA1 92013314083e43e96a095c6b573f723547e4fb43 lib/HTML/FormHandler/Field/Float.pm
SHA1 6f3d761cc9736f8436e7118c0be278d7b0000914 lib/HTML/FormHandler/Field/Hidden.pm
SHA1 b14ba25e3d2d55e85b9527b5062ab8594c11d527 lib/HTML/FormHandler/Field/Hour.pm
SHA1 837ca34e3c7971fe947b2b7319d823d587f02b75 lib/HTML/FormHandler/Field/IntRange.pm
SHA1 dc92a6534ba03bec5fff5b1962f3378a850f11f1 lib/HTML/FormHandler/Field/Integer.pm
SHA1 c5610b777daa22d97f6a2afbe256a76a100a88de lib/HTML/FormHandler/Field/Minute.pm
SHA1 ebc5e77bd7d7fd3bd41e1264bee017dcabb85990 lib/HTML/FormHandler/Field/Money.pm
SHA1 7fc47a1ecf6344c4b76fa6076ab8f93989ce027f lib/HTML/FormHandler/Field/Month.pm
SHA1 f67206d5b7cb5aaaedb87a51dc6209d4ee52ed1c lib/HTML/FormHandler/Field/MonthDay.pm
SHA1 41029ec8ec837cc41ceb636bc0574530e4b479dd lib/HTML/FormHandler/Field/MonthName.pm
SHA1 a7d63156b7c32e54ddca01adbc94b53489483a71 lib/HTML/FormHandler/Field/Multiple.pm
SHA1 188e2e92c203a2fc2f4f52c3aaa55470a0964129 lib/HTML/FormHandler/Field/Nested.pm
SHA1 a8b4d4a71c1953b37014f917a04cf85509b42c8d lib/HTML/FormHandler/Field/NoValue.pm
SHA1 c3b8218ab3bc17339c0e73b7f3335fe181c0107d lib/HTML/FormHandler/Field/NonEditable.pm
SHA1 e7adca9553589b5db16424fbc1629132f6afe763 lib/HTML/FormHandler/Field/Password.pm
SHA1 a03f4db698912006952e28479ddff62a8a76d5d0 lib/HTML/FormHandler/Field/PasswordConf.pm
SHA1 995e7e1e748efb71cbeea3d31e3457cbd4da1dff lib/HTML/FormHandler/Field/PosInteger.pm
SHA1 b98fba3ac68a037e18dc455819297da99d878d8a lib/HTML/FormHandler/Field/PrimaryKey.pm
SHA1 f1a9b480fbe07f5ab3c48b7bb40a8d53977df1f2 lib/HTML/FormHandler/Field/Repeatable.pm
SHA1 01442157b12521ea05e906db904d60e624c0ca0b lib/HTML/FormHandler/Field/Repeatable/Instance.pm
SHA1 57c8f15771943acafe950073aad2eea89c7061b3 lib/HTML/FormHandler/Field/Reset.pm
SHA1 6d075bf2fa9f4889b1c914f528cae26ecd58ffa0 lib/HTML/FormHandler/Field/Result.pm
SHA1 07a3edbe072bc5f3510f0d6c50703b2d2e487821 lib/HTML/FormHandler/Field/RmElement.pm
SHA1 131809ae75207db1cf676994586654580d8cf57d lib/HTML/FormHandler/Field/Second.pm
SHA1 39e1083703bc3c4e4aecfbdb0394f238c9e75ea1 lib/HTML/FormHandler/Field/Select.pm
SHA1 01928851f90442f914fd6b8a27985f22a7e858e0 lib/HTML/FormHandler/Field/SelectCSV.pm
SHA1 b9e196da89a5f2d84f88bda4220f8d3ec6e59441 lib/HTML/FormHandler/Field/Submit.pm
SHA1 8588ecd2f529eda7b878915473912262dee787e2 lib/HTML/FormHandler/Field/Text.pm
SHA1 1e39377e70869b19b4fcd6c727f4b44de9819170 lib/HTML/FormHandler/Field/TextArea.pm
SHA1 3388471c7a6b46d06e137cb6bc74898b87f73e71 lib/HTML/FormHandler/Field/TextCSV.pm
SHA1 842ed8364d95048faae5b68fe7670a711c216c07 lib/HTML/FormHandler/Field/Upload.pm
SHA1 0264ca056a7d89bd5b09725b3c5513202331638f lib/HTML/FormHandler/Field/Weekday.pm
SHA1 5f733724391fdf60c4f4be1b6b8d9c66957b7497 lib/HTML/FormHandler/Field/Year.pm
SHA1 76bad7258a43969742513ef192c2e057d74d95e2 lib/HTML/FormHandler/Fields.pm
SHA1 9bb3d1064fff106efa60d5a1a45f25417a78d4d4 lib/HTML/FormHandler/Foo.pm
SHA1 924e38a6203b5246d4a4148319d919379fd04b08 lib/HTML/FormHandler/I18N.pm
SHA1 b0cd7d57e9e816c71c5ff9a531c200fed78a514c lib/HTML/FormHandler/I18N/ar_kw.pm
SHA1 89a64cfde531f5a9c139a4971f23ef04b2d3e4d8 lib/HTML/FormHandler/I18N/bg_bg.pm
SHA1 fd4e1e6fa3a3c0dc88812856a81d700c292cb947 lib/HTML/FormHandler/I18N/ca_es.pm
SHA1 1f5d378815f185d4fc40d01ca794672b44526a4a lib/HTML/FormHandler/I18N/cs_cz.pm
SHA1 a29a99bb069553d3213b85bafcc8c99c11e83078 lib/HTML/FormHandler/I18N/de_de.pm
SHA1 fb7dc64824cb10064e5e712db20a41307054fce3 lib/HTML/FormHandler/I18N/en_us.pm
SHA1 3ffae34de630b1d99f35f1f9ea2d5ee2cce7f042 lib/HTML/FormHandler/I18N/es_es.pm
SHA1 3431a281ac1c8e208dc678b36522aa371ecf47b1 lib/HTML/FormHandler/I18N/hu_hu.pm
SHA1 468bc8a0862c4397a393c260941ba80129980101 lib/HTML/FormHandler/I18N/it_it.pm
SHA1 78e8ab8ebd8bdaed093980cf13a025b7903a874d lib/HTML/FormHandler/I18N/ja_jp.pm
SHA1 fbaaf65c6b3e7ee6a47bc6fb8bd7aee4eb05a101 lib/HTML/FormHandler/I18N/pt_br.pm
SHA1 c6d90e882741a938c715b131658ba182b4e16a72 lib/HTML/FormHandler/I18N/ru_ru.pm
SHA1 114e508efd77e7ac1c4af0ba68901412b284c9db lib/HTML/FormHandler/I18N/sv_se.pm
SHA1 5d06c9c3b31c7e9dccda973fe18840c7f5314bf0 lib/HTML/FormHandler/I18N/tr_tr.pm
SHA1 7c6d529da64ceb4d1067ba7774af45510ccebb18 lib/HTML/FormHandler/I18N/ua_ua.pm
SHA1 3e5c6a3669f4503b78f7a643deb851583b0cf5c1 lib/HTML/FormHandler/InitResult.pm
SHA1 82dd401d265955378d9767fc98188d17ffa5f96d lib/HTML/FormHandler/Manual.pod
SHA1 840719d0c3160d664bfd8e012b5337d96a774043 lib/HTML/FormHandler/Manual/Catalyst.pod
SHA1 f4206eabefd0b8aa15e393a1c79b9cfab603eed7 lib/HTML/FormHandler/Manual/Cookbook.pod
SHA1 2c10bd3851d4bd0d9b20050d2cff1d973ff33e2f lib/HTML/FormHandler/Manual/Database.pod
SHA1 455e658e75e90ab4dd0f8b6e3ac0ec5a1ed7e8b4 lib/HTML/FormHandler/Manual/Defaults.pod
SHA1 bc1dd7480e36e489538626aa20b50d257fc011d6 lib/HTML/FormHandler/Manual/Errors.pod
SHA1 09a06eec5db80bfeba12bb7ae75e7bc727b7563f lib/HTML/FormHandler/Manual/Fields.pod
SHA1 586f6f65cd48db4f8be66bace3c478670a77326b lib/HTML/FormHandler/Manual/FromDFV.pod
SHA1 0b08a48531606337e59d0de5ae059d26bc2b6561 lib/HTML/FormHandler/Manual/FromFF.pod
SHA1 d3cb5856148dddb388b9b4de9cafd08822b60542 lib/HTML/FormHandler/Manual/InflationDeflation.pod
SHA1 0ce39aa42a3978fa0ddb78d184f4e3f70f31e057 lib/HTML/FormHandler/Manual/Intro.pod
SHA1 53790bdbc39ee155897fc2d81888eab986baecfd lib/HTML/FormHandler/Manual/Reference.pod
SHA1 32c65323001757194175d06e1c071849a6f9ede7 lib/HTML/FormHandler/Manual/Rendering.pod
SHA1 35ee239c54cdd4f7d52a155a6738cc47bf4c4341 lib/HTML/FormHandler/Manual/RenderingCookbook.pod
SHA1 d7143feb18c0e5b4fdd38cc2dc0f396d086ef427 lib/HTML/FormHandler/Manual/Templates.pod
SHA1 51f7d8dcaecdfd6c5b7d70a40683498e47dd5113 lib/HTML/FormHandler/Manual/Testing.pod
SHA1 af3c3493b2fb8758a03e0635f5e8d72dba597b8f lib/HTML/FormHandler/Manual/Tutorial.pod
SHA1 8769cb2db66146cdc862c65dc3a80cc8c8064aba lib/HTML/FormHandler/Manual/Validation.pod
SHA1 9e1d3bb99ef3d99b595a0686881790a53b722459 lib/HTML/FormHandler/Merge.pm
SHA1 0fdd17b1f4eeb28afd9d2cf5634333f064e8f347 lib/HTML/FormHandler/Meta/Role.pm
SHA1 5aac544dc81cc3c817bbd9d8eaeda0395ced0366 lib/HTML/FormHandler/Model.pm
SHA1 7efcc781a37e622e9f61430f494c671751331c7a lib/HTML/FormHandler/Model/CDBI.pm
SHA1 846bfa7a19ebafc69917c6c73f8829c709a8010c lib/HTML/FormHandler/Model/Object.pm
SHA1 642273476c9fd6b7ce5891345e2a38c985859737 lib/HTML/FormHandler/Moose.pm
SHA1 228a84bb1fca3f786e1ce08a94f597ae821a35a3 lib/HTML/FormHandler/Moose/Role.pm
SHA1 8cd0a94a63b79f6411203aeda80a3c38d0611b38 lib/HTML/FormHandler/Page.pm
SHA1 19936c5dab62e0d9b4709e337d2a20f5af166e42 lib/HTML/FormHandler/Page/Simple.pm
SHA1 1d28f85f17d570b7bbe1e4d75ffc5b0e90f8526a lib/HTML/FormHandler/Pages.pm
SHA1 3d97ef2dc65ec8efd6c0b46595e90a01105b484a lib/HTML/FormHandler/Params.pm
SHA1 3689890c0a3a30c85a89f9b850ba11e26c94221a lib/HTML/FormHandler/Render/RepeatableJs.pm
SHA1 f8061e091e1663fa416655f3ac7c5c9934ef42ef lib/HTML/FormHandler/Render/Simple.pm
SHA1 faaf5fd36ad5923c01e87d383f76b92f76f52ac9 lib/HTML/FormHandler/Render/Table.pm
SHA1 b8d3c8f806326bc3755578c17727d9358dcd80f6 lib/HTML/FormHandler/Render/Util.pm
SHA1 d4ef46c39fd07b5a321d0eb2742ded252727fb9b lib/HTML/FormHandler/Render/WithTT.pm
SHA1 35a7e17d73329dd334d829d2167bbcbc7f61fb5c lib/HTML/FormHandler/Result.pm
SHA1 11d58b8ca882bc3d63f8a0655ce90b79477efac6 lib/HTML/FormHandler/Result/Role.pm
SHA1 da3fc1ced14b943c5e09cb7cc01ee1aaac68ac1f lib/HTML/FormHandler/Test.pm
SHA1 f4121774be5785f6c6fc2b4e993fbe78d9b8d8b2 lib/HTML/FormHandler/TraitFor/Captcha.pm
SHA1 22dfb0bbf1a422aac3fd40920d44396ce4eb6253 lib/HTML/FormHandler/TraitFor/I18N.pm
SHA1 369de94d2245cbe3423304d3bc3c29d11e24a1df lib/HTML/FormHandler/TraitFor/Types.pm
SHA1 905176afe01a398d3272cfdb2819db6a6012bd99 lib/HTML/FormHandler/Traits.pm
SHA1 3b1147b389c1ff15ac38b7fdc6a41f247cecc95f lib/HTML/FormHandler/Types.pm
SHA1 89aa8095cb6d3e5da54e8b07b1418c00d011363d lib/HTML/FormHandler/Validate.pm
SHA1 bbdbbe438e4ea9afd9b8a8b2f731f4c6c9b21ccc lib/HTML/FormHandler/Widget/ApplyRole.pm
SHA1 d5a98fc5184526cb163c31887d1dfe85142f9134 lib/HTML/FormHandler/Widget/Block.pm
SHA1 251374e3914a5fba9169813e1162356ae9cdbda9 lib/HTML/FormHandler/Widget/Block/Bootstrap.pm
SHA1 8e81f440565a2cae100798048e46a5dea5f42407 lib/HTML/FormHandler/Widget/Field/Button.pm
SHA1 e84fb8be92ff744160973b39d2830ea4391020dd lib/HTML/FormHandler/Widget/Field/ButtonTag.pm
SHA1 22364764fc96db988c9a6509026e2f76dc47571f lib/HTML/FormHandler/Widget/Field/Captcha.pm
SHA1 a1756fd01ccf06c48b2fbd0524ccedb4a520b26a lib/HTML/FormHandler/Widget/Field/Checkbox.pm
SHA1 b11e165f82da7f051d196f6ca9ef74a82d9d95de lib/HTML/FormHandler/Widget/Field/CheckboxGroup.pm
SHA1 d96885ee9d7fbdc058fe870af43694acb5d16943 lib/HTML/FormHandler/Widget/Field/Compound.pm
SHA1 4e0987af5cdb933d6906aa9176e583dbd71eec86 lib/HTML/FormHandler/Widget/Field/Hidden.pm
SHA1 773e977c360298774a7d7057983b13d9c98f00c2 lib/HTML/FormHandler/Widget/Field/HorizCheckboxGroup.pm
SHA1 bc04e9d132f0d124067b9d9aa4e44b52d8ac3eec lib/HTML/FormHandler/Widget/Field/NoRender.pm
SHA1 ecf6cf901ad55689622e3c0173ee68d1f1287da2 lib/HTML/FormHandler/Widget/Field/Password.pm
SHA1 3f5d4c31cc313eb8ab924bcaedfed89b2f149752 lib/HTML/FormHandler/Widget/Field/RadioGroup.pm
SHA1 f42e14a6d8c50e6075cf250b4e9b9c32ed6c73a2 lib/HTML/FormHandler/Widget/Field/Repeatable.pm
SHA1 198be2917de3c163169fec4a963076054cd2eff9 lib/HTML/FormHandler/Widget/Field/Reset.pm
SHA1 8cb1de8af89010fa162046bb1d72a4c38f14fceb lib/HTML/FormHandler/Widget/Field/Role/HTMLAttributes.pm
SHA1 0286f99eb83fc2f86475377ad4caae4443b53f42 lib/HTML/FormHandler/Widget/Field/Role/SelectedOption.pm
SHA1 71df059772e8e30538fa25531acc8da1a8c41c2b lib/HTML/FormHandler/Widget/Field/Select.pm
SHA1 b0030431d05bb660ecc52e887ef8c2bab90b6969 lib/HTML/FormHandler/Widget/Field/Span.pm
SHA1 de84bf53492f01ce2a556ebf17252eb38a375592 lib/HTML/FormHandler/Widget/Field/Submit.pm
SHA1 1c18fd146c99d7223c360df7e0093026efa34c54 lib/HTML/FormHandler/Widget/Field/Text.pm
SHA1 a570aae30c2b83b50933e7de335a23192b34b16c lib/HTML/FormHandler/Widget/Field/Textarea.pm
SHA1 4e5148aaba715555c35bf9809bcf501a35966750 lib/HTML/FormHandler/Widget/Field/Upload.pm
SHA1 45719071268f8afff85920ff112d16d5bea7a5fb lib/HTML/FormHandler/Widget/Form/Role/HTMLAttributes.pm
SHA1 c6c5d772002376ca95ecd324c1c40f254399941c lib/HTML/FormHandler/Widget/Form/Simple.pm
SHA1 f10f6c1efb0ce00ae81d130b4c6bceb35de403ab lib/HTML/FormHandler/Widget/Form/Table.pm
SHA1 5ac3513f597057c2367d4f2b52c3d8d64130a57e lib/HTML/FormHandler/Widget/Theme/Bootstrap.pm
SHA1 44308d870686aed3e594a5606cbd0ff8e7a46968 lib/HTML/FormHandler/Widget/Theme/Bootstrap3.pm
SHA1 3dd089e431093dc5223f721fc12d5c602a7ef57f lib/HTML/FormHandler/Widget/Theme/BootstrapFormMessages.pm
SHA1 b17311df5babce4a086988fed5fe93ca67c9f3d1 lib/HTML/FormHandler/Widget/Wrapper/Base.pm
SHA1 1c23982a3a373bcf5f3bccba7a63c01c18eea514 lib/HTML/FormHandler/Widget/Wrapper/Bootstrap.pm
SHA1 ca2b192f076665d31ecc8eae8e9cb696cbf1cf26 lib/HTML/FormHandler/Widget/Wrapper/Bootstrap3.pm
SHA1 bdfdb7829efb4b89ce84115d11a318bcffe02d70 lib/HTML/FormHandler/Widget/Wrapper/Fieldset.pm
SHA1 8276f81bb28acd9aec9f1cff58a191761b1382c2 lib/HTML/FormHandler/Widget/Wrapper/None.pm
SHA1 a0bb3a48af3d794abb1c65b07bdbb6a147fded67 lib/HTML/FormHandler/Widget/Wrapper/Simple.pm
SHA1 893420fc04a0fa1df5e30795770eddb1aea18236 lib/HTML/FormHandler/Widget/Wrapper/SimpleInline.pm
SHA1 013b3da4192fcf157c725079f66fa9e8cdf2182b lib/HTML/FormHandler/Widget/Wrapper/Table.pm
SHA1 af8471b12bc7c1f52c7869f3aa0b08cab0612bdd lib/HTML/FormHandler/Widget/Wrapper/TableInline.pm
SHA1 de98b4632bab65c91fec92d1f032f5a9d372c600 lib/HTML/FormHandler/Wizard.pm
SHA1 794da1f2f7c41af8edd5fc53e766a33072c10c91 share/templates/field/button.tt
SHA1 3681fc90aef0523ca43663e10a2e2798d7a413ab share/templates/field/checkbox.tt
SHA1 acc9394577fdda7a1408ee052792c70f00340c34 share/templates/field/checkbox_group.tt
SHA1 86d4b217c985f6a4f501b32f4c92a8e388285f1d share/templates/field/compound.tt
SHA1 67db06d5868ee6bd9ef38350325436f4da3e19ac share/templates/field/hidden.tt
SHA1 44ac0e6fc4db1bcfe561598258528e6f0000f37e share/templates/field/password.tt
SHA1 c5c430236706e7bcbb2d88b43c3fdd10ea7b8fa5 share/templates/field/radio_group.tt
SHA1 a660124b371ce25428bc1a9f9facaa31eca9d8cb share/templates/field/repeatable.tt
SHA1 cb99bbd10c2067d02e0e9b7a898e7535a1108c59 share/templates/field/reset.tt
SHA1 5de099392c362013ea3dc49c17be7f01cac987fc share/templates/field/select.tt
SHA1 776c16b7c5744cd197bdeb8b7b2981ec631eab31 share/templates/field/submit.tt
SHA1 f539376e39505417ed106c9a8239aad1102ee226 share/templates/field/text.tt
SHA1 5ed10a483ec32dde1dbcd92a9c89e364ec75c401 share/templates/field/textarea.tt
SHA1 d963677f9ec0d30e1abe3a604fbc6a80c8489498 share/templates/field/upload.tt
SHA1 b2faa01201389f379517e3955f686b04c045793a share/templates/foo/checkbox_tag.tt
SHA1 90d389dd6cd2ad7431f9172a225eea49975a3712 share/templates/foo/end_form.tt
SHA1 b128ee5ab6181501a2a7675efa8d908845e545f7 share/templates/foo/field.tt
SHA1 04b81260d43b3c7a4cd324556f6e9ab47f1e2644 share/templates/foo/form.tt
SHA1 d21cd1dc150147d5688ae048dc0c1f3c5ae59283 share/templates/foo/input.tt
SHA1 dbc5ab703565e950469a288390dfd94be437d7d2 share/templates/foo/input_tag.tt
SHA1 5886e336a836a6ce4df0559dee82cfcd30ff35eb share/templates/foo/label.tt
SHA1 63cb1701b6b97d8c092b5b5afd66cd03faaf5dfd share/templates/foo/start_form.tt
SHA1 378ff945471b9b88de9a04cec914d900dc2dd06f share/templates/form/form.tt
SHA1 78b7b8068756334ca53c8a7624076918c71fce40 share/templates/form/form22.tt
SHA1 90d389dd6cd2ad7431f9172a225eea49975a3712 share/templates/form/form_end.tt
SHA1 8b310b0206b7126daf1d7812a884df95e3751c70 share/templates/form/form_in_one.tt
SHA1 63cb1701b6b97d8c092b5b5afd66cd03faaf5dfd share/templates/form/form_start.tt
SHA1 27e0470ee115b9f96c9cef602703e71c0d71b725 share/templates/wrapper/fieldset.tt
SHA1 a6f1dc7378d74c91fca73dd9cda322636c9f6dc8 share/templates/wrapper/label.tt
SHA1 475346c385a4f2fdd668aab9f6b0e1f8d63522d0 share/templates/wrapper/none.tt
SHA1 96b3d105205e2bde31af480ae3774c6c58c1589d share/templates/wrapper/simple.tt
SHA1 edbdd55a879e452a4bbd0efad463c2be27dcb80d share/templates/wrapper/wrap_label.tt
SHA1 d55b2da9ebb18c4da78ae398a555d19728397acd t/01app.t
SHA1 488cbed50b454798db401dc8e2720ec601b6df68 t/author-eol.t
SHA1 cd5f377bc07357aae0ddf592fdf97aef6ff60489 t/basic.t
SHA1 9ccc83343d981613ac0c71f941a206b9d50223e4 t/blocks/basic.t
SHA1 d164545e6a42ed3cc2e8323abe759ace1b2f8765 t/blocks/block_list.t
SHA1 0ac8fde2c904dfb30544de720fbef9c9580c4bd7 t/blocks/blocktags.t
SHA1 b1f78d867fcf6aa011d9286ab1d05e018a49eddf t/blocks/loading.t
SHA1 1e8ec64e5640cfccfdfe2d0d2ab921d25891a917 t/blocks/nested.t
SHA1 f09cd0aba1ed89940f4b3e75d6dbd8b7b6235ab6 t/blocks/render_units.t
SHA1 733e77823d3d86ea38382d691397353b87ac26ab t/bootstrap/basic.t
SHA1 7301ecf03852708029d8e59997e149590f596f60 t/bootstrap/control_states.t
SHA1 ae16a51d2a268b80c575175904cd6795073636ae t/bootstrap/controls.t
SHA1 6110d50ed54a4606e882494064c11d933bd766ae t/bootstrap/ext_controls.t
SHA1 eaa1754ec21ec4fd417ba15d1cded0002169b36d t/bootstrap/inline.t
SHA1 8e7d351b4f1b296106c6928785c02c69745c7338 t/bootstrap/other.t
SHA1 125b1f1217851c8d468d33316a017b8756b63221 t/bootstrap/search.t
SHA1 b7f3d404d5ae0aa94c1b5f61f7e5582beb983a45 t/bootstrap3/basic.t
SHA1 3ba503de363c86bbe821e986455bad58f95976d7 t/bootstrap3/controls.t
SHA1 fbac5e409e361615cd723635299cf7e06132b01c t/bootstrap3/horiz.t
SHA1 cfc7b730c83305dd93946678c4289cb4e401de08 t/bootstrap3/horiz_checkboxgroup.t
SHA1 0718779ad9787d39230aa12efdb0ecf3d0cee275 t/bootstrap3/inlinecheckboxes.t
SHA1 aa4a34c0a641d66ca56140cbcc732b5942d34b79 t/bootstrap3/layout_classes.t
SHA1 99db89ba2029b09d8aceebe7ca3a0d2a4bc3804e t/compound/basic.t
SHA1 076f5508b176cc8df148e3c54f8c02506c61ebfc t/compound/default.t
SHA1 5113d3260a143cbb4214c532b0267013485f9866 t/compound/empty.t
SHA1 3484c409ef375e7c7a383fe1a21afdffa88bcb67 t/compound/include.t
SHA1 e70e61d29017ca572169563f5bc5f04409d75223 t/compound/select.t
SHA1 9b3346315f550ac726c9733c750ff26cf205789e t/errors/basic.t
SHA1 45c2969b6e22b940d89c282f29cb12393320b5ce t/errors/compound.t
SHA1 96b02b3f93ab1c096ab6e64d6cadfde6cfb887eb t/errors/form_messages.t
SHA1 4da7ca25cadbdddd2c61f5fd43b8d46568e03c6a t/errors/messages.t
SHA1 a98bd1e8013013d26ca7ecd2bdcac079969a255a t/errors/req_message.t
SHA1 b34ec719574cc0bbad22b820a6ba617f8f7afcdc t/field_setup/checkbox.t
SHA1 39c71d5c367b29a0ca4fc7a8b96ce19f226cb913 t/field_setup/compound_update_fields.t
SHA1 d0e5f8d2b24883af8e1d835c7f777b0cc4dbcf80 t/field_setup/defaults.t
SHA1 d48b9904cd8546c3fd23653628bb0aad999e7b51 t/field_setup/disabled.t
SHA1 c9ce3ecb482109d83fdac934784d81f5c21ee743 t/field_setup/id.t
SHA1 4867c2f3cfc14d5b82e3ce8177dc4b355771ec6c t/field_setup/inactive.t
SHA1 97744c22607da7adacafa6a3952bc0568a817de8 t/field_setup/init_object.t
SHA1 3963aec76768a163add932eb82d3700ef19c0820 t/field_setup/input_param.t
SHA1 e5e246a2d74b0cf478c859fa7f5d59f26e4886ac t/field_setup/missing.t
SHA1 99b4bed094f697439910d0106e1018a4688f209f t/field_setup/plus_field.t
SHA1 5ef5f0dca7f29790083872ded07fbdaddba5b4b5 t/field_setup/update_fields.t
SHA1 ee3294fdd0643d1a13fdf0f813f6b75b5c1762fa t/field_setup/update_subfields.t
SHA1 c79522cffc29aa7a10f478a7a2cf206a8d5bdc98 t/fields/dates.t
SHA1 b49610114fcca34d34b2d3a302efeb7a4499c8fe t/fields/display.t
SHA1 4e7421c927b94f2c8a49f3cffbe20526a7ed26b5 t/fields/fields.t
SHA1 32ffb3e7403b82fd033326ed8dfa1950330f8f99 t/fields/float.t
SHA1 1c7e3714c63b6ca0f42bad837b9fde746bcfac2c t/fields/formhandlerx.t
SHA1 eb62c3ad672f8697c0cf6eafd6a5474c904cee8d t/fields/novalue.t
SHA1 03e8a04c7c3e5590deea887bb176e59dcea90472 t/fields/password.t
SHA1 544f7a16def20df3347f502e3357b85a435d1671 t/fields/repeatable.t
SHA1 8989c771bf86ea48804f9016aa8481aa7120711a t/fields/select.t
SHA1 f233d0276585178953f92da2dbd51b8482676c0d t/fields/select2.t
SHA1 267cb4dddb0fb7e7ba5c93b33c209fc95c50dbbf t/fields/selectcsv.t
SHA1 62c3a4d7ef2aafbfe365d29244f8030b9db298e8 t/fields/textcsv.t
SHA1 7846a6c8a3ab1463756f3cb97edd688e1431a8c6 t/form_setup/api.t
SHA1 4e01795fb844699a5482d0429bf678d63002b94a t/form_setup/clone.t
SHA1 76bef41216e5703501cbdc5e1524ad6d9e9693df t/form_setup/compound_field_list.t
SHA1 f4bf6e023e39186b1fe371e41033c689ea0fcc84 t/form_setup/config.t
SHA1 f6d1ddf31d2715bc0e0fae057905658bd9234cb1 t/form_setup/dynamic.t
SHA1 3322e427487ebea857befbdde07f3ec404a7047e t/form_setup/include.t
SHA1 d0eb67a45078195f6d4a3281f51cf66820ed31db t/form_setup/init_obj.t
SHA1 93559f482788e583eb24d7bcb5fd1187b4e66a4b t/form_setup/no_update.t
SHA1 4b95ce6100c2b052109ec965ac52c864a58f751b t/form_setup/posted.t
SHA1 0972c2048c440a92020f7eba9473e09eac3105ea t/form_setup/render_roles.t
SHA1 12375d16dfb7f3c00385c0834976e594172319d3 t/infl_defl/comp_field.t
SHA1 8685c2e531341016ed61439c2ab9df7b50818266 t/infl_defl/default.t
SHA1 e1cb08e56c1268ea619c5bf80731b90047f95735 t/infl_defl/defl_lives.t
SHA1 458176d710595080122f1ee6d93adfc5938dc87d t/infl_defl/infl_defl.t
SHA1 8e2043b8edf2a460282743a6edfb15859958426d t/infl_defl/infl_transform.t
SHA1 cda457f835bc268a1d3c4e6d7b177ab4a4e2be51 t/infl_defl/variations.t
SHA1 e330f72586852fb7f18c444008ab792c3e04b6c6 t/lib/BookDB/Form/Upload.pm
SHA1 f5a80fcbc4f14894c274ea1e896067cc45143312 t/lib/Field/Address.pm
SHA1 df80db13f94fe5044c995228ade46b8cd341045e t/lib/Field/AltText.pm
SHA1 498e59d660a0b78b32565494484cb75ce9cad9c3 t/lib/Field/MyField.pm
SHA1 3de5695a354809ff50f2900d257ec7eb195f9db7 t/lib/Form/Address.pm
SHA1 3fa8edbecc482588a667d4ff0f938da4ab60b3c6 t/lib/Form/AddressRole.pm
SHA1 37ae2600a3998048b253de1e96ee7b7d7597281c t/lib/Form/Multiple.pm
SHA1 f01a56814525ff213d829b7499bbfef06fc90538 t/lib/Form/MultipleRole.pm
SHA1 cf460b1f0a0106df286bffeae39cc321472d4e7b t/lib/Form/NoExtForm.pm
SHA1 58469593246683e39a8fa3bdcf07b2669c9cb59a t/lib/Form/Person.pm
SHA1 51ceda9acbd63d49a81a959adc27285a42e5ff27 t/lib/Form/PersonRole.pm
SHA1 94cd172b90fd02eab01eb6e528c9e701eb914fd1 t/lib/Form/Test.pm
SHA1 d6ce4712417f325870983a7e6f7d07e52c10974f t/lib/Form/Two.pm
SHA1 d92e6eaa78b5fe830c108a1f91fb0aa6ea82cd39 t/lib/MyApp/Component/Section.pm
SHA1 5239c744281b45b5ee49e4498fe5a04822ea1766 t/lib/MyApp/I18N/abc_de.pm
SHA1 3b549a8c8d4fdc4e55ec323fac3eaf48111f8320 t/lib/Widget/Block/Test.pm
SHA1 364e324607d74434dc26938a08fec784de110737 t/lib/Widget/Field/Omega.pm
SHA1 7d6fdb503d9aee63eb6a79ec86d33997faf8b383 t/lib/Widget/Field/TestWidget.pm
SHA1 eed8ac3446c4a13d80720503345cfb54395571b9 t/memory_cycles.t
SHA1 725aeac4b9c347859d451fe700fd5988dab60055 t/moose/build_id.t
SHA1 9489e970b3d3f5bd0ca82ba7704a0589546d278c t/moose/composed.t
SHA1 7ad31d0a34a696fc1b05aca77302b050abeb189a t/moose/field_traits.t
SHA1 1908e358a05fb889f1d3e76bc462df747766f5eb t/moose/no_extend.t
SHA1 2fcb1cf1667bbf821cac0eba3389357dec953857 t/moose/subclass_roles.t
SHA1 6af16b8f551ada3ee2e7c260d3573ca095bdf503 t/release-no-tabs.t
SHA1 d69dcbcff41cd0df28bf36527ddb37d447754932 t/render/actions.t
SHA1 c1191d24fc2785ef40103d2191e87dfe92ee71e9 t/render/array.t
SHA1 5a953cb7108e91b26087649ce7aa7cf9d213b650 t/render/basic.t
SHA1 07244bfe73f681547ed1f51fa6f9b81d17ce356a t/render/checkbox.t
SHA1 8541c93eca5d0804ae369fd226022c2371193621 t/render/checkbox_group.t
SHA1 a5df3850dc018534a798cb15ea6150c00e165753 t/render/classes.t
SHA1 b3bb4fcdaf7528300f7d3853c768812d86fe0f78 t/render/compound.t
SHA1 8e30bceab9974e70669803515b19ba17848877f2 t/render/compound2.t
SHA1 9d74a680a8b8420ccf65fca01ed631c25ca8e724 t/render/display.t
SHA1 4e2142b5f91f776af188e3edeea4b8530ed0f59f t/render/errors.t
SHA1 e9779e6c5b64ac56a003e9ce4678b1f61149c5f3 t/render/escaping.t
SHA1 34169ac2fd52733922c55e3b1371ac47d3d49d9c t/render/ff.t
SHA1 ae10e2cea31a74caae799668c2742e9596dc2a85 t/render/filter.t
SHA1 baee60bf749cdd64dbe05404b5fbb97f9246f07b t/render/form_errors.t
SHA1 10c270e17ff97aebde06110159bb3662ccdfc7b5 t/render/get_tag.t
SHA1 782a804a2ed9a197f983ef954a31babd316a35c7 t/render/html5_attributes.t
SHA1 ae53d67a44b13e3c1da6fcc79bca8c9221c974f0 t/render/html_attr.t
SHA1 93a47fa99029371cca018337acd5a56911a90064 t/render/html_attributes.t
SHA1 429398d9de168ed3f03b6d4ce01ab1bdccc787e6 t/render/inline.t
SHA1 f43bbd9c8aedd00c513e72a5748bce5355b188b3 t/render/label.t
SHA1 055b6f61d8e45ddb9b2c6905680dcb70b256c63b t/render/noneditable.t
SHA1 5b88d772b395d9f2876be4e8e1498ba6266842e2 t/render/optgroup.t
SHA1 654948efd382323ce4bb0d267f4f9c168868204b t/render/radio_group.t
SHA1 7175a9276b2f6cabcd4382ef846ec84157ba79d4 t/render/rep_fieldset.t
SHA1 b6ef18105cb6d136f78217e38f42f09f93c7d2f6 t/render/rep_wrapper.t
SHA1 406f852e54337b6b1888398e6042f399cbffb9fc t/render/repeatable.t
SHA1 b9b3e4d218182714100a52561502c9c14e34bb1b t/render/result.t
SHA1 90e802e12c26b25a7f88802cfdcc3eb6f1ae9198 t/render/select.t
SHA1 17dc198e476104266c590d5dd8bc61c8f7934c1d t/render/simple.t
SHA1 544a4a24dcb34fc50fc4c18ebc6aaa48f5cceb3a t/render/submit.t
SHA1 7ac35647e2a90f8de10a0b8f5569ce2728c2972b t/render/table.t
SHA1 17c04b46c520260fadf04cc4a7c5acdc0004dcb2 t/render/tags.t
SHA1 aa807aff3acbda893ccbd6400c1c473fcf67189d t/render/tt_render_elementx.t
SHA1 d977f8cecf28d424cde917093535cbfc6fb27ea3 t/render/util.t
SHA1 f4e53913e5882a765e13e93d84d5a498a03569fa t/render/widget_loading.t
SHA1 98dcba91ccb83597ef0170ad045291bded439c41 t/render/widget_tags.t
SHA1 93033625a3a956991cfb3e5354141a3e924aab0d t/render/widgets.t
SHA1 7d5d0825b48ea1047f5de81e696daebca856df32 t/render/with_class.t
SHA1 23ea3683a53943fcba024599cbba28761cb5b8e4 t/render/withtt.t
SHA1 fe4e8b94c36d1707101b3d329069172536e4aa6e t/repeatable/defaults.t
SHA1 2778a516f22e0b0d8d14db468304821fa262e3ab t/repeatable/empty.t
SHA1 0362d4289b5d7c15f31d0fc9aadc32738b894704 t/repeatable/has_many.t
SHA1 388ed334251b9db9f096a6884c01ff00e3e3fe2b t/repeatable/hash.t
SHA1 34075dacb6d838e9f9b88e1966678230efaf87fb t/repeatable/js.t
SHA1 f50d0e2ed62e9a9a8e455aa4ccecc533801ee8ad t/repeatable/list.t
SHA1 c875b3c645f32bb58ee195aae4042a6e4851dc94 t/repeatable/nested.t
SHA1 4e0978924167cb79c7be49ffa104b9fffada8616 t/repeatable/nested2.t
SHA1 bf316fc1f7fb0ab2e90b50244fae2f7d71b5872a t/repeatable/num_extra.t
SHA1 f08e15a8370c204d16b4a4dd899f0b8c8f6f2773 t/repeatable/reload.t
SHA1 fbe8ae9d5062acb07c81ac8c5d733ac2be22154a t/repeatable/set_methods.t
SHA1 359087d5f8a029fabad7944fa3ff2af9c6a6ed79 t/repeatable/subfield.t
SHA1 b771d6ebc02f44fbebd3868894022a0bd959b001 t/result/basic.t
SHA1 e94436b6500a0e51fcfce7b217547775f65e58a5 t/result/blocks.t
SHA1 24b760833e98e72c96a41ab615568f825b0c358b t/result/compound.t
SHA1 14babbbd7dbbf7acf3e8a887066eb1b6a66b3259 t/result/errors.t
SHA1 724bf07cbf1f65c22fdf7c211ed758874f6d2aef t/result/repeatable.t
SHA1 b83f7770be71ea9e5b627f0323a207bf6e94efce t/structured.t
SHA1 ed8a1b0d5f149f02df2dde44f58fc814516171c8 t/template.t
SHA1 2c0584c0a616ec1f3ab7cef0b4310df844d45fce t/validation/apply.t
SHA1 c8b2d029acdc6c58ff0e44a25404549ac6c6680f t/validation/constraints.t
SHA1 a7469a1fb8a0e7b3e1af9e5dfd9674eae54e8d7f t/validation/dependency.t
SHA1 fa54bae035104eac9559c449aa0d80ba8e2649d3 t/validation/filters.t
SHA1 8bebaf81f0a777a646972ea49a0e07b0d700effe t/validation/reqwhen.t
SHA1 8e379034c33ab1ee3d70c6e9db1b067777bf7f86 t/validation/type_tiny.t
SHA1 9217945ea0f55aef934824ab82fb2f2c88dcd67e t/validation/types.t
SHA1 60761cd04a6350433097c91e438bef74f5ca53b7 t/validation/validate_coderef.t
SHA1 bc0b36210f8c7fcc56c9fb9b805cbc993c4394bf t/validation/when.t
SHA1 8e040ebd13ce2e819310418baeca2b44c46eadf0 t/var/form1.pl
SHA1 2d8d392a1c132b6c6f49fbf2c8eea327d89f1104 t/var/form1.yml
SHA1 d23691c4eb64f6237f37959e18ac1d40b0d5c618 t/wizard/basic.t
SHA1 6cbc9f61f49670b2211f2fa5157631246b65ebf5 util/check_I18N.pl
SHA1 6df1c66c420e0f42840fa6d6c46daf4290630e7a util/get_messages.pl
SHA1 e2f1f4a7bd5660f67237752e4b26c57fb08e3187 util/messages
SHA1 86d255a7c9f065a13049108362c949b3e35a4c24 xt/02pod.t
SHA1 65ca268d24f92823c6a33fcbe7640857315e0d0e xt/add_field.t
SHA1 77fc699934e5885b083a8e4485ed3d20c76550b8 xt/captcha.t
SHA1 84bae2a79191282ea96e987c00439d7c72bcdad6 xt/captcha2.t
SHA1 a536583356d1f37258e77d8bae3491bd3b36793e xt/chbox_group.t
SHA1 2148bb20efb65181d062d0906e4d10a904735e2f xt/check_selected_option.t
SHA1 1edadbbec253933b48f5185dc9c367acb8472163 xt/custom_fields.t
SHA1 4c47aa23f9cdaf64d628ff069666a1caca5c385a xt/cycles.t
SHA1 6fe7330dcf9aeb70f6fb8f6f17d1a691df027f36 xt/dfv.t
SHA1 4e292478d5ce0ba4b4dc98cfffd15d767e442378 xt/display.t
SHA1 2a3193b807b6df2f6964d98a854b95b2bac12184 xt/email.t
SHA1 88654c3432fbde212db1de54ba74478ded6c38cc xt/eol.t
SHA1 0f80fc1a2dd60772c5ec83096af23b54398b63c1 xt/field_list.t
SHA1 e0bae1206838fa9f79e11899182601e1ede46176 xt/form_errors.t
SHA1 c08a4366a8d2aad7ac677541352d5ea3cd708043 xt/init.t
SHA1 a4f3c6e37039a856f555e8923dcb7b09809b24cf xt/lib/MyCatalystApp.pm
SHA1 b689a246cde895936371a1b33245a5c78e4eda68 xt/lib/MyCatalystApp/Controller/Captcha.pm
SHA1 aefd98c4a4d10ca1063ebc43d0ee979c01c46154 xt/lib/MyCatalystApp/Controller/Root.pm
SHA1 d02a4b95dfe88f5b748acdcd1efda6f4c53012d5 xt/load_field.t
SHA1 fbada2c08ac6f80f03050d4af4b0b889b03146b9 xt/locale.t
SHA1 183db3551cff148adc7d611af316f3739953afec xt/locale_data_localize.t
SHA1 db6e66c79f25cdcf6435f021499473475fdb15a1 xt/mb_form.t
SHA1 1ce3a2c875d974a0f81e1233be575386a1bc5612 xt/model_cdbi.t
SHA1 a4127156e8dad3f81624bf6b5f5683931f76f88f xt/multiple_forms.t
SHA1 94f2ae2ffc6b9e178bf144604b2b68d94af2ecb3 xt/order.t
SHA1 b89aefcbbc7f6fbb350932bdedd031b15c66cb9f xt/params.t
SHA1 1a18e8b9e12e2a35fe3e08a40547da667c047d3a xt/posted.t
SHA1 5554a5710a78de48ea5e7e639eb2483a33e72e40 xt/repeatable_clone.t
SHA1 0ad8d5fe3ee1aef6f9f78b7035cf7058ad0eb814 xt/submit.t
SHA1 11cfd9ee49b356722fc0b09c75b5110fed8759c2 xt/upload.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
iF4EAREIAAYFAlX61KsACgkQlX0ZOkgCuch6FwD+JydfsldLCRQema/oPZl8vOvO
GEXjMcAGyXjr/vTjbZkA/3dfScvCdq0H+lH4D4u8cod6wSg2KK6oFZwMqu12n0Un
=sp87
-----END PGP SIGNATURE-----
02pod.t 100644 000770 000024 276 12576552253 16213 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => 'Test::Pod 1.14 required' if $@;
plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
all_pod_files_ok();
email.t 100644 000770 000024 2121 12576552253 16365 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
BEGIN
{
eval "use Email::Valid";
plan skip_all => 'Email::Valid required' if $@;
plan tests => 7;
}
$ENV{LANG} = 'en_us'; # in case user has LANG set
my $class = 'HTML::FormHandler::Field::Email';
use_ok($class);
my $field = $class->new( name => 'test_field', );
$field->build_result;
ok( defined $field, 'new() called' );
$field->_set_input('foo@bar.com');
$field->validate_field;
ok( !$field->has_errors, 'Test for errors 1' );
is( $field->value, 'foo@bar.com', 'value returned' );
$field->_set_input('foo@bar');
$field->validate_field;
ok( $field->has_errors, 'Test for errors 2' );
is(
$field->errors->[0],
'Email should be of the format someuser@example.com',
'Test error message'
);
$field->_set_input('someuser@example.com');
$field->validate_field;
ok( !$field->has_errors, 'Test for errors 3' );
{
package MyApp::Form::Test;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'foo';
has_field 'email' => (
type => 'Email',
email_valid_params => { -mxcheck => 1 },
);
}
order.t 100644 000770 000024 767 12576552253 16407 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use Test::More tests => 3;
use_ok( 'HTML::FormHandler' );
{
package My::Form;
use Moose;
extends 'HTML::FormHandler';
sub field_list {
[
field_one => 'Text',
field_two => 'Text',
field_three => 'Text',
field_four => 'Text',
field_five => 'Text',
]
}
}
my $form = My::Form->new;
is( $form->field('field_one')->order, 1, 'first field order');
is( $form->field('field_five')->order, 5, 'last field order');
cycles.t 100644 000770 000024 710 12576552253 16542 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More 0.88;
use Devel::Cycle;
{
package FormHandlerMemLeak;
use HTML::FormHandler::Moose;
extends qw/HTML::FormHandler/;
has_field test => ( type => "Text");
sub default_test {
return "test";
}
sub validate_test {
return 1;
}
__PACKAGE__->meta->make_immutable;
}
my $i = FormHandlerMemLeak->new;
find_cycle($i, sub { fail("Cycle found") });
ok $i;
done_testing;
locale.t 100644 000770 000024 11204 12576552253 16557 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
use Test::Exception;
use HTML::FormHandler::Field::Text;
use lib ('t/lib');
# ensure $ENV is properly set up
my @LH_VARS = ('LANGUAGE_HANDLE', 'HTTP_ACCEPT_LANGUAGE', 'LANG', 'LANGUAGE' );
my %LOC_ENV;
$LOC_ENV{$_} = delete $ENV{$_} for @LH_VARS;
# a primitive translation package
{
package HTML::FormHandler::I18N::xx_xx;
use base 'HTML::FormHandler::I18N';
# Auto define lexicon
our %Lexicon = (
'_AUTO' => 1,
'You lost, insert coin' => 'Not won, coin needed',
'Test field' => 'Grfg svryq',
);
}
# a simple demo form
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'test_field';
}
my $form;
################ Locale -none-
$ENV{LANGUAGE} = 'en-US';
# create form w/o locale must work
lives_ok { $form = Test::Form->new } 'create form w/o locale lives';
ok($form, 'create form w/o locale');
is(ref($form->language_handle), 'HTML::FormHandler::I18N::en_us', 'locale en_us');
# ensure we know / don't know the translations
$HTML::FormHandler::I18N::en_us::Lexicon{'You lost, insert coin'} = 'XX Dummy 42';
$HTML::FormHandler::I18N::en_us::Lexicon{'Must insert a [_1] coin'} = 'Want a [_1] coin';
delete $HTML::FormHandler::I18N::en_us::Lexicon{'Test field'};
delete $HTML::FormHandler::I18N::en_us::Lexicon{'You won'};
# translating a known error works
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('You lost, insert coin');
is_deeply($form->field('test_field')->errors, ['XX Dummy 42'], 'error is translated into en_us');
# translating a known label
is($form->field('test_field')->label, 'Test field', 'Label w/o translation = ok');
# translating a known error with a positional parameter
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('Must insert a [_1] coin', 'cleaned');
is_deeply($form->field('test_field')->errors, ['Want a cleaned coin'], 'error w/parameter is translated into en_us');
# translating an unknown error also works
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('You won');
is_deeply($form->field('test_field')->errors, ['You won'], 'error is translated into en_us');
# translating an error with bracket issues
$form->field('test_field')->clear_errors;
dies_ok( sub { $form->field('test_field')->add_error('You are not authorized for this archive. See: [more information], [request authorization]') }, 'dies on maketext error' );
lives_ok( sub { $form->field('test_field')->add_error('An error with ~[escaped brackets~]'); },
'does not die when brackets are escaped with tilde' );
################ Locale xx_xx set via ENV{LANGUAGE_HANDLE}
$ENV{LANGUAGE_HANDLE} = 'xx_xx';
# create form w/ locale must work
undef $form;
lives_ok { $form = Test::Form->new } 'create form w/ locale lives';
ok($form, 'create form w/ locale');
is(ref($form->language_handle), 'HTML::FormHandler::I18N::xx_xx', 'locale xx_xx');
# translating a known error works
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('You lost, insert coin');
is_deeply($form->field('test_field')->errors, ['Not won, coin needed'], 'error is translated into xx_xx');
# translating an unknown error also works
$form->field('test_field')->clear_errors;
$form->field('test_field')->add_error('You won');
is_deeply($form->field('test_field')->errors, ['You won'], 'error is translated into xx_xx');
# translating a known label
is($form->field('test_field')->loc_label, 'Grfg svryq', 'label rot13 to xx_xx');
# remove from environment variable, so we can use builder
delete $ENV{LANGUAGE_HANDLE};
{
package MyApp::Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
use MyApp::I18N::abc_de;
sub _build_language_handle { MyApp::I18N::abc_de->new }
has_field 'foo';
has_field 'bar';
sub validate_foo {
my ( $self, $field ) = @_;
$field->add_error('You lost, insert coin');
}
}
$form = MyApp::Test::Form->new;
ok( $form, 'form built' );
$form->process( params => { foo => 'test' } );
is( $form->field('foo')->errors->[0], 'Loser! coin needed', 'right message' );
is( ref $form->language_handle, 'MyApp::I18N::abc_de', 'using right lh');
is( ref $form->field('foo')->language_handle, 'MyApp::I18N::abc_de', 'field uses form language handle' );
$form->process( language_handle => HTML::FormHandler::I18N->get_handle('en_us'), params => { foo => 'byebye' } );
my $field_lh = $form->field('bar')->language_handle;
is( ref $field_lh, 'HTML::FormHandler::I18N::en_us', 'field uses form language handle' );
$ENV{$_} = 'en-US' for @LH_VARS;
done_testing;
params.t 100644 000770 000024 4036 12576552253 16570 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use Test::More tests => 6;
use_ok( 'HTML::FormHandler::Params' );
my $_params = HTML::FormHandler::Params->new;
my $p1 = {
'book.author' => 'J.Doe',
'book.title' => 'Doing something',
'book.date' => '2002',
};
my $p1_exp = $_params->expand_hash( $p1 );
is_deeply( $p1_exp, { book => { author => 'J.Doe',
title => 'Doing something',
date => '2002' } }, 'get expanded has' );
my $p2 = {
'books.0.author' => 'Jane Doe',
'books.0.title' => 'Janes Book',
'books.0.date' => '2003',
'books.1.author' => 'Miss Muffet',
'books.1.title' => 'Sitting on a Tuffet',
'books.1.date' => '2004'
};
my $p_hash = {
books => [
{ author => 'Jane Doe',
title => 'Janes Book',
date => '2003',
},
{
author => 'Miss Muffet',
title => 'Sitting on a Tuffet',
date => '2004',
}
]
};
my $p2_exp = $_params->expand_hash( $p2 );
is_deeply( $p2_exp, $p_hash, 'get expanded hash for dot notation' );
my $p3 = {
'books+0+author' => 'Jane Doe',
'books+0+title' => 'Janes Book',
'books+0+date' => '2003',
'books+1+author' => 'Miss Muffet',
'books+1+title' => 'Sitting on a Tuffet',
'books+1+date' => '2004'
};
my $p3_exp = $_params->expand_hash( $p3, '+' );
is_deeply( $p3_exp, $p_hash, 'get expanded hash for plus notation' );
my $p4 = {
'books[0]author' => 'Jane Doe',
'books[0]title' => 'Janes Book',
'books[0]date' => '2003',
'books[1]author' => 'Miss Muffet',
'books[1]title' => 'Sitting on a Tuffet',
'books[1]date' => '2004'
};
my $p4_exp = $_params->expand_hash( $p4, '[]' );
is_deeply( $p4_exp, $p_hash, 'get expanded hash for bracket notation' );
my $p5 = {
'book.author' => 'Jane Doe',
'book.title' => 'Janes Book',
'book.date' => '2003',
};
my $p5_hash = {
book =>
{ author => 'Jane Doe',
title => 'Janes Book',
date => '2003',
},
};
my $p5_exp = $_params->expand_hash( $p5 );
is_deeply( $p5_exp, $p5_hash, 'get hash from single brackets');
posted.t 100644 000770 000024 3073 12576552253 16603 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::I18N;
$ENV{LANGUAGE_HANDLE} = 'en_en';
{
package Test::SingleBool;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'opt_in' => ( type => 'Boolean', required => 1 );
}
{
my $form = Test::SingleBool->new;
ok( $form, 'form built' );
$form->process( params => {} );
ok( !$form->ran_validation, 'form did not run validation' );
my $test = 'POST';
$form->process( posted => ($test eq 'POST'), params => {} );
ok( $form->ran_validation, 'form did run validation' );
ok( $form->has_errors, 'form has errors' );
my @errors = $form->errors;
is( scalar @errors, 1, 'form has an error' );
is( $errors[0], 'Opt in field is required', 'error message is correct' );
}
{
package Test::SingleBoolCompound;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'a' => ( type => 'Compound', required => 1 );
has_field 'a.opt_in' => ( type => 'Boolean', required => 1 );
}
{
my $form = Test::SingleBoolCompound->new;
ok( $form, 'form built' );
$form->process( params => {} );
ok( !$form->ran_validation, 'form did not run validation' );
my $test = 'POST';
$form->process( posted => ($test eq 'POST'), params => {} );
ok( $form->ran_validation, 'form did run validation' );
ok( $form->has_errors, 'form has errors' );
my @errors = $form->errors;
is( scalar @errors, 1, 'form has an error' );
is( $errors[0], 'A field is required', 'error message is correct' );
}
done_testing;
submit.t 100644 000770 000024 2463 12576552253 16612 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
use_ok( 'HTML::FormHandler::Field::Submit' );
my $field = HTML::FormHandler::Field::Submit->new(name => 'submit');
$field->build_result;
is( $field->value, 'Save', 'get right value');
ok( $field->result, 'returns result');
{
package Test::Submit;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
with 'HTML::FormHandler::Render::Simple';
has '+name' => (default => 'test_submit');
has_field 'some_field';
has_field 'submit' => ( type => 'Submit', value => 'Submit' );
}
my $form = Test::Submit->new;
ok( $form, 'get form');
my $params = { some_field => 'test' };
$form->process($params);
my $result = $form->result;
is( $result->num_results, 2, 'two results');
is( $form->field('submit')->input, undef, 'no input for submit field');
$form->process( { some_field => 'test', submit => 'Submit' } );
is( $form->field('submit')->input, 'Submit', 'input for submit field');
my $rendered = $form->render;
is_html( $rendered,
'',
'form renders');
done_testing;
upload.t 100644 000770 000024 7304 12576552253 16572 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
use_ok('HTML::FormHandler::Field::Upload');
use HTML::FormHandler::I18N;
$ENV{LANGUAGE_HANDLE} = 'en_en';
{
package Mock::Upload;
use Moose;
use File::Copy ();
use IO::File ();
use File::Spec::Unix;
has filename => ( is => 'rw' );
has size => ( is => 'rw' );
has tempname => ( is => 'rw', lazy_build => 1 );
has basename => ( is => 'ro', lazy_build => 1 );
has tmpdir => ( is => 'ro', default => '' );
has fh => ( is => 'rw', required => 1, lazy_build => 1 );
sub _build_fh {
my $self = shift;
my $fh = IO::File->new( $self->tempname, IO::File::O_RDONLY );
unless ( defined $fh ) {
my $filename = $self->tempname;
die "Can't open '$filename': '$!'";
}
return $fh;
}
sub _build_tempname {
my $self = shift;
return $self->tmpdir . $self->basename;
}
sub _build_basename {
my $self = shift;
my $basename = $self->filename;
$basename =~ s|\\|/|g;
$basename = ( File::Spec::Unix->splitpath($basename) )[2];
$basename =~ s|[^\w\.-]+|_|g;
return $basename;
}
sub copy_to {
my $self = shift;
return File::Copy::copy( $self->tempname, @_ );
}
sub link_to {
my ( $self, $target ) = @_;
return CORE::link( $self->tempname, $target );
}
sub slurp {
my ( $self, $layer ) = @_;
unless ($layer) {
$layer = ':raw';
}
my $content = undef;
my $handle = $self->fh;
binmode( $handle, $layer );
while ( $handle->sysread( my $buffer, 8192 ) ) {
$content .= $buffer;
}
return $content;
}
}
{
package My::Form::Upload;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+enctype' => ( default => 'multipart/form-data');
has_field 'file' => ( type => 'Upload' );
has_field 'submit' => ( type => 'Submit', value => 'Upload' );
}
my $form = My::Form::Upload->new;
ok( $form, 'created form with upload field' );
is_html( $form->field('file')->render, '
',
'renders ok' );
my $upload = Mock::Upload->new( filename => 'test.txt', size => 1024 );
$form->process( params => { file => $upload } );
ok( $form->validated, 'form validated' );
$upload->size( 20000000 );
$form->process( params => { file => $upload } );
ok( !$form->validated, 'form did not validate' );
# file exists, is empty
`touch temp.txt`;
open ( my $fh, '>', 'temp.txt' );
$form->process( params => { file => $fh } );
my @errors = $form->errors;
is( $errors[0], 'File uploaded is empty', 'empty file fails' );
# file exists, is not empty
print {$fh} "testing\n";
close( $fh );
open ( $fh, '<', 'temp.txt' );
$form->process( params => { file => $fh } );
ok( $form->validated, 'form validated' );
# file doesn't exist
$form->process( params => { file => 'not_there.txt' } );
@errors = $form->errors;
is( $errors[0], 'File not found for upload field', 'error when file does not exist' );
unlink('temp.txt');
{
package My::Form::Upload::NoSize;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+enctype' => ( default => 'multipart/form-data');
has_field 'file' => ( type => 'Upload', min_size => undef, max_size => undef );
has_field 'submit' => ( type => 'Submit', value => 'Upload' );
}
$form = My::Form::Upload::NoSize->new;
$upload = Mock::Upload->new( filename => 'test.txt', size => 4000000 );
$form->process( params => { file => $upload } );
ok( $form->validated, 'form validated with no size limit' );
done_testing;
Makefile.PL 100644 000770 000024 5436 12576552253 16444 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064
use strict;
use warnings;
use ExtUtils::MakeMaker 6.30;
use File::ShareDir::Install;
install_share dist => "share";
my %WriteMakefileArgs = (
"ABSTRACT" => "HTML forms using Moose",
"AUTHOR" => "FormHandler Contributors - see HTML::FormHandler",
"BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30",
"File::ShareDir::Install" => "0.03"
},
"DISTNAME" => "HTML-FormHandler",
"EXE_FILES" => [],
"LICENSE" => "perl",
"NAME" => "HTML::FormHandler",
"PREREQ_PM" => {
"Carp" => 0,
"Class::Load" => "0.06",
"Data::Clone" => 0,
"DateTime" => 0,
"DateTime::Format::Strptime" => 0,
"Email::Valid" => 0,
"File::ShareDir" => 0,
"File::Spec" => 0,
"HTML::Entities" => 0,
"HTML::TreeBuilder" => "3.23",
"JSON" => 0,
"List::Util" => "1.33",
"Locale::Maketext" => "1.09",
"Moose" => "2.1403",
"MooseX::Getopt" => "0.16",
"MooseX::Types" => "0.20",
"MooseX::Types::Common" => 0,
"MooseX::Types::LoadableClass" => "0.006",
"Sub::Exporter" => 0,
"Sub::Name" => 0,
"Try::Tiny" => 0,
"aliased" => 0,
"namespace::autoclean" => "0.09"
},
"TEST_REQUIRES" => {
"PadWalker" => 0,
"Test::Differences" => 0,
"Test::Exception" => 0,
"Test::Memory::Cycle" => "1.04",
"Test::More" => "0.94",
"Test::Warn" => 0
},
"VERSION" => "0.40064",
"test" => {
"TESTS" => "t/*.t t/blocks/*.t t/bootstrap/*.t t/bootstrap3/*.t t/compound/*.t t/errors/*.t t/field_setup/*.t t/fields/*.t t/form_setup/*.t t/infl_defl/*.t t/moose/*.t t/render/*.t t/repeatable/*.t t/result/*.t t/validation/*.t t/wizard/*.t"
}
);
my %FallbackPrereqs = (
"Carp" => 0,
"Class::Load" => "0.06",
"Data::Clone" => 0,
"DateTime" => 0,
"DateTime::Format::Strptime" => 0,
"Email::Valid" => 0,
"File::ShareDir" => 0,
"File::Spec" => 0,
"HTML::Entities" => 0,
"HTML::TreeBuilder" => "3.23",
"JSON" => 0,
"List::Util" => "1.33",
"Locale::Maketext" => "1.09",
"Moose" => "2.1403",
"MooseX::Getopt" => "0.16",
"MooseX::Types" => "0.20",
"MooseX::Types::Common" => 0,
"MooseX::Types::LoadableClass" => "0.006",
"PadWalker" => 0,
"Sub::Exporter" => 0,
"Sub::Name" => 0,
"Test::Differences" => 0,
"Test::Exception" => 0,
"Test::Memory::Cycle" => "1.04",
"Test::More" => "0.94",
"Test::Warn" => 0,
"Try::Tiny" => 0,
"aliased" => 0,
"namespace::autoclean" => "0.09"
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
WriteMakefile(%WriteMakefileArgs);
{
package
MY;
use File::ShareDir::Install qw(postamble);
}
template.t 100644 000770 000024 375 12576552253 16712 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t use strict;
use warnings;
use Test::More;
{
package MyApp::Form::Test;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'foo';
has_field 'bar';
}
my $form = MyApp::Form::Test->new;
ok( $form );
done_testing;
captcha.t 100644 000770 000024 4647 12576552253 16720 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
BEGIN {
eval "use GD::SecurityImage";
plan skip_all => 'GD::SecurityImage required' if $@;
}
use_ok( 'HTML::FormHandler::Field::Captcha' );
{
package Test::Captcha;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
with 'HTML::FormHandler::TraitFor::Captcha';
with 'HTML::FormHandler::Render::Simple';
has_field 'some_field';
has_field 'subject';
has_field '+captcha' => ( id => 'captcha', wrapper_class => 'captcha' );
sub validate_subject {
my ( $self, $field ) = @_;
$field->add_error("Incorrect")
unless $field->value eq 'Correct';
}
}
{
package Mock::Ctx;
use Moose;
has '_session' => ( isa => 'HashRef', is => 'rw', builder => 'build_session' );
sub build_session {{}}
sub session {
my $self = shift;
my $session = $self->_session;
if (@_) {
my $new_values = @_ > 1 ? { @_ } : $_[0];
croak('session takes a hash or hashref') unless ref $new_values;
for my $key (keys %$new_values) {
$session->{$key} = $new_values->{$key};
}
}
$session;
}
}
my $ctx = Mock::Ctx->new;
ok( $ctx, 'get mock ctx' );
my $form = Test::Captcha->new( ctx => $ctx );
ok( $form, 'get form' );
my $rnd = $ctx->session->{captcha}->{rnd};
ok( $rnd, 'captcha is in session' );
my $params = { some_field => 'test', subject => 'Correct', captcha => '1234' };
$form->process( ctx => $ctx, params => $params );
ok( !$form->validated, 'form did not validate with wrong captcha');
my $rnd2 = $ctx->session->{captcha}->{rnd};
ok( $rnd ne $rnd2, 'we now have a different captcha');
ok( !$form->field('captcha')->fif, 'no fif for captcha' );
$params->{captcha} = $rnd2;
$params->{subject} = 'Incorrect';
$form->process( ctx => $ctx, params => $params );
# valid captcha, invalid subject
ok( !$form->validated, 'form did not validate: valid captcha, invalid field' );
ok( $rnd2 == $ctx->session->{captcha}->{rnd}, 'captcha has not changed' );
$params->{subject} = 'Correct';
$form->process( ctx => $ctx, params => $params );
ok( $form->validated, 'form validated; old captcha, valid fields' );
my $render = $form->render_field('captcha');
is_html( $render, '
', 'captcha renders ok' );
done_testing;
display.t 100644 000770 000024 2414 12576552253 16750 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'foo';
has_field 'bar' => ( type => 'Display' );
has_field 'baz' => ( type => 'Display' );
sub html_bar {
my ( $self, $field ) = @_;
my $html = '
My Bar:&nbps;' . $field->value . '
';
return $html;
}
sub html_baz {
my ( $self, $field ) = @_;
my $html = '
My Baz:&nbps;' . $field->value . '
';
return $html;
}
}
my $form = Test::Form->new;
my $init_obj = {
foo => 'we have a foo',
bar => '...and a bar...',
baz => '...and a baz!!',
};
$form->process( init_object => $init_obj, params => {} );
my $rendered = $form->render;
like( $rendered, qr/and a bar/, 'value for display field renders' );
like( $rendered, qr/and a baz!!/, 'value for display field renders' );
# testing
$form->process( init_object => $init_obj, params => { foo => 'new foo' } );
$rendered = $form->render;
like( $rendered, qr/and a bar/, 'value for display field still renders' );
is_deeply( $form->value, { foo => 'new foo' }, 'value for form is correct' );
is_deeply( $form->fif, { foo => 'new foo' }, 'fif for form is correct' );
done_testing;
mb_form.t 100644 000770 000024 4644 12576552253 16733 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use Test::More;
{
package Hello::Form::Page;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+html_prefix' => ( default => 0 );
has_field 'wizard_session_id' => ( type => 'Hidden' );
has_field 'cancel' => ( type => 'Submit', value => "Cancel" );
has_field 'prev' => ( type => 'Submit', value => "Prev" );
has_field 'next' => ( type => 'Submit', value => "Next" );
}
{
package Hello::Form::Page2;
use HTML::FormHandler::Moose;
extends 'Hello::Form::Page';
has_field 'organization' => ( type => 'Text' );
has_field 'mediums' => ( type => 'Repeatable', num_when_empty => 0 );
has_field 'mediums.id' => ( type => 'Integer' );
has_field 'mediums.tracklist' => ( type => 'Compound' );
has_field 'mediums.tracklist.id' => ( type => 'Integer' );
has_field 'mediums.tracklist.tracks' => ( type => 'Repeatable', num_when_empty => 0 );
has_field 'mediums.tracklist.tracks.id' => ( type => 'Integer' );
}
my $form = Hello::Form::Page2->new;
ok( $form, 'form builds ok' );
diag( $form->peek );
diag( $form->result->peek );
my $init_obj = {
mediums => [
{
id => 1,
tracklist => {
id => 10,
tracks => [
{ id => 100 },
{ id => 200 },
],
},
},
{
id => 2,
tracklist => {
id => 20,
tracks => [
{ id => 300 },
{ id => 400 },
],
},
},
]
};
my $extra_values = {
'next' => 'Next',
cancel => 'Cancel',
organization => undef,
prev => 'Prev',
wizard_session_id => undef,
};
$form->process( init_object => $init_obj );
diag( $form->peek );
diag( $form->result->peek );
my $value = $form->value;
is_deeply( $value, { %$init_obj, %$extra_values}, 'right values' );
my $good_fif = {
'mediums.0.id' => 1,
'mediums.0.tracklist.id' => 10,
'mediums.0.tracklist.tracks.0.id' => 100,
'mediums.0.tracklist.tracks.1.id' => 200,
'mediums.1.id' => 2,
'mediums.1.tracklist.id' => 20,
'mediums.1.tracklist.tracks.0.id' => 300,
'mediums.1.tracklist.tracks.1.id' => 400,
'organization' => '',
'wizard_session_id' => '',
};
my $fif = $form->fif;
is_deeply( $fif, $good_fif, 'fif is right' );
$form->process( $fif );
done_testing;
render 000755 000770 000024 0 12576552253 16044 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t ff.t 100644 000770 000024 4374 12576552253 16774 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t/render use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
{
package HTML::FormHandler::Render::FFTheme;
use Moose::Role;
sub build_update_subfields {{ all => { tags => { no_wrapped_label => 1 } } }}
sub html_attributes {
my ( $self, $field, $type, $attr ) = @_;
my $class = $attr->{class} || [];
if( $type eq 'wrapper' ) {
# this is not exactly like what FF does, but it's close
push @$class, $field->type_attr;
push @$class, 'label' if $field->do_label;
$attr->{class} = $class;
}
return $attr;
}
}
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
with 'HTML::FormHandler::Render::FFTheme';
has '+name' => ( default => 'test_form' );
has '+action' => ( default => '/form' );
has_field 'user' => ( label => 'Username' );
has_field 'pass' => ( type => 'Password', label => 'Password' );
has_field 'opt_in' => ( type => 'Checkbox',
label => 'Opt in?',
);
has_field 'choose' => ( type => 'Select',
label => 'Choose some',
options => [ { label => 'blue', value => 1 }, { label => 'red', value => 2 }] );
has_field 'submit' => ( type => 'Submit', value => "Save" );
}
my $expected =
'';
my $form = Test::Form->new;
$form->process;
my $rendered = $form->render;
is_html($rendered, $expected, 'renders ok' );
done_testing;
util 000755 000770 000024 0 12576552253 15277 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064 messages 100644 000770 000024 12374 12576552253 17220 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/util [
{
'Field' => {
'range_too_high' => 'Value must be less than or equal to [_1]',
'range_incorrect' => 'Value must be between [_1] and [_2]',
'wrong_value' => 'Wrong value',
'error_occurred' => 'error occurred',
'range_too_low' => 'Value must be greater than or equal to [_1]',
'field_invalid' => 'field is invalid',
'required' => '[_1] field is required',
'not_allowed' => '[_1] not allowed',
'no_match' => '[_1] does not match'
}
},
{
'Types' => {
'NegativeNum' => 'Must be a negative number',
'NegativeInt' => 'Must be a negative integer',
'PositiveNum' => 'Must be a positive number',
'WordChars' => 'Must be made up of letters, digits, and underscores',
'IPAddress' => 'Not a valid IP address',
'PositiveInt' => 'Must be a positive integer',
'State' => 'Not a valid state',
'Printable' => 'Field contains non-printable characters',
'Password' => 'Must be between 4 and 255 chars',
'Zip' => 'Zip is not valid',
'SimpleStr' => 'Must be a single line of no more than 255 chars',
'Email' => 'Email is not valid',
'SingleDigit' => 'Must be a single digit',
'NonEmptySimpleStr' => 'Must be a non-empty single line of no more than 255 chars',
'NotAllDigits' => 'Must not be all digits',
'NoSpaces' => 'Must not contain spaces',
'SingleWord' => 'Field must contain a single word',
'NonEmptyStr' => 'Must not be empty',
'StrongPassword' => 'Must be between 8 and 255 chars, and contain a non-alpha char'
}
},
{
'Date' => {
'date_late' => 'Date is too late',
'date_early' => 'Date is too early'
}
},
{
'DateTime' => {
'datetime_invalid' => 'Not a valid DateTime'
}
},
{
'Duration' => {
'duration_invalid' => 'Invalid value for [_1]: [_2]'
}
},
{
'Email' => {
'email_format' => 'Email should be of the format [_1]'
}
},
{
'Float' => {
'float_needed' => 'Must be a number. May contain numbers, +, - and decimal separator \'[_1]\'',
'float_precision' => 'May have a maximum of [quant,_1,digit] after the decimal point, but has [_2]',
'float_size' => 'Total size of number must be less than or equal to [_1], but is [_2]'
}
},
{
'Integer' => {
'integer_needed' => 'Value must be an integer'
}
},
{
'Money' => {
'money_real' => 'Value must be a real number',
'money_convert' => 'Value cannot be converted to money'
}
},
{
'Password' => {
'required' => 'Please enter a password in this field',
'password_ne_username' => 'Password must not match [_1]'
}
},
{
'PasswordConf' => {
'required' => 'Please enter a password confirmation',
'pass_conf_not_matched' => 'The password confirmation does not match the password'
}
},
{
'PosInteger' => {
'integer_positive' => 'Value must be a positive integer'
}
},
{
'Select' => {
'select_not_multiple' => 'This field does not take multiple values',
'select_invalid_value' => '\'[_1]\' is not a valid value'
}
},
{
'Text' => {
'text_maxlength' => 'Field should not exceed [quant,_1,character]. You entered [_2]',
'text_minlength' => 'Field must be at least [quant,_1,character]. You entered [_2]'
}
},
{
'Upload' => {
'upload_file_too_small' => 'File is too small (< [_1] bytes)',
'upload_file_empty' => 'File uploaded is empty',
'upload_file_not_found' => 'File not found for upload field',
'upload_file_too_big' => 'File is too big (> [_1] bytes)'
}
}
]
captcha2.t 100644 000770 000024 2754 12576552253 16777 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use strict;
use warnings;
use lib 'xt/lib/';
# HFH::TraitFor::Captcha and HFH::Field::Captcha do not work with current
# versions of Catalyst.
#
# The reason seems to be that get_captcha and set_captcha use
# $form->ctx->{session} directly, instead of using the accessor
# $from->ctx->session.
#
# I am not sure if this works with older versions of Catalyst, but it is
# definitely broken when using Catalyst 5.90007
#
# I have attached a simple test.
#
# The patch makes get_captcha and set_captcha using the session-accessor
# IF $form->ctx has one. (if it is a catalyst context). Otherwise, the old
# behaviour will not change. The module should still work with
# non-catalyst applications.
use Test::More;
my @missing;
eval" use Test::WWW::Mechanize::Catalyst; ";
if($@){
push @missing, "Test::WWW::Mechanize";
}
eval" use GD::SecurityImage; ";
if($@){
push @missing, "GD::SecurityImage";
}
if(@missing){
plan skip_all => "The following Modules are required to run this test: " . join ", ", @missing;
}
else{
plan tests => 7;
}
my $mech = Test::WWW::Mechanize::Catalyst->new(catalyst_app => "MyCatalystApp");
$mech->get_ok("/captcha");
#diag explain $mech;
$mech->content_contains('');
$mech->get_ok("/captcha/get_rnd");
my $rnd = $mech->content;
$mech->get_ok("/captcha/image");
is $mech->res->content_type, "image/png";
$mech->get_ok("/captcha?captcha=$rnd");
$mech->content_is("verification succeeded");
done_testing;
exit;
structured.t 100644 000770 000024 10574 12576552253 17345 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t use strict;
use warnings;
use Test::More;
my $struct = {
username => 'Joe Blow',
occupation => 'Programmer',
tags => ['Perl', 'programming', 'Moose' ],
employer => {
name => 'TechTronix',
country => 'Utopia',
},
options => {
flags => {
opt_in => 1,
email => 0,
},
cc_cards => [
{
type => 'Visa',
number => '4248999900001010',
},
{
type => 'MasterCard',
number => '4335992034971010',
},
],
},
addresses => [
{
street => 'First Street',
city => 'Prime City',
country => 'Utopia',
id => 0,
},
{
street => 'Second Street',
city => 'Secondary City',
country => 'Graustark',
id => 1,
},
{
street => 'Third Street',
city => 'Tertiary City',
country => 'Atlantis',
id => 2,
}
]
};
{
package Structured::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has_field 'username';
has_field 'occupation';
has_field 'tags' => ( type => 'Repeatable' );
has_field 'tags.contains' => ( type => 'Text' );
has_field 'employer' => ( type => 'Compound' );
has_field 'employer.name';
has_field 'employer.country';
has_field 'options' => ( type => 'Compound' );
has_field 'options.flags' => ( type => 'Compound' );
has_field 'options.flags.opt_in' => ( type => 'Boolean' );
has_field 'options.flags.email' => ( type => 'Boolean' );
has_field 'options.cc_cards' => ( type => 'Repeatable' );
has_field 'options.cc_cards.type';
has_field 'options.cc_cards.number';
has_field 'addresses' => ( type => 'Repeatable' );
has_field 'addresses.street';
has_field 'addresses.city';
has_field 'addresses.country';
has_field 'addresses.id';
}
#===========
# test structured params
my $form = Structured::Form->new;
ok( $form, 'form created' );
$form->process( params => $struct );
is( $form->result->num_results, 6, 'correct number of results' );
ok( $form->validated, 'form validated');
is_deeply( $form->field('tags')->value, ['Perl', 'programming', 'Moose' ],
'list field tags has right values' );
is( $form->field('addresses.0.city')->value, 'Prime City', 'get address field OK' );
is( $form->field('options.flags.opt_in')->value, 1, 'get opt_in flag');
#============
# test structured init_object/item
my $form2 = Structured::Form->new;
ok( $form2, 'form created' );
$form2->process( init_object => $struct, params => {} );
is( $form2->result->num_results, 6, 'correct number of results' );
ok( !$form2->validated, 'form validated');
is_deeply( $form2->field('employer')->item, { name => 'TechTronix', country => 'Utopia', }, 'has item');
is_deeply( $form2->field('addresses')->item, $struct->{addresses}, 'item for repeatable' );
#=============
my $fif = {
'addresses.0.city' => 'Prime City',
'addresses.0.country' => 'Utopia',
'addresses.0.id' => 0,
'addresses.0.street' => 'First Street',
'addresses.1.city' => 'Secondary City',
'addresses.1.country' => 'Graustark',
'addresses.1.id' => 1,
'addresses.1.street' => 'Second Street',
'addresses.2.city' => 'Tertiary City',
'addresses.2.country' => 'Atlantis',
'addresses.2.id' => 2,
'addresses.2.street' => 'Third Street',
'employer.country' => 'Utopia',
'employer.name' => 'TechTronix',
'occupation' => 'Programmer',
'options.cc_cards.0.number' => '4248999900001010',
'options.cc_cards.0.type' => 'Visa',
'options.cc_cards.1.number' => '4335992034971010',
'options.cc_cards.1.type' => 'MasterCard',
'options.flags.email' => 0,
'options.flags.opt_in' => 1,
'tags.0' => 'Perl',
'tags.1' => 'programming',
'tags.2' => 'Moose',
'username' => 'Joe Blow'
};
#=========
is_deeply( $form->fif, $fif, 'fif is correct' );
$form->process( $fif );
ok( $form->validated, 'form processed from fif' );
is_deeply( $form->values, $struct, 'values round-tripped from fif');
#=========
# works with item and params
$form2->process( item => $struct, params => $fif );
ok( $form2->validated, 'form processed from fif' );
is( $form2->result->num_results, 6, 'correct number of results' );
is_deeply( $form2->field('employer')->item, { name => 'TechTronix', country => 'Utopia', }, 'has item');
is_deeply( $form2->field('addresses')->item, $struct->{addresses}, 'item for repeatable' );
done_testing;
var 000755 000770 000024 0 12576552253 15355 5 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t form1.pl 100644 000770 000024 610 12576552253 17053 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t/var {
action => '/login',
field_list => [
{ type => 'Text',
name => 'user',
label => 'Username',
required => 1,
},
{ type => 'Password',
name => 'pass',
label => 'Password',
required => 1,
},
{ type => 'Submit',
name => 'submit',
value => 'Login',
},
],
}
add_field.t 100644 000770 000024 1352 12576552253 17176 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/xt use Test::More tests => 2;
use HTML::FormHandler::Field::Text;
use HTML::FormHandler::Field;
{
package My::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
has '+name' => ( default => 'testform' );
sub field_list {
[
meat => 'Text',
starch => { required => 1 },
fruit => 'Select',
]
}
sub options_fruit {
return (
1 => 'apples',
2 => 'oranges',
3 => 'kiwi',
);
}
}
my $form = My::Form->new;
ok( $form, 'get form' );
my $field = HTML::FormHandler::Field::Text->new( name => 'Testfield' );
$form->push_field($field);
ok( $form->field('Testfield'), 'form now has test field' );
author-eol.t 100644 000770 000024 30204 12576552253 17210 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t
BEGIN {
unless ($ENV{AUTHOR_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for testing by the author');
}
}
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18
use Test::More 0.88;
use Test::EOL;
my @files = (
'lib/HTML/FormHandler.pm',
'lib/HTML/FormHandler/Base.pm',
'lib/HTML/FormHandler/Blocks.pm',
'lib/HTML/FormHandler/BuildFields.pm',
'lib/HTML/FormHandler/BuildPages.pm',
'lib/HTML/FormHandler/Field.pm',
'lib/HTML/FormHandler/Field/AddElement.pm',
'lib/HTML/FormHandler/Field/BoolSelect.pm',
'lib/HTML/FormHandler/Field/Boolean.pm',
'lib/HTML/FormHandler/Field/Button.pm',
'lib/HTML/FormHandler/Field/Captcha.pm',
'lib/HTML/FormHandler/Field/Checkbox.pm',
'lib/HTML/FormHandler/Field/Compound.pm',
'lib/HTML/FormHandler/Field/Date.pm',
'lib/HTML/FormHandler/Field/DateMDY.pm',
'lib/HTML/FormHandler/Field/DateTime.pm',
'lib/HTML/FormHandler/Field/Display.pm',
'lib/HTML/FormHandler/Field/Duration.pm',
'lib/HTML/FormHandler/Field/Email.pm',
'lib/HTML/FormHandler/Field/File.pm',
'lib/HTML/FormHandler/Field/Float.pm',
'lib/HTML/FormHandler/Field/Hidden.pm',
'lib/HTML/FormHandler/Field/Hour.pm',
'lib/HTML/FormHandler/Field/IntRange.pm',
'lib/HTML/FormHandler/Field/Integer.pm',
'lib/HTML/FormHandler/Field/Minute.pm',
'lib/HTML/FormHandler/Field/Money.pm',
'lib/HTML/FormHandler/Field/Month.pm',
'lib/HTML/FormHandler/Field/MonthDay.pm',
'lib/HTML/FormHandler/Field/MonthName.pm',
'lib/HTML/FormHandler/Field/Multiple.pm',
'lib/HTML/FormHandler/Field/Nested.pm',
'lib/HTML/FormHandler/Field/NoValue.pm',
'lib/HTML/FormHandler/Field/NonEditable.pm',
'lib/HTML/FormHandler/Field/Password.pm',
'lib/HTML/FormHandler/Field/PasswordConf.pm',
'lib/HTML/FormHandler/Field/PosInteger.pm',
'lib/HTML/FormHandler/Field/PrimaryKey.pm',
'lib/HTML/FormHandler/Field/Repeatable.pm',
'lib/HTML/FormHandler/Field/Repeatable/Instance.pm',
'lib/HTML/FormHandler/Field/Reset.pm',
'lib/HTML/FormHandler/Field/Result.pm',
'lib/HTML/FormHandler/Field/RmElement.pm',
'lib/HTML/FormHandler/Field/Second.pm',
'lib/HTML/FormHandler/Field/Select.pm',
'lib/HTML/FormHandler/Field/SelectCSV.pm',
'lib/HTML/FormHandler/Field/Submit.pm',
'lib/HTML/FormHandler/Field/Text.pm',
'lib/HTML/FormHandler/Field/TextArea.pm',
'lib/HTML/FormHandler/Field/TextCSV.pm',
'lib/HTML/FormHandler/Field/Upload.pm',
'lib/HTML/FormHandler/Field/Weekday.pm',
'lib/HTML/FormHandler/Field/Year.pm',
'lib/HTML/FormHandler/Fields.pm',
'lib/HTML/FormHandler/Foo.pm',
'lib/HTML/FormHandler/I18N.pm',
'lib/HTML/FormHandler/I18N/ar_kw.pm',
'lib/HTML/FormHandler/I18N/bg_bg.pm',
'lib/HTML/FormHandler/I18N/ca_es.pm',
'lib/HTML/FormHandler/I18N/cs_cz.pm',
'lib/HTML/FormHandler/I18N/de_de.pm',
'lib/HTML/FormHandler/I18N/en_us.pm',
'lib/HTML/FormHandler/I18N/es_es.pm',
'lib/HTML/FormHandler/I18N/hu_hu.pm',
'lib/HTML/FormHandler/I18N/it_it.pm',
'lib/HTML/FormHandler/I18N/ja_jp.pm',
'lib/HTML/FormHandler/I18N/pt_br.pm',
'lib/HTML/FormHandler/I18N/ru_ru.pm',
'lib/HTML/FormHandler/I18N/sv_se.pm',
'lib/HTML/FormHandler/I18N/tr_tr.pm',
'lib/HTML/FormHandler/I18N/ua_ua.pm',
'lib/HTML/FormHandler/InitResult.pm',
'lib/HTML/FormHandler/Manual.pod',
'lib/HTML/FormHandler/Manual/Catalyst.pod',
'lib/HTML/FormHandler/Manual/Cookbook.pod',
'lib/HTML/FormHandler/Manual/Database.pod',
'lib/HTML/FormHandler/Manual/Defaults.pod',
'lib/HTML/FormHandler/Manual/Errors.pod',
'lib/HTML/FormHandler/Manual/Fields.pod',
'lib/HTML/FormHandler/Manual/FromDFV.pod',
'lib/HTML/FormHandler/Manual/FromFF.pod',
'lib/HTML/FormHandler/Manual/InflationDeflation.pod',
'lib/HTML/FormHandler/Manual/Intro.pod',
'lib/HTML/FormHandler/Manual/Reference.pod',
'lib/HTML/FormHandler/Manual/Rendering.pod',
'lib/HTML/FormHandler/Manual/RenderingCookbook.pod',
'lib/HTML/FormHandler/Manual/Templates.pod',
'lib/HTML/FormHandler/Manual/Testing.pod',
'lib/HTML/FormHandler/Manual/Tutorial.pod',
'lib/HTML/FormHandler/Manual/Validation.pod',
'lib/HTML/FormHandler/Merge.pm',
'lib/HTML/FormHandler/Meta/Role.pm',
'lib/HTML/FormHandler/Model.pm',
'lib/HTML/FormHandler/Model/CDBI.pm',
'lib/HTML/FormHandler/Model/Object.pm',
'lib/HTML/FormHandler/Moose.pm',
'lib/HTML/FormHandler/Moose/Role.pm',
'lib/HTML/FormHandler/Page.pm',
'lib/HTML/FormHandler/Page/Simple.pm',
'lib/HTML/FormHandler/Pages.pm',
'lib/HTML/FormHandler/Params.pm',
'lib/HTML/FormHandler/Render/RepeatableJs.pm',
'lib/HTML/FormHandler/Render/Simple.pm',
'lib/HTML/FormHandler/Render/Table.pm',
'lib/HTML/FormHandler/Render/Util.pm',
'lib/HTML/FormHandler/Render/WithTT.pm',
'lib/HTML/FormHandler/Result.pm',
'lib/HTML/FormHandler/Result/Role.pm',
'lib/HTML/FormHandler/Test.pm',
'lib/HTML/FormHandler/TraitFor/Captcha.pm',
'lib/HTML/FormHandler/TraitFor/I18N.pm',
'lib/HTML/FormHandler/TraitFor/Types.pm',
'lib/HTML/FormHandler/Traits.pm',
'lib/HTML/FormHandler/Types.pm',
'lib/HTML/FormHandler/Validate.pm',
'lib/HTML/FormHandler/Widget/ApplyRole.pm',
'lib/HTML/FormHandler/Widget/Block.pm',
'lib/HTML/FormHandler/Widget/Block/Bootstrap.pm',
'lib/HTML/FormHandler/Widget/Field/Button.pm',
'lib/HTML/FormHandler/Widget/Field/ButtonTag.pm',
'lib/HTML/FormHandler/Widget/Field/Captcha.pm',
'lib/HTML/FormHandler/Widget/Field/Checkbox.pm',
'lib/HTML/FormHandler/Widget/Field/CheckboxGroup.pm',
'lib/HTML/FormHandler/Widget/Field/Compound.pm',
'lib/HTML/FormHandler/Widget/Field/Hidden.pm',
'lib/HTML/FormHandler/Widget/Field/HorizCheckboxGroup.pm',
'lib/HTML/FormHandler/Widget/Field/NoRender.pm',
'lib/HTML/FormHandler/Widget/Field/Password.pm',
'lib/HTML/FormHandler/Widget/Field/RadioGroup.pm',
'lib/HTML/FormHandler/Widget/Field/Repeatable.pm',
'lib/HTML/FormHandler/Widget/Field/Reset.pm',
'lib/HTML/FormHandler/Widget/Field/Role/HTMLAttributes.pm',
'lib/HTML/FormHandler/Widget/Field/Role/SelectedOption.pm',
'lib/HTML/FormHandler/Widget/Field/Select.pm',
'lib/HTML/FormHandler/Widget/Field/Span.pm',
'lib/HTML/FormHandler/Widget/Field/Submit.pm',
'lib/HTML/FormHandler/Widget/Field/Text.pm',
'lib/HTML/FormHandler/Widget/Field/Textarea.pm',
'lib/HTML/FormHandler/Widget/Field/Upload.pm',
'lib/HTML/FormHandler/Widget/Form/Role/HTMLAttributes.pm',
'lib/HTML/FormHandler/Widget/Form/Simple.pm',
'lib/HTML/FormHandler/Widget/Form/Table.pm',
'lib/HTML/FormHandler/Widget/Theme/Bootstrap.pm',
'lib/HTML/FormHandler/Widget/Theme/Bootstrap3.pm',
'lib/HTML/FormHandler/Widget/Theme/BootstrapFormMessages.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Base.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Bootstrap.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Bootstrap3.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Fieldset.pm',
'lib/HTML/FormHandler/Widget/Wrapper/None.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Simple.pm',
'lib/HTML/FormHandler/Widget/Wrapper/SimpleInline.pm',
'lib/HTML/FormHandler/Widget/Wrapper/Table.pm',
'lib/HTML/FormHandler/Widget/Wrapper/TableInline.pm',
'lib/HTML/FormHandler/Wizard.pm',
't/01app.t',
't/author-eol.t',
't/basic.t',
't/blocks/basic.t',
't/blocks/block_list.t',
't/blocks/blocktags.t',
't/blocks/loading.t',
't/blocks/nested.t',
't/blocks/render_units.t',
't/bootstrap/basic.t',
't/bootstrap/control_states.t',
't/bootstrap/controls.t',
't/bootstrap/ext_controls.t',
't/bootstrap/inline.t',
't/bootstrap/other.t',
't/bootstrap/search.t',
't/bootstrap3/basic.t',
't/bootstrap3/controls.t',
't/bootstrap3/horiz.t',
't/bootstrap3/horiz_checkboxgroup.t',
't/bootstrap3/inlinecheckboxes.t',
't/bootstrap3/layout_classes.t',
't/compound/basic.t',
't/compound/default.t',
't/compound/empty.t',
't/compound/include.t',
't/compound/select.t',
't/errors/basic.t',
't/errors/compound.t',
't/errors/form_messages.t',
't/errors/messages.t',
't/errors/req_message.t',
't/field_setup/checkbox.t',
't/field_setup/compound_update_fields.t',
't/field_setup/defaults.t',
't/field_setup/disabled.t',
't/field_setup/id.t',
't/field_setup/inactive.t',
't/field_setup/init_object.t',
't/field_setup/input_param.t',
't/field_setup/missing.t',
't/field_setup/plus_field.t',
't/field_setup/update_fields.t',
't/field_setup/update_subfields.t',
't/fields/dates.t',
't/fields/display.t',
't/fields/fields.t',
't/fields/float.t',
't/fields/formhandlerx.t',
't/fields/novalue.t',
't/fields/password.t',
't/fields/repeatable.t',
't/fields/select.t',
't/fields/select2.t',
't/fields/selectcsv.t',
't/fields/textcsv.t',
't/form_setup/api.t',
't/form_setup/clone.t',
't/form_setup/compound_field_list.t',
't/form_setup/config.t',
't/form_setup/dynamic.t',
't/form_setup/include.t',
't/form_setup/init_obj.t',
't/form_setup/no_update.t',
't/form_setup/posted.t',
't/form_setup/render_roles.t',
't/infl_defl/comp_field.t',
't/infl_defl/default.t',
't/infl_defl/defl_lives.t',
't/infl_defl/infl_defl.t',
't/infl_defl/infl_transform.t',
't/infl_defl/variations.t',
't/lib/BookDB/Form/Upload.pm',
't/lib/Field/Address.pm',
't/lib/Field/AltText.pm',
't/lib/Field/MyField.pm',
't/lib/Form/Address.pm',
't/lib/Form/AddressRole.pm',
't/lib/Form/Multiple.pm',
't/lib/Form/MultipleRole.pm',
't/lib/Form/NoExtForm.pm',
't/lib/Form/Person.pm',
't/lib/Form/PersonRole.pm',
't/lib/Form/Test.pm',
't/lib/Form/Two.pm',
't/lib/MyApp/Component/Section.pm',
't/lib/MyApp/I18N/abc_de.pm',
't/lib/Widget/Block/Test.pm',
't/lib/Widget/Field/Omega.pm',
't/lib/Widget/Field/TestWidget.pm',
't/memory_cycles.t',
't/moose/build_id.t',
't/moose/composed.t',
't/moose/field_traits.t',
't/moose/no_extend.t',
't/moose/subclass_roles.t',
't/release-no-tabs.t',
't/render/actions.t',
't/render/array.t',
't/render/basic.t',
't/render/checkbox.t',
't/render/checkbox_group.t',
't/render/classes.t',
't/render/compound.t',
't/render/compound2.t',
't/render/display.t',
't/render/errors.t',
't/render/escaping.t',
't/render/ff.t',
't/render/filter.t',
't/render/form_errors.t',
't/render/get_tag.t',
't/render/html5_attributes.t',
't/render/html_attr.t',
't/render/html_attributes.t',
't/render/inline.t',
't/render/label.t',
't/render/noneditable.t',
't/render/optgroup.t',
't/render/radio_group.t',
't/render/rep_fieldset.t',
't/render/rep_wrapper.t',
't/render/repeatable.t',
't/render/result.t',
't/render/select.t',
't/render/simple.t',
't/render/submit.t',
't/render/table.t',
't/render/tags.t',
't/render/tt_render_elementx.t',
't/render/util.t',
't/render/widget_loading.t',
't/render/widget_tags.t',
't/render/widgets.t',
't/render/with_class.t',
't/render/withtt.t',
't/repeatable/defaults.t',
't/repeatable/empty.t',
't/repeatable/has_many.t',
't/repeatable/hash.t',
't/repeatable/js.t',
't/repeatable/list.t',
't/repeatable/nested.t',
't/repeatable/nested2.t',
't/repeatable/num_extra.t',
't/repeatable/reload.t',
't/repeatable/set_methods.t',
't/repeatable/subfield.t',
't/result/basic.t',
't/result/blocks.t',
't/result/compound.t',
't/result/errors.t',
't/result/repeatable.t',
't/structured.t',
't/template.t',
't/validation/apply.t',
't/validation/constraints.t',
't/validation/dependency.t',
't/validation/filters.t',
't/validation/reqwhen.t',
't/validation/type_tiny.t',
't/validation/types.t',
't/validation/validate_coderef.t',
't/validation/when.t',
't/var/form1.pl',
't/var/form1.yml',
't/wizard/basic.t'
);
eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
done_testing;
tags.t 100644 000770 000024 5044 12576552253 17332 0 ustar 00gshank staff 000000 000000 HTML-FormHandler-0.40064/t/render use strict;
use warnings;
use Test::More;
use HTML::FormHandler::Test;
{
package Test::Form;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
sub build_form_tags {{
form_text => 'testing',
}}
sub build_update_subfields {{
all => { tags => { wrapper_tag => 'p', label_tag => 'span', } },
}}
has_field 'foo';
has_field 'bar';
has_field 'vax';
has_field 'multi' => ( type => 'Compound' );
has_field 'multi.one';
has_field 'multi.two';
has_field 'records' => ( type => 'Repeatable' );
has_field 'records.one';
has_field 'records.two';
sub html_attributes {
my ( $self, $field, $type, $attr ) = @_;
$attr->{class} = ['label'] if $type eq 'label';
return $attr;
}
}
my $form = Test::Form->new;
$form->process({});
my $rendered = $form->render;
unlike( $rendered, qr/fieldset/, 'no fieldset rendered' );
unlike( $rendered, qr/Foo: /, 'no colon in label' );
like( $rendered, qr/