Ingo Schommer
cc33427218
Merge pull request #2123 from willmorgan/forajaxtemplate-session-message
...
MINOR clear session message whenever forAjaxTemplate is used
2013-07-10 16:04:48 -07:00
Simon Welsh
fbce9fd7cd
Merge branch '3.1'
...
Conflicts:
.travis.yml
docs/en/misc/contributing/code.md
javascript/HtmlEditorField.js
2013-07-05 10:22:58 +12:00
Ingo Schommer
09b31c642f
Allow Form->forTemplate() URL access ( fixes #788 )
...
Need to specifically whitelist URL-accessible actions now.
Used in "Insert Link" form in HtmlEditorField.
Regression from 1edf45fbed
2013-06-25 16:33:00 +02:00
Ingo Schommer
fb784af738
API Enforce $allowed_actions in RequestHandler->checkAccessAction()
...
See discussion at https://groups.google.com/forum/?fromgroups#!topic/silverstripe-dev/Dodomh9QZjk
Fixes an access issue where all public methods on FormField were allowed,
and not checked for $allowed_actions. Before this patch you could e.g.
call FormField->Value() on the first field by using action_Value.
Removes the following assertion because it only worked due to RequestHandlingTest_AllowedControllerExtension
*not* having $allowed_extensions declared: "Actions on magic methods are only accessible if explicitly allowed on the controller."
2013-06-24 14:50:40 +02:00
Will Morgan
a99b430fec
Clearing the session message whenever forAJAXTemplate is used.
2013-06-19 14:03:35 +01:00
Ingo Schommer
94b4237372
Merge remote-tracking branch 'origin/3.1'
2013-06-19 11:17:33 +02:00
Ingo Schommer
63eb9518d2
Consistent Form setters (returning $this on setHTMLID())
2013-06-13 07:51:08 +02:00
Ingo Schommer
bfff11eb9c
API New CMSForm class to allow validation responses in CMS ( fixes #1777 )
...
Thanks to @willmorgan for getting this discussion started
(see https://github.com/silverstripe/sapphire/pull/1814 ).
2013-06-13 07:51:05 +02:00
Ingo Schommer
5a1d476e8d
Merge branch 'idvalidattr' of git://github.com/wilr/sapphire into wilr-idvalidattr
2013-05-31 19:27:19 +02:00
Ingo Schommer
88536998b9
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
.travis.yml
2013-05-31 18:08:59 +02:00
Will Rossiter
4921173209
Code formatting
2013-05-30 21:06:54 +12:00
Will Rossiter
c7468caeb6
FIX: Generate Form::FormName() through
2013-05-30 21:06:41 +12:00
Fred Condo
59657d94bb
Use upper case to represent HTTP methods for forms
...
Per [RFC 2616 section 5.1.1][ietf], HTTP methods are case-sensitive.
- Change the internal representation of the form's method to upper case
- Update FormTest to accommodate the case changes
- Change method to lower case for HTML in Form#getAttributesHTML()
[ietf]: http://tools.ietf.org/html/rfc2616#section-5.1.1
2013-05-28 17:51:56 -07:00
Will Rossiter
ca87b8b794
API: Form Field ID attribute should follow HTML specification
...
Fixes: http://open.silverstripe.org/ticket/4431 .
Changes Form and Form Field classes to make use of Convert::raw2htmlid() which follows http://www.w3.org/TR/REC-html40/types.html#type-cdata .
Introduces a FormTemplateHelper class to assist in these sort of updates in the future.
2013-05-26 11:11:55 +12:00
uniun
5596442081
FIX: Form::set_current_action() never gets called.
2013-05-24 11:25:36 +03:00
Ingo Schommer
14c59be85e
API Form::setStrictFormMethodCheck() and strict argument to setFormMethod()
...
Thanks to @sminnee for getting this started
2013-05-08 10:25:13 +02:00
Will Morgan
9732a7fb3b
Fixing typo on Validator exception message
2013-04-24 18:50:40 +02:00
uniun
4d70daa9e2
BUG: HiddenFields and VisibleFields should always return extraFields
...
HiddenFields() and VisibleFields() should always return extraFields, e.g. HiddenFields doesn't return SecurityID if it is called before Fields().
2013-04-17 20:31:17 +02:00
Ingo Schommer
3334eafcb1
API Marked statics private, use Config API instead ( #8317 )
...
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Ingo Schommer
0a9f3b75a9
Fixed deprecated usage of <% control %>
2013-03-19 12:58:14 +01:00
Graeme Smith
a1114b8fcb
MINOR: Correct exception message in constructor
2013-02-18 15:01:48 +00:00
Ingo Schommer
14dcc82e76
BUG Find Form actions in CompositeFields for access checks
...
This bug was introduced with the new nested CMS actions
around December 2012, but wasn't noticed until now
because checkAccessAction() would wrongly return TRUE
before the dataFieldByName() check was reached.
2013-02-18 15:30:36 +01:00
Ingo Schommer
634c91c6ff
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
email/Mailer.php
2013-01-30 12:46:24 +01:00
Sam Minnee
9a2ba483df
BUGFIX: Made CSRF-error wording friendlier.
2013-01-29 18:03:49 +01:00
Simon Welsh
3439e30ac1
Corrects indentation and line length
2013-01-24 19:56:02 +13:00
Ingo Schommer
37f4d2e21f
Merge remote-tracking branch 'origin/3.0' into 3.1
2013-01-21 11:15:17 +01:00
Ingo Schommer
c11b3918fc
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
admin/css/screen.css
admin/scss/_style.scss
core/PaginatedList.php
email/Mailer.php
2013-01-21 11:14:57 +01:00
Ingo Schommer
5d37d55f35
BUG Form session message clearing regression
...
Regression originally from 729bcc95
, but made visible by 014f541a8
2013-01-21 11:11:21 +01:00
Ingo Schommer
014f541a89
BUG Regression in Form->clearMessage() ( fixes #8186 )
...
See 729bcc9
2013-01-15 14:25:07 +01:00
Ingo Schommer
e7e6c45aee
Merge pull request #1082 from sminnee/form-improvements
...
Form improvements
2013-01-11 02:29:14 -08:00
Hamish Friedlander
2916f2043c
NEW: Improve HTTP caching logic to automatically disable caching for requests that use the session.
...
This improvement makes it easier to set a side-wide default cache time without needing to worry about CSRF-protected forms, etc.
2013-01-08 17:47:05 +13:00
Sam Minnee
729bcc95db
BUGFIX: Don't clear form messages unless forTemplate() is actually called.
...
BUGFIX: Clear session-stored form data as well as form error message.
2013-01-08 17:45:17 +13:00
Ingo Schommer
644cc79ebb
API Removed methods previously deprecated in 3.0
2012-12-14 01:16:47 +01:00
Simon Welsh
b0121b541c
Add codesniffer that ensures indentation is with tabs.
2012-12-12 17:33:31 +13:00
Simon Welsh
fc5dd2994c
Add codesniffer that ensures indentation is with tabs.
2012-12-12 00:12:11 +13:00
Ingo Schommer
c55c7c33f8
Merge branch '3.0'
...
Conflicts:
admin/code/CMSProfileController.php
composer.json
tests/model/DataObjectTest.php
2012-11-22 23:51:28 +01:00
Hamish Friedlander
0dd97a38f6
API: Form#loadDataFrom 2nd arg now sets how existing field data is merged with new data
2012-11-16 12:36:00 +13:00
Sean Harvey
b43b023c1e
Remove deprecated security token methods on Form
...
Use SecurityToken class directly instead
2012-11-15 14:43:18 +13:00
Sean Harvey
63820130c2
Remove deprecated Form::FormEncType(), use getEncType() instead
2012-11-15 14:43:17 +13:00
Sean Harvey
4e355bdb19
Removing deprecated methods on Form
...
Use FieldList API through Form::Fields() and Form::Actions() instead
2012-11-15 14:43:17 +13:00
Sam Minnee
1f7fc1f76a
FIX Remove instances of lines longer than 120c
...
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit. This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a
Method visibility according to coding conventions
2012-09-20 10:46:59 +02:00
unclecheese
e2c1deb4f7
MINOR Chainable Form->loadDataFrom()
2012-06-20 17:01:16 +02:00
Sean Harvey
7fe0858be1
API CHANGE Marked Form::unsetFieldFromTab() as deprecated. Please use
...
Fields() and the FieldList API instead.
2012-05-31 14:29:58 +12:00
Sean Harvey
a84ef8d8f3
MINOR Don't use template method Actions internally in Form
2012-05-24 10:49:47 +12:00
Sean Harvey
c7e0cee637
API CHANGE Add Form->getController() and use this instead of Controller::curr() in FileIFrameField
...
API CHANGE Add Form->getName() and deprecate Form->Name(), use getName() instead.
2012-05-24 10:46:57 +12:00
Ingo Schommer
c2339d2181
API CHANGE Removed FormResponse handling for erroneous ajax requests in Form->validate(), use javascript validation instead, or reload the whole form with new HTML including the error messages
2012-04-30 17:15:30 +02:00
Mateusz Uzdowski
b561786825
MINOR: change the ugly user-facing CSRF message to more friendly
...
User does not necessarily knows what CSRF is, and tends to get scared by
this, thinking he has abused something. On the other hand users tend to
know what session expiry means.
2012-04-26 13:57:16 +12:00
Ingo Schommer
ee70e0a5b7
MINOR Fixed returns of Form->unsetValidator()
2012-04-17 11:03:09 +02:00
Simon Welsh
3a6341a251
API-CHANGE sapphire folder can now be renamed.
2012-04-15 10:50:19 +12:00