Steve Boyd
cdf6264242
MNT Behat test for hidden form steps
2021-03-10 16:06:01 +13:00
Steve Boyd
8801790b66
FIX Show correct fields in email preview
...
Co-authored-by: Michael Caruana <mikeyc7m@users.noreply.github.com>
2021-01-17 22:55:10 +13:00
Dylan Wagstaff
c0a30f1b6a
FIX unrequire fields when they become dataless ( #1016 )
...
* FIX unrequire fields when they become dataless
When fields that collect input data are changed in configuration via the
CMS to become fields that no longer collect input data (e.g. TextField
-> HTML Block), submitting the resulting form results in a fatal error,
server 500 response, etc. due to trying to check if a field without data
(ever) has data in it.
To circumvent this we can set the required state to false if the field
is being converted to one that does not collect data (which FormField
API conveniently provides a check for).
* Move parent::onBeforeWrite() to top of function
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
2021-01-17 15:55:47 +13:00
Dylan Wagstaff
a42729679b
FIX account for owner class while removing orphans ( #1018 )
...
* FIX account for owner class while removing orphans
* Explicitly set $page and $block ID's in test fixture
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
2021-01-17 15:29:33 +13:00
Steve Boyd
81fcd669a2
FIX Show custom validation message for checkbox and radio groups
2020-07-21 17:30:55 +12:00
Steve Boyd
59cd87d842
FIX Trim recipient email addresses before write
2020-07-14 16:41:36 +12:00
Maxime Rainville
25978d3c58
Clean up tests
2020-06-12 00:55:12 +12:00
Andre Kiste
3b40be3b8f
NEW Add folder confirmation modal when adding a new EditableFileField
to a userform. ( #972 )
2020-06-10 16:59:01 +12:00
Steve Boyd
ed53709631
NEW DB column showing if file is userform upload
...
- UserFormUpload used by File::isTrackedFormUpload()
2020-05-28 13:14:34 +12:00
Steve Boyd
e54a825ea3
Merge branch '5.5' into 5
2020-05-27 13:41:51 +12:00
Steve Boyd
c3d990f70f
FIX Create image thumbnails for asset-admin for images uploaded through userforms ( #969 )
2020-05-27 12:26:14 +12:00
Maxime Rainville
39ee08cff9
Remove bool explicit type definition to please PHP 5.6
2020-01-13 12:25:47 +13:00
Maxime Rainville
d280c54860
Patch and reorganise some test
2020-01-13 12:15:34 +13:00
Maxime Rainville
793f437289
API Mark EditableFormField::EffectiveDisplayRules() for deprecation
2020-01-13 12:12:14 +13:00
Maxime Rainville
a0cedaeb38
Move conditionalFieldEnabled to EditableFormField as isDisplayed
2020-01-10 17:36:04 +13:00
Jess Champion
25bfc9eaf5
Required fields can have display rules. Hidden required fields are dynamically excluded from server and client side validation.
2020-01-10 10:41:59 +13:00
Robbie Averill
483fbc8499
FIX Preview email link now handles cases where it's loaded in the browser, requested via AJAX and used in a trait or a page context
2019-05-17 15:51:11 +12:00
Garion Herman
2f0aea847a
Add presence validation for EmailRecipient recipient, add error handling
2019-05-03 16:46:32 +12:00
Robbie Averill
a4cd982637
Merge branch '5.3'
2019-03-26 14:46:22 +13:00
Robbie Averill
bf142eb6ef
FIX Display rules for page breaks/editable form steps now works again
...
This was previously broken in a regression from https://github.com/silverstripe/silverstripe-userforms/pull/575
where the fields themselves could still be toggled, but the jQuery event dispatches for the form steps
were removed. This pull request re-introduces those jQuery event triggers when hiding and showing
editable form fields via display rules.
2019-03-25 15:09:38 +13:00
Michael Nowina-Krowicki
55ea24232b
Test for EmailRecipient Subject with MergeField
2019-01-28 14:58:55 +10:30
Robbie Averill
1ad1019e0a
Merge pull request #852 from LukeAmos/issue/814
...
FIX Fixes #814 Renamed 'SubmittedFormEmailHtml' to 'SubmittedFormEmail'
2019-01-16 22:55:50 +01:00
Luke Amos
1efeeca6db
FIX Fixes #814 Renamed 'SubmittedFormEmailHtml' to 'SubmittedFormEmail'
...
following peer feedback. Updated respective code and unit test
2019-01-17 10:30:05 +13:00
Robbie Averill
f235c8642c
Add unit tests for EditableNumericField::validate()
2019-01-16 21:59:02 +01:00
Luke Amos
2cb649abbb
FIX #Fixes silverstripe#814 Fixing automated test for code.
2019-01-16 14:14:19 +13:00
Robbie Averill
9f79218612
Merge branch '5.2'
...
# Conflicts:
# client/dist/styles/userforms-cms.css
# client/src/styles/userforms-cms.scss
2018-07-26 15:19:06 +12:00
Daniel Hensby
dc226cf8ba
Merge pull request #793 from stephenmcm/feat-disableShortcode
...
Optional disable $UserDefinedForm
2018-07-11 22:54:58 +01:00
Stephen McMahon
01520c22bd
Fix(shortcode) re-order if block check $UserDefinedForm in $this->Content. Rename config value to be clearer
2018-07-09 15:20:30 +10:00
Stephen McMahon
ed1e9858af
Fix(test) clean up format to make linter happy
2018-07-06 09:28:16 +10:00
Stephen McMahon
0a708d9ea3
Fix(tests) change asserts in to check correct values
2018-07-05 17:01:45 +10:00
Stephen McMahon
94192f4b66
Add(config) create disable_form_content_interpolation option for ignoring $UserDefinedForm in $this->Content
2018-07-05 16:10:43 +10:00
Robbie Averill
9812d43a3f
Disable transactions in UserDefinedFormTest to prevent fixture leaks
2018-06-20 17:08:20 +12:00
Robbie Averill
eddfa10cd3
Remove cache from get_one_by_stage calls in tests
2018-06-19 16:14:36 +12:00
Robbie Averill
398c65c540
Re-enable test for removing custom rules from live stage when forms are published with deletions
2018-06-19 16:04:43 +12:00
Robbie Averill
bb131ec07a
Merge branch '5.1'
2018-06-11 15:24:23 +12:00
Robbie Averill
cc6005d81d
FIX Disable themes in UDF functional test. Fixes failure with cwp/starter-theme
2018-06-01 17:01:45 +12:00
Chen Shenghan
8870833318
NEW empty default value for Country Dropdown
2018-05-01 16:07:03 +12:00
Chen Shenghan
4d89705fe6
NEW default value for Country Dropdown
2018-04-30 22:20:28 +12:00
Robbie Averill
8ae3e4a041
Adjust assertion to handle environmental influence, e.g. CWP default records
2018-03-27 10:34:42 +01:00
Robbie Averill
3e71cf7840
Add tests for duplicating multiple option fields, which should duplicate the options too
2018-03-27 10:34:41 +01:00
Robbie Averill
68a0723749
Remove incorrect @covers annotation
2018-03-26 10:46:17 +13:00
Robbie Averill
b615721f22
Switch test assertion to be more flexible in URL pieces (versioned changes in 4.2)
2018-03-26 10:46:09 +13:00
Robbie Averill
5cce5f5a17
FIX Allow editable form fields to have nullable titles rather than fallback to Name
2018-03-23 16:25:06 +13:00
Robbie Averill
d13bf1e0bc
Add tests to ensure that editable form fields allow nullable titles
2018-03-23 16:18:32 +13:00
Robbie Averill
d19914044a
FIX getFormParent does not automatically look up arbitrary test stubs, remove theme dependency
2018-03-19 16:00:57 +13:00
Dylan Wagstaff
48bf46215e
FIX stop form items double duplicating ( #728 )
...
When calling `duplicate` on a form, a form field, or suchlike, the results
would be that all related items to the thing being duplicated (such as
fields for a form, or options to an editabledropdown) would be duplicated
_twice_; ie. where a form had two fields, it's new duplicate would have
four (each one occurring twice). We have stopped this in a backwards
compatible way - that is the bug was introduced with core 4.1, and this
change leaves the userforms module compatible with 4.0.
2018-03-05 14:31:33 +13:00
Andrew Aitken-Fincham
e2066a55b3
missing 'not', add alert-warning for unsaved form
2018-02-20 14:44:31 +00:00
Andrew Aitken-Fincham
0f6efea12a
add proper fallbacks to cover tests
2018-02-14 11:30:35 +00:00
Raissa North
77c47a38fa
FIX Fix support address list in email address fields ( #707 )
2018-01-29 09:56:44 +13:00
Robbie Averill
e1a7030306
FIX Submitted form field data is rendered correctly in recipient email templates
...
Also remove some deprecated code from UserDefinedFormControllerTest and allow
simple or starter theme to be used in the test.
2018-01-25 16:17:28 +13:00
Robbie Averill
5695c9585a
FIX Email templates for for submissions display correctly in preview
2018-01-24 15:17:03 +13:00
Robbie Averill
262510a450
FIX Cast template values as array, include list in CMS fields for recipients
2017-12-04 23:45:52 +13:00
Robbie Averill
ccf8f86bf8
FIX Update getIcon resource resolution methods
2017-11-03 11:12:55 +13:00
Will Rossiter
28581cae43
Update path
2017-10-16 14:56:20 +13:00
Will Rossiter
658b4dc02a
Reduce code duplication, share test fixtures
2017-10-16 10:13:01 +13:00
Will Rossiter
cf6c1b44ba
Controller should be under control namespace for consistency
2017-10-10 08:48:16 +13:00
Robbie Averill
6836174a65
API Remove deprecated migrateSettings() and secure assets integration code
2017-09-21 09:40:04 +12:00
Robbie Averill
faf04bff43
FIX Tests for email templates and whether they exist or not
2017-08-24 15:29:27 +12:00
Robbie Averill
12aad64972
FIX Update namespacing and include paths in new multiple option field tests
2017-08-22 16:40:18 +12:00
Robbie Averill
b4f0850b88
Make test fixtures more readable, update memory limit in Travis runs
2017-08-22 16:40:17 +12:00
Robbie Averill
1bd0b0c138
FIX Update EmailRecipient to look in root directory for templates, optionally, fix other tests
2017-08-22 16:40:17 +12:00
Robbie Averill
8fbe63e34a
FIX Remove old upgrade maps, comment failing test (see todo), change publish strategy in UDF test
2017-08-22 16:40:17 +12:00
Robbie Averill
5c9417da21
API Implement cascading deletes API for model relations
2017-08-22 16:40:17 +12:00
Robbie Averill
98f69f344f
FIX Use correct class names in EditableCustomRuleTest fixtures
2017-08-22 16:40:17 +12:00
Robbie Averill
59827e2011
API Remove UserFormRecipientEmail and use core Email class. Minor test fixes.
2017-08-22 16:40:16 +12:00
Robbie Averill
cdb2259307
FIX Validation related errors in unit tests and EmailRecipient
2017-08-22 16:40:16 +12:00
Robbie Averill
5af348894a
FIX Update core API changes, implement last of namespacing in test classes, PSR-4 autoloader
2017-08-22 16:40:16 +12:00
Robbie Averill
32586b6363
Run PSR-2 linting
2017-08-22 16:40:16 +12:00
Robbie Averill
cd314d3a3c
FIX Namespacing errors and method incompatibilities with parent classes
2017-08-22 16:40:16 +12:00
Robbie Averill
b8d6ac336f
API Upgrade test classes, remove tests for obsolete classes
2017-08-22 16:40:15 +12:00
Robbie Averill
eaf374adc5
API Implement SS4 namespacing, add userforms namespaces
2017-08-22 16:40:15 +12:00
Robbie Averill
2e809de2ea
Move files into PSR-4 compatible locations
2017-08-22 16:40:15 +12:00
Robbie Averill
c8698d99bd
Merge branch '4'
2017-08-22 10:44:04 +12:00
Robbie Averill
a0aa714feb
Merge branch '4.4' into 4.5
2017-08-22 10:40:37 +12:00
Franco Springveldt
f7ff07b828
Merge pull request #648 from creative-commoners/pulls/4.4/php53-compat-fix
...
FIX Alias object context in closure for PHP 5.3 compat, add test to cover it
2017-08-22 10:31:04 +12:00
Robbie Averill
8d4cd036f7
Merge branch '4'
2017-08-21 15:39:05 +12:00
Robbie Averill
d953603bed
Merge branch '4.4' into 4.5
2017-08-21 15:35:39 +12:00
Robbie Averill
792d040652
Merge branch '4.3' into 4.4
2017-08-21 15:33:20 +12:00
Robbie Averill
dd7e13e7f8
Merge branch '4.2' into 4.3
2017-08-21 15:31:15 +12:00
Robbie Averill
fac99f7b6b
FIX Alias object context in closure for PHP 5.3 compat, add test to cover it
2017-08-16 13:59:41 +12:00
Daniel Hensby
b068bf65bf
Merge pull request #536 from solnet-aquarium/emailValidation
2017-07-20 10:41:28 +01:00
Franco Springveldt
1b472cda7b
ENHANCEMENT removed needless list from CheckboxGroupField and RadioField
2017-07-12 10:40:53 +12:00
Robbie Averill
bf20e19285
FIX Ensure HTML email preview content is parsed as HTML including shortcodes
2017-06-12 12:03:05 +12:00
Robbie Averill
f9bf407295
Merge remote-tracking branch 'origin/4'
2017-06-09 11:29:44 +12:00
Robbie Averill
f488fcce83
Merge remote-tracking branch 'origin/4.3' into 4
2017-06-09 10:25:50 +12:00
Reece Alexander
e86306c7bf
FIX incorrect calculation of MAX_FILE_SIZE ( #600 )
...
* Fixes incorrect calculation of MAX_FILE_SIZE
* Fixes expected bytes in EditableFileFiled test
2017-05-25 09:32:06 +12:00
Reece Alexander
ec2b012eed
FIX incorrect calculation of MAX_FILE_SIZE ( #600 )
...
* Fixes incorrect calculation of MAX_FILE_SIZE
* Fixes expected bytes in EditableFileFiled test
2017-05-24 18:31:25 +12:00
Robbie Averill
7c3edd4d51
FIX Hide and show form fields by toggling the "hide" class instead of jQuery methods
2017-05-22 15:54:28 +12:00
Robbie Averill
11f43c27dc
FIX Make EditableLiteralField extensible, have its own template, honour visibility rules
2017-05-18 10:34:04 +12:00
Franco Springveldt
6fd952c737
Adding extra filters (GreaterThan, LessThan, etc.) to Email Custom Rules ( #590 )
2017-05-15 18:03:51 +12:00
Franco Springveldt
2357ce02ad
NEW Email custom rules now supports GreaterThan, LessThan, etc conditionals
2017-05-15 14:05:18 +12:00
Damian Mooyman
c78942474c
Merge 4 into master
2017-05-01 17:47:44 +12:00
Damian Mooyman
e7e810d0f8
Merge 4.3 into 4
2017-05-01 17:44:39 +12:00
Franco Springveldt
a94f0e35aa
Enhancement: Implemented and/or display rules for UserForms
2017-04-28 10:22:15 +12:00
3Dgoo
ebbf9a727c
ENHANCEMENT Changing form ID to be unique
2017-04-18 13:11:32 +12:00
Damian Mooyman
c349ae980e
BUG Use non-destructive pubilshing for editable options
...
Fixes #544
2017-03-13 10:14:30 +13:00
torleif
8c27891600
Fix for #185 and #194 ( #539 )
...
* Fix for #185 and #194
* Fix for #185 and #194
* Fix for #185 and #194
2017-01-30 10:24:00 +00:00
Kirk Mayo
ac4c1678a2
Added email address validation to model
...
Added unit tests for email address validation
Corrected order of params for assertNotContains
EmailRecipient email address validation
2017-01-12 08:51:05 +13:00
Damian Mooyman
b047a1468c
BUG Fix issue with UserFormsCheckboxSetField
...
Fixes #533
2016-12-21 15:09:27 +13:00
Damian Mooyman
1743ed1556
BUG Fix issue with UserFormsCheckboxSetField
...
Fixes #533
2016-12-14 10:45:42 +13:00