Commit Graph

108 Commits

Author SHA1 Message Date
Stig Lindqvist
39372497df BUGFIX GridField_Actions did not work in more complex Forms with tabsets (i.e SecurityAdmin) when using GridField_Action
BUGFIX Empty GridState data causes isset error
BUGFIX Last field of GridFieldFilter outputs wrong label
2012-01-09 18:41:23 +13:00
Stig Lindqvist
3c516b7b97 API CHANGE: Refactored GridField modifiers into GridField_ColumnProvider, GridField_HTMLProvider, GridField_ActionProvider, and GridField_DataModifier interfaces, all added as components in the config.
API CHANGE: Simplified state handling so that it's just a key store. Affectors are replaced with GridField_ActionProviders. API CHANGE: Removed GridField state manipulation actions instead opting for GridField_ActionProvider actions.
API CHANGE: Removed support for modifiers that add "body" rows, instead having core support for generating the body rows hardcoded into the GridField.
API CHANGE: Allow modification of columns across the whole GridField with the GridField_ColumnProvider interface.
API CHANGE: Renamed GridField_AlterAction to GridField_Action, and added actionName/args parameters, since it can be used for all actions (including batch actions and row actions)
API CHANGE: Removed GridFieldRow class.
2012-01-09 13:30:34 +13:00
Ingo Schommer
72694d8349 ENHANCEMENT Custom form attributes through Form->setAttribute() 2012-01-02 16:49:33 +01:00
Ingo Schommer
b3c08dba12 API CHANGE Deprecated FieldSet-specific methods from Form, namely dateFieldByName(), unsetDataFieldByName(), unsetFieldFromTab(), resetField() 2012-01-02 16:47:59 +01:00
ajshort
3478e4f9e6 ENHANCEMENT: Made the form enctype configurable via a method Form->setEncType().
API CHANGE: Deprecated Form->FormEncType() in favour of Form->getEncType().
MINOR: Added enctypes as constants to the Form class.
2011-12-26 18:36:24 +11:00
Sam Minnee
ff9b9e17af MINOR: Removed use of deprecated Director::redirect* functions. 2011-10-29 17:36:37 +13:00
Sam Minnee
a49b56a348 MINOR: Removed usage of deprecated FormField::Name() 2011-10-29 17:34:32 +13:00
Sam Minnee
e5afa25522 MINOR: Use Deprecation class to indicate deprecated methods in core. 2011-10-29 17:34:31 +13:00
Hamish Friedlander
0a3e0f15de MINOR: Replace references to FieldSet (now deprecated) with references to FieldList 2011-10-28 15:58:55 +13:00
Will Rossiter
1732a17114 Merged new-orm into datagrid 2011-09-26 16:47:54 +13:00
Will Rossiter
2036354d8d ENHANCEMENT: implemented CMSPageHistoryController with comparsion view, single version view into new CMSMain interface 2011-09-19 17:26:01 +02:00
Ingo Schommer
ce8e72cf0e MINOR Removing executable flag from all files (thanks miiihi) 2011-09-18 22:04:02 +02:00
Sam Minnee
878b348a0f Merge branch 'master' into new-orm
Conflicts:
	docs/en/reference/built-in-page-controls.md
	model/SQLQuery.php
2011-05-26 17:08:10 +12:00
Ingo Schommer
fbe4b3fbc9 BUGFIX Form::validate clears whole session incl. 'message' key, instead of overwriting specific keys (fixes #6607, thanks netnoise) 2011-05-17 20:51:38 +12:00
ajshort
1f6f7f0862 API CHANGE: Deprecated CompositeField->FieldSet() in favour of CompositeField->FieldList().
MINOR: Replaced usage of FieldSet with FieldList.
MINOR: Renamed FieldSetTest to FieldListTest.
2011-05-11 17:51:54 +10:00
Ingo Schommer
ce05ce78e5 BUGFIX Allow alternative (array-based) templates in Form->forTemplate() 2011-04-24 11:46:50 +12:00
Ingo Schommer
e4c586f78e BUGFIX Checking for existence of FormAction in Form->httpSubmission() to avoid bypassing $allowed_actions definitions in controllers containing this form
BUGFIX Checking for $allowed_actions in Form class, through Form->httpSubmission()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115182 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-20 00:00:38 +00:00
Will Rossiter
815e9efd94 APICHANGE: removed page comments from core. Please see the github.com account for page comments functionality
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114821 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-11 05:43:08 +00:00
Sam Minnee
854e0e30b4 ENHANCEMENT Added Form->enableSecurityToken() as a counterpart to the existing disableSecurityToken() (from r113284)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114531 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:30:32 +00:00
Sam Minnee
9ec31acacb ENHANCEMENT Added SecurityToken to wrap CSRF protection via "SecurityID" request parameter (from r113272)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114525 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 08:22:57 +00:00
Ingo Schommer
8b220b923a ENHANCEMENT Using RandomGenerator in Form->getExtraFields() "SecurityID" token creation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114498 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-05 00:18:48 +00:00
Sam Minnee
b40544e694 BUGFIX #6066 Form::__construct() should respect hasMethod on passed in Controller instance if it's available (thanks paradigmincarnate!) (from r111890)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112940 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:04:58 +00:00
Ingo Schommer
db460ed57f MINOR Better error handling in Form::__construct() (fixes #5649) (from r105912)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112511 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:54:02 +00:00
Ingo Schommer
4c2ff4bd0a APICHANGE: refactored methods in session to use coding conventions (from r105756)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112502 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:50:43 +00:00
Ingo Schommer
d2c096119c BUGFIX Fixed double pragma after referer redirection on forms with Form->httpSubmission() (fixes #5509, thanks ktauber) (from r103936)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112325 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-14 23:51:55 +00:00
Ingo Schommer
6460d09570 MINOR Fixed phpdoc documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@103385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-23 00:11:41 +00:00
Ingo Schommer
a78ffb7532 BUGFIX: Let FieldMap access non-data fields too (from r95825) (from r98095)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102587 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 02:05:57 +00:00
Ingo Schommer
08b00bd5f4 MINOR Fixed setForm() invocation in Form::__construct() (see #4558, thanks ajshort) (from r97483)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102498 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 21:19:38 +00:00
Sean Harvey
99c4609806 MINOR Fixed misspelled acronym for "Cross-site request forgery" (from r94420)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95608 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-12-16 05:40:46 +00:00
Andreas Piening
e3f4c266e3 BUGFIX: use second argument only if its an array
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90927 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-05 20:31:41 +00:00
Sam Minnee
050b6057ce API CHANGE: Allow fieldList arguments to Form::loadDataFrom() and Form::saveInto(), for situations where the data passed only applies to a segment of the form.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90872 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-05 01:55:27 +00:00
Sam Minnee
e3fa5cae7f BUGFIX: Fix Form.FieldMap, used when constructing forms that have the HTML explicitly specified.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90851 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-05 01:14:54 +00:00
Andrew Short
79773042be API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00
Andrew Short
1ccdcbac5d API CHANGE: Updated Form->FormAction() to use Controller::join_links() rather than relying on the action parameter (to preserve b/c).
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88991 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 00:02:05 +00:00
Andrew Short
e533719d06 BUGFIX: Use Link() on the controller to generate to form action path.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:14 +00:00
Ingo Schommer
cf302011b8 BUGFIX Fixed Form->handleField() to first look for fieldByName() before falling back to dataFieldByName(). This was necessary for tabs and formfields having the same name, e.g. "Members" in the SecurityAdmin class. We have to ensure to return the data field instead of the (non-datafield) tab.
MINOR Added documentation about URL handling to Form

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81130 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-06 22:06:42 +00:00
Ingo Schommer
4a531820cd BUGFIX Accepting dot-notation in TabSet->fieldByName()
BUGFIX Using fieldByName() instead of dataFieldByName() in Form->handleField() to allow rendering of nested tabs through a URL

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81128 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-06 21:53:50 +00:00
Sean Harvey
1b1809f1a2 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80873 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-02 07:18:18 +00:00
Sam Minnee
c0c72e4c53 BUGFIX ajshort: Ensure that CSRF security token settings are passed from parent controllers/forms into child forms.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80225 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 08:48:42 +00:00
Sam Minnee
301989d203 BUGFIX #3922 simon_w: Perform form validation after the clicked button has been set.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79567 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-18 08:22:30 +00:00
Sam Minnee
710bb89396 BUGFIX #3814 bgribaudo: Don't throw an error on validation if no validator set
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78560 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-08 00:27:07 +00:00
Sean Harvey
452c3294b0 API CHANGE Removed @deprecated 2.3 method Form::resetData(): Please use Form::resetField() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77399 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 07:45:50 +00:00
Sean Harvey
1122e42d35 API CHANGE Removed @deprecated 2.3 method Form::loadNonBlankDataFrom(): Please use Form::loadDataFrom() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77354 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:07:06 +00:00
Sean Harvey
9b75cb1987 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75845 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-01 03:49:34 +00:00
Ingo Schommer
fbabb9b31f ENHANCEMENT Added CSS class "validationerror" to Form markup with validation errors. This makes it easy to evaluate a new form after an ajax call and give the user feedback independent of the form rendering, e.g. in ModelAdmin
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73030 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-13 10:19:10 +00:00
Ingo Schommer
969a95eff7 BUGFIX Removed hardcoded field value removals in Form->validate() for creditcard info
ENHANCEMENT Optionally returning JSON data or HTML form representations from Form submissions if Form->validate() fails (if HTTP Accept is set to 'application/json')
ENHANCEMENT Limiting usage of prototype-validation responses in Form->validate() to form instances with $javascriptValidationHandler=='prototype' (which is the default setting). This enables us to return richer JSON data on validation errors without making assumptions about javascript methods on clientside through eval'ed responses (specifically Validator.js->validationError())
API CHANGE Deprecated Validator->getError() and Validator->getCombinedError(), use getErrors() instead

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72979 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 16:47:29 +00:00
Sean Harvey
9dc761d449 ENHANCEMENT Updated Form->forAjaxTemplate() to select the same templates as Form->forTemplate() that was changed in r72950
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72951 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 01:47:21 +00:00
Sean Harvey
e5712d46ef ENHANCEMENT Allow setting the Form template by calling Form->setTemplate('MyTemplateName') without having to subclass Form
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72950 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 01:43:56 +00:00
Andrew O'Neil
60f75c5ca4 Merged changes from 2.3 branch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Ingo Schommer
b7d394008e MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69957 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-10 11:35:50 +00:00