Commit Graph

269 Commits

Author SHA1 Message Date
Michael
fc0667599c Fixing and adding form field custom error messages code. 2014-12-22 12:19:33 +10:30
Will Rossiter
729318fc0a Merge pull request #241 from nhorstmeier/Bugfix_196
BUGFIX set email recipient on initial write()
2014-12-08 22:17:41 +13:00
David Craig
c33b8ddec1 Use $.prop() to query checkboxes 2014-12-03 13:59:42 +13:00
Will Rossiter
319d1972b1 FIX: Dropdowns not responding to conditional logic
Ensures the correct actions are listened for.
2014-12-02 19:49:03 +13:00
muskie9
7e92af61fd BUGFIX set email recipient on initial write()
This checks if the Form() relation ID is set, if not, then grab the current page from the session and use it's ID to get teh Editable Fields for dropdowns.

fixes #196
2014-12-01 14:46:02 -06:00
Will Rossiter
7a76626cd2 Redirecting to the form success message location for longer pages 2014-11-28 18:16:50 +13:00
John Learn
75858dab7a fix naming of gridfield so it works with translatable. 2014-10-21 12:52:43 -04:00
Will Rossiter
e8e41826da Add getEditableField() helper 2014-08-11 11:12:00 +12:00
Will Rossiter
23963e2a47 FIX: disable jquery.validation with date fields
Inconsistent with date locale formats.
2014-08-11 11:09:31 +12:00
Will Rossiter
42932ea47f Add flags to configure use of cookies.
Adds 2 new flags to the CMS:

- DisableCsrfSecurityToken
- DisableAuthenicatedFinishAction

DisableAuthenicatedFinishAction disables the session check on the finish completed action as this normally validates the user correctly posted a form. This page is normally just basic content so requiring a session cookie is sometimes a hassle.

DisableCsrfSecurityToken allows security token to not be added to the form. Normally acceptable as forms don't usually alter the state of the database.
2014-07-27 20:51:23 +12:00
Will Rossiter
5568ee7875 Fix CheckboxGroupField validation (Fixes #209) 2014-07-25 14:53:13 +12:00
mikeyc7m
386eb363ad Use numericfield for EditableNumericField
Add support for minimum and maximum values
2014-07-24 21:39:07 +12:00
Liongold
dbb68258c5 Extra Space at line 1018
When a user chose the Plain Text option, the first field would have a blank space preceding the field name.
2014-07-12 17:52:16 +02:00
Will Rossiter
c77830bd2f Pass submission to finished action. 2014-07-12 09:43:52 +12:00
alex-dna
248ff61ebe Update UserDefinedForm.php
Add updateAfterProcess hook
2014-07-09 16:32:10 +12:00
Will Rossiter
a9aefe38ea Add onPopulateFromPostData extension hook 2014-07-09 11:55:54 +12:00
Will Rossiter
73cfcc6791 Correct variable name (Fixes #206) 2014-07-06 17:50:21 +12:00
Will Rossiter
29d59693ac Fetch permissions from the parent field (Fixes #218) 2014-07-06 17:35:46 +12:00
Jean Spiteri
fead9d00c6 Implementing the Dynamic Subject feature 2014-07-06 17:33:50 +12:00
Will Rossiter
2767558ec8 Add SubmittedFormField::onPopulationFromField extension hook 2014-07-06 17:03:13 +12:00
Will Rossiter
817b80412d Merge pull request #202 from icecaster/patch-3
Fixed redirect url generation to work without trailing slashes
2014-07-06 16:52:21 +12:00
Will Rossiter
c4fe6beca5 Fix escaping of newline's in emails (Fixes #217) 2014-06-20 14:08:17 +12:00
Damian Mooyman
b7429910d5 API Support bulk editing tools if available 2014-06-18 13:10:31 +12:00
Damian Mooyman
5e0b7fdf7a Updated jquery validate plugin (dist files only)
Cleanup of validation script. Refactor into template to allow customisation of validation.
Explicitly set error element to 'span' as per new jquery-validate support
[ref: CWPBUG-110]
2014-05-22 10:34:11 +12:00
Will Rossiter
bce1da2d71 Merge pull request #210 from Focus-Flow/require-localized-validator-messages-and-methods
Require localization files for validator
2014-05-15 10:16:24 +01:00
Jyrki Lilja
5689afb6b4 Require localization files for validator 2014-05-15 10:08:20 +03:00
Will Rossiter
b54e7fa4c6 Correct location for getValueFromData() 2014-04-25 09:53:45 -04:00
Will Rossiter
cbeb7a82e8 FIX: field validation 2014-04-22 16:46:57 -07:00
Tim
3f7c57dcbf Fixed redirect url generation to work without trailing slashes
fix url redirect generation, 
using action parameter on $this->Link() to pass 'complete' action
to stop relying on trailing slashes.
2014-04-15 12:10:32 +12:00
Kirk Mayo
d5e50a9802 NEW: Allow form submission when tokens are disabled 2014-02-27 12:36:12 +13:00
Kirk Mayo
0f647009fa BUG: Do not add a default message for numeric and email fields
BUG: Corrected classname to use right object
2014-02-12 12:45:49 +13:00
Kirk Mayo
85c1f52c45 BUG: Fixes #189 default error message being shown 2014-02-12 12:14:56 +13:00
Kirk Mayo
be573dcd3c NEW: Set MinLength and MaxLength to numeric fields
BUG: replaced spaces with tabs to meet coding conventions
2014-02-11 10:31:56 +13:00
Kirk Mayo
938d2059fa NEW: Added a numeric field and associated png
NEW: Setup translations for number field

NEW: extend fromEditableTextfield use number class
2014-02-11 08:59:43 +13:00
Will Rossiter
f90b997c29 Add updateEmailData hook 2014-02-03 12:10:44 +13:00
Kirk Mayo
54b4dca799 BUG: Fixing unit tests for form processing and adding unit test to check if form has been completed 2014-01-06 15:15:01 +13:00
Kirk Mayo
41b6e57e4c Merge branch 'master' of git://github.com/silverstripe/silverstripe-userforms into issue69 2014-01-06 13:37:55 +13:00
Will Rossiter
07c159cd61 NEW Allow EditableFileField to define destination folder. (Fixes #20, #177) 2013-12-20 21:08:00 +13:00
Kirk Mayo
4c88f1acf9 BUG: Fixes #69 by adding a check to see if the form has been processed 2013-12-19 15:56:53 +13:00
Nik Rolls
da6a624b6c - Added calls to Object#extend in EditableFormField's getFieldConfiguration and getFieldValidationOptions
- Added tests for extensions on EditableFormField
2013-12-05 19:08:08 +13:00
Jyrki Lilja
79682e7627 Fix #175. Bring back support checking for radio field values. 2013-12-03 20:10:17 +13:00
Sean Harvey
425881257b BUG Performance improvements of SubmittedFormField queries.
When there are a lot of SubmittedForm records the UserDefinedForm
page takes a long time to load in the CMS, and oftens exceeds
the PHP memory limit well beyond 128M.

Previously UserDefinedForm::getCMSFields() would build a list of
name => value from all SubmittedFormField records, but it would
do this twice, once in getCMSFields() and another time in
UserFormsGridFieldFilterHeader. It would also use the full ORM
to build this list, when all it needs is a map of the Name
and Value columns.

This fixes that to build the columns once in getCMSFields() using
DB::query() and it'll pass those columns along to
UserFormsGridFieldFilterHeader as well so it doesn't do it twice.
2013-11-13 17:08:49 +13:00
Jyrki Lilja
27d4476dec Add support for defining clear button text.
A new translations to be added:

- UserDefinedForm.CLEARBUTTON
- UserDefinedForm.TEXTONCLEAR
2013-11-11 15:32:44 +02:00
Ingo Schommer
aa0f8dbc7b Transifex support, js globalisation 2013-10-30 14:31:51 +01:00
Kirk Mayo
99de36afef BUG: Fixes #166 for SQL server which does not like empty strings as numerics 2013-10-17 15:01:41 +13:00
Will Rossiter
099e91807b Merge pull request #160 from hafriedlander/fix/filefield
FIX submitted fieldfields in submission details in CMS
2013-09-04 17:14:06 -07:00
Hamish Friedlander
0c39fad116 FIX submitted fieldfields in submission details in CMS
If you had a EditableFileField in your userform, the submission table in
the CMS would just say "Array" rather than link to the file, making it fairly
useless
2013-09-05 09:46:38 +12:00
Mellisa Hankins
86992971f8 FEATURE: Add data and form arguments to Filtered Email Recipients
Most use cases for Filtered Email Recipients will probably require
using the data submitted via the user form.
2013-09-04 16:32:24 +10:00
Hamish Friedlander
d887f0e196 FIX EditableCountryDowndownField being broken by removal of Geoip in 3.0 2013-08-29 14:03:09 +12:00
Will Rossiter
55a5187f79 FIX: escape columns and tables for postgres 2013-07-15 21:52:30 +12:00
Will Rossiter
775eb66053 private statics for 3.1 2013-07-15 20:49:49 +12:00
Mateusz Uzdowski
eae3283e4c BUG Update allowed_actions on frontend Controller. 2013-07-09 15:20:19 +12:00
Will Rossiter
3352fe38b0 Merge pull request #132 from Focus-Flow/bug/quotes-in-editableoption-title
BUG: support quotes in EditableOption Title
2013-06-04 02:52:18 -07:00
Freddy Vulto
4c7d50217f Fix duplication of custom rules. Rules may depend on fields. These internal field IDs in the targets now also get updated to their new names (GitHub: #19). 2013-06-04 21:48:29 +12:00
Jyrki Lilja
896e8591f7 BUG: Use $this->Title correctly. 2013-06-04 09:17:23 +03:00
Jyrki Lilja
0b0834c873 BUG: Fix radio field with " in Title. 2013-06-04 08:20:03 +03:00
Jyrki Lilja
e8aeb692fd BUG: Fix checkbox group with " in option titles. 2013-06-04 08:15:57 +03:00
Will Rossiter
b81e4cb7c9 FIX: update visibility of static 2013-06-02 14:08:10 +12:00
Sean Harvey
e5f8d13b15 BUG SubmittedForm can't be created by non-ADMIN 2013-05-13 14:32:41 +12:00
Sean Harvey
3f223b691b BUG Normal users (non-ADMIN) can't create any email recipients 2013-05-13 14:31:25 +12:00
Sean Harvey
3de6795aa4 BUG Fixing non-ADMIN permission to view SubmittedForm/SubmittedFormField 2013-05-01 10:49:57 +12:00
Fred Condo
756f15a4ac Restore the EditableCountryDropdownField class
Reverts "MINOR Removed the country dropdown field due to the framework
has removed the CountryDropdownField"

This reverts commit cbe1dce4ff.

Framework has not, in fact, removed CountryDropdownField. This commit
restores the EditableCountryDropdownField class.
2013-04-24 09:57:33 -07:00
ARNHOE
9ac8500b41 Fixed typo, live validation works again 2013-04-22 17:17:40 +03:00
Will Rossiter
a8ca0184c3 FIX: validate required fields even with rules. (Fixes #116) 2013-04-17 19:31:09 +12:00
Damian Mooyman
a0f48d636e BUG Fixed incorrect static member declaration
- Changed configurable static variables to private as per recent API updates to 3.1
- Use of statics as configurable variables replaced with config api usage
2013-04-10 11:35:58 +12:00
Fred Condo
f0f9ea702c BUG: Set the summary fields of UserDefinedForm_EmailRecipient dynamically via config system
You can't dynamically expose statics; that's a no-op in 3.1
2013-04-04 12:14:22 -07:00
Fred Condo
656a9fbb4e BUG: Fix access to static configuration variables
- Make statics private
- Use Config::get rather than eval to read private statics
- Add a helper function to expose UserDefinedForm_EmailRecipient::$summary_fields
  (to make them available for i18n).
2013-04-03 14:31:37 -07:00
Ash Kyd
68bc428fe2 Added check for a blank title in the HTML Block/EditableLiteralField so we don't print empty labels. 2013-04-03 12:35:02 +10:00
Will Rossiter
416a5b8864 FIX: fix submissions grid field in 3.0 versions (#96, #100) 2013-03-16 12:18:51 +13:00
mschilder
caec25101d Update UserDefinedForm.php
Changed two typos: UserDefinedform must be UserDefinedForm
2013-03-15 12:32:07 +01:00
Will Rossiter
8e252c88ed NEW Migrate submissions section to a GridField instance. (Fixes #94) 2013-03-05 10:45:54 +13:00
Will Rossiter
527b63786d FIX Resolve issue with multiple dependent rules
Implementation of the rules required that a dependent field could only rely on one implementation. This patch joins all those dependencies together in one function to exclude. Tests / a rewrite of this behavior is on the horizon.
2013-02-27 16:05:30 +13:00
Will Rossiter
55c455b802 FIX: remove redundant extension definition 2013-02-04 20:15:07 +13:00
Menno Schilder
3015997bdf Added Placeholders.js to enable placeholder functionality in IE9 and below 2013-01-29 22:46:34 +13:00
Menno Schilder
cd9af7e13f Added options to enable live validation and hide field labels 2013-01-29 22:46:34 +13:00
Prem Mariappan
203898bd1a FIX: duplicate replyTo addresses appended 2013-01-29 22:40:28 +13:00
Will Rossiter
6f671d304d FIX: save a null value instead of upload data. (Fixes #87) 2013-01-29 21:44:00 +13:00
Will Rossiter
31659ed61c Merge pull request #76 from silverstripe-droptables/translatable-compatible
FIX: Build URLs to respect other parameters
2012-12-13 18:23:45 -08:00
Robert Curry
2861bbdf0c BUG Build URLs to respect other parameters 2012-12-14 14:55:31 +13:00
Sean Harvey
3923ec325d Adding ability to extend EmailRecipients so they can be filtered 2012-12-11 17:09:02 +13:00
Ruud Arentsen
75c6d40fa4 BUG Fix the 'always modified' label in treeview. Fixes #48.
userforms always reported 'modified' in the sitetree. Fixed the issue by
checking the userdefinedform record and the formfields.
2012-10-18 20:19:33 +13:00
Will Rossiter
0aa9572f2c FIX redirect user to form on validation error. (Fixes #62) 2012-10-14 11:45:47 +13:00
Roman
019f782d2e Added "canView" permission to EmailRecipient. Fixes an issue with non-admin rights in SS3 2012-09-24 19:02:33 +02:00
Will Rossiter
7cc7bb4ce6 Add description to page type 2012-09-11 21:32:48 +12:00
Will Rossiter
ee8ca5caf1 NEW: allow setting of custom reply to address rather than from address. (Fixes #28) 2012-09-11 21:32:47 +12:00
Will Rossiter
e0a476ea15 FIX: make email recipients dropdowns unselectable in 3.0 API 2012-09-11 21:32:47 +12:00
Will Rossiter
90ba5031ab Merge pull request #51 from mateusz/report-visibility-master
ADD Add report visibility setting to EditableFormHeading
2012-09-11 00:27:40 -07:00
Mateusz Uzdowski
eb1b9b62cd BUG Fix the date field conditional to work with dropdown.
In this case they keyup will not be triggered at all.
2012-09-11 18:56:29 +12:00
Mateusz Uzdowski
1fa4c2d81d BUG Fix the edge cases for radio button conditionals.
The specific situation this is fixing is that when server-side
validation fails and results in form having non-default values. In this
case the visibility might not be correct and will need to be updated.

Also, we cannot rely on onclick events on radio group to find out the
current value when we are loading - instead we need to actually find
out the currently selected radio button.

Fixes the IsBlank and IsNotBlank conditions as well.
2012-09-11 18:56:29 +12:00
Mateusz Uzdowski
bcd9083d1c BUGFIX: prevent form from expiring on users - ping regularly.
The form throws a CSRF error if left for too long by itself. This is
especially important for long forms.

Use local ping function, as the CMS ping returns 403 when BasicAuth is
enabled.
2012-09-11 10:12:15 +12:00
Mateusz Uzdowski
d1b6ec224d ADD Add report visibility setting to EditableFormHeading
Same as already existing setting on EditableLiteralField.
2012-09-10 16:07:52 +12:00
Naomi Guyer
104a584ebf BUG: Too many tabs
Combined a few tabs so that the interface is a little less cluttered
when adding this module. When this is
fixed:http://open.silverstripe.org/ticket/7268 it is recommended that
user forms add it's own parent tab to the ui to group user forms tabs
together.
2012-08-13 11:29:42 +12:00
Kirk Mayo
e4875edd05 BUG: Coding convention changes mainly replacing spaces with tabs 2012-07-17 16:09:31 +12:00
Kirk Mayo
eba5edd60b BUG: open ticket 7314 fixing some bugs that have been found 2012-07-17 15:58:24 +12:00
Paul Meyrick
077ce6c645 MINOR: Use setRows() and instead of constructor arguments 2012-06-08 16:18:36 +12:00
Mateusz Uzdowski
2b26d544f9 BUGFIX: Director::redirect is deprecated, use Controller. 2012-06-05 15:08:09 +12:00
Stig Lindqvist
1590172d0c BUGFIX: A Submitted file couldn't not be shown / downloaded in the submission report 2012-05-14 14:16:46 +12:00
Stig Lindqvist
20e3f3c8cd BUGFIX: The EditableFileField crashed when user uploads a not allowed filetype 2012-05-14 10:20:19 +12:00
Stig Lindqvist
ee3de104ec BUGFIX: EditableDateFields nice calendar does not popup in the frontend 2012-05-14 10:20:19 +12:00
Stig Lindqvist
46c0efc9ae BUGFIX: MemberListField called non existing methods on Framework classes 2012-05-14 10:20:19 +12:00
Stig Lindqvist
cbe1dce4ff MINOR Removed the country dropdown field due to the framework has removed the CountryDropdownField
This
2012-05-14 10:20:18 +12:00
Stig Lindqvist
8e80dc2040 MINOR Style guidelines 2012-05-09 15:17:06 +12:00
Will Rossiter
3256663cad BUGFIX: fixes for 3.0 unit tests. Ensure form is not shown if no fields in the list, Prevent nested with getSubmissions(). 2012-05-07 22:00:18 +12:00
Will Rossiter
52f68059d9 ENHANCEMENT: show link to file download in CSV export. Fixes #32 2012-05-07 21:19:16 +12:00
Will Rossiter
2e66d41c56 Merge branch '3.0-compatibility' of github.com:stojg/silverstripe-userforms into pull-33
Conflicts:
	code/model/UserDefinedForm.php
2012-05-07 19:34:38 +12:00
Will Rossiter
ca12d54173 Merge remote-tracking branch 'origin/master' 2012-05-07 18:12:41 +12:00
Will Rossiter
6c1b843fac BUGFIX: fix regression with literal fields not showing content 2012-05-07 18:10:57 +12:00
Stig Lindqvist
2d91f2f456 Minor Setting rows and cols on TextField the non deprecated way 2012-05-07 17:41:30 +12:00
Stig Lindqvist
958d49556d MINOR Overriding methods must have the same signature declaration as the parent class due to E_STRICT. 2012-05-07 17:41:29 +12:00
Stig Lindqvist
816edabd3f MINOR Added public keyword for methods (style guidelines) 2012-05-07 17:41:29 +12:00
edchipman@gmail.com
c036af79ab MINOR: Added a few extension points to allow tapping into various areas 2012-05-07 17:41:29 +12:00
edchipman@gmail.com
ef3953fc68 Replaced instances of new DataObjectSet() with new ArrayList()
Removed Validator::set_javascript_validation_handler() call
2012-05-07 17:41:29 +12:00
edchipman@gmail.com
5de26cd897 Replaced all instances of new FieldSet() with new FieldList()
Replaced the complex table field used for editing the email recipients with GridField

Replaced instances of SAPPHIRE_DIR with FRAMEWORK_DIR

Replaced instances of sapphire/ in css and templates with framework/

Re-organized tabs on user defined form so they are top level

Replaced calls to toDropdownMap() with map()

Renamed getCMSFields_forPopup() top getCMSFields()
2012-05-07 17:41:29 +12:00
guywatson
94b491e125 Incorrect Logic 2012-04-20 10:12:03 +10:00
Will Rossiter
aa67b9da2f FEATURE: allow users to enter extra classes on form fields via the cms. PATCH via TotalNet. Fixes: #5791 2012-04-14 23:03:43 +12:00
Will Rossiter
965d8d00b0 BUGFIX: fix error location for radio fields. Fixes #5635 and #6846. 2012-04-14 22:43:02 +12:00
Will Rossiter
bb1c4d8043 Merge branch 'master' of github.com:silverstripe/silverstripe-userforms 2012-04-14 22:01:23 +12:00
Will Rossiter
0978a1ebf8 BUGFIX: avoid validating fields which have the potential to be hidden. Fixes #5406 and #3 2012-04-14 22:00:13 +12:00
Will Rossiter
2c9e68a928 MINOR: clean up of project. MINOR: removed versioned task. Out of date for usage. 2012-04-14 21:59:56 +12:00