Commit Graph

34 Commits

Author SHA1 Message Date
Chris Penny
72a213790e
MNT Update docblocks and import statements (#1044) 2021-02-26 16:13:23 +13:00
Steve Boyd
ce2fe31bdd Merge branch '5.7' into 5.8 2021-01-17 15:58:55 +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
Michal Kleiner
66bbe44972
FIX Add missing dots in translation string references 2020-12-02 10:01:50 +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
Remy Vaartjes
f682e74f44 Enable 4.4 better button functionality 2019-07-08 14:26:58 +02: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
Robbie Averill
2fd1c1b504 Merge branch '5.1' into 5.2
# Conflicts:
 #	.travis.yml
2019-01-10 12:26:18 +01:00
Robbie Averill
7a9ca8fcfd Merge branch '5.0' into 5.1 2019-01-10 12:25:40 +01:00
Nicolaas
96be46a6ac FIX Fixing escape error in required identifier 2019-01-10 12:13:13 +01:00
David Toews
5271f14998 Allows placeholder value of '0' 2018-10-01 16:20:33 -06:00
Robbie Averill
f734c2f033 FIX Do not override core translation for 'field is required' 2018-09-03 13:37:21 +02:00
Robbie Averill
cc3ea728e4 FIX Postgres compatibility in requireDefaultRecords database queries 2018-08-21 15:04:51 +12:00
Dylan Wagstaff
569b0a7627 FIX use the same translation variable key as core (#755)
This way when this translation string overrides the core one, the core
triggered translations will still continue working.
2018-03-29 09:29:15 +13:00
Robbie Averill
100be38ab1 API Remove use of getEscapedTitle() and deprecated for future removal. Use $Title directly instead. 2018-03-22 09:24:55 +13:00
Robbie Averill
029a69b937 FIX Do not convert right title to XML, templates escape values by default now 2018-03-21 11:57:30 +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
Robbie Averill
7339c1c498 FIX Update display rules not enabled warning message to be full width 2018-02-02 12:58:19 +13:00
Robbie Averill
ccf8f86bf8 FIX Update getIcon resource resolution methods 2017-11-03 11:12:55 +13:00
Will Rossiter
0287726337 NEW Add ability to run a UserForm on any DataObject via traits. 2017-10-09 15:05:41 +13:00
Franco Springveldt
bb8f9173ec Merge pull request #662 from creative-commoners/pulls/5.0/update-docs
DOCS Update dev and userguide docs for SS4, new screenshots, etc
2017-09-22 16:04:52 +12:00
Robbie Averill
6836174a65 API Remove deprecated migrateSettings() and secure assets integration code 2017-09-21 09:40:04 +12:00
Robbie Averill
d66b06dbe4 FIX Merge field markup to match core SS4 field markup, add button_text config static 2017-09-20 16:31:40 +12:00
Robbie Averill
de3c8db399 API Remove deprecated methods in EditableFormField, add upgrade guide for UF 4-5 2017-09-19 16:04:48 +12:00
Robbie Averill
4942ac35ad FIX Email preview renders as HTML, template selection works, use correct callbacks in GridField summary 2017-08-24 15:15:36 +12:00
Robbie Averill
5c9417da21 API Implement cascading deletes API for model relations 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
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
46c3c5b517 FIX Syntax error and last of translation namespacing 2017-08-22 16:40:15 +12:00
Robbie Averill
0008ffaf01 API Implement upgrader cleanup, array declaration changes, class injection, rename some models 2017-08-22 16:40:15 +12:00