Commit Graph

36 Commits

Author SHA1 Message Date
Damian Mooyman
bdb1a95758 API Cleanup and refactor of select fields
API Standardise Relation interface
2016-01-21 15:40:19 +13:00
Damian Mooyman
8331171f2c Merge remote-tracking branch 'origin/3.1' into 3
Conflicts:
	.scrutinizer.yml
	admin/javascript/LeftAndMain.Panel.js
	core/startup/ParameterConfirmationToken.php
	dev/Debug.php
	dev/FixtureBlueprint.php
	docs/en/00_Getting_Started/05_Coding_Conventions.md
	docs/en/00_Getting_Started/index.md
	docs/en/02_Developer_Guides/01_Templates/01_Syntax.md
	filesystem/File.php
	filesystem/Folder.php
	forms/FieldList.php
	forms/LabelField.php
	forms/MoneyField.php
	forms/TextField.php
	forms/TreeDropdownField.php
	forms/Validator.php
	forms/gridfield/GridField.php
	forms/gridfield/GridFieldExportButton.php
	lang/de.yml
	lang/fi.yml
	model/DataObject.php
	model/SQLQuery.php
	parsers/ShortcodeParser.php
	security/ChangePasswordForm.php
	security/Security.php
	tests/control/DirectorTest.php
	tests/core/startup/ParameterConfirmationTokenTest.php
	tests/dev/FixtureBlueprintTest.php
	tests/forms/FieldListTest.php
	tests/forms/MoneyFieldTest.php
	tests/model/SQLQueryTest.php
	tests/security/SecurityTest.php
2015-06-02 19:13:38 +12:00
Stevie Mayhew
9e8a5c9ba5 FIX: remove validation type constraint from form fields for 3.2 release 2015-05-11 12:32:00 +12:00
Patrick Nelson
bfd8b6663a FIX for #4104, minor revision of error messages in ListboxField (more intuitive). 2015-04-25 18:26:11 -04:00
Stevie Mayhew
41ea83b337 FEATURE: add validation to form field subclasses 2014-11-17 08:17:38 +13:00
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
Simon Welsh
151baeede1 Correct line length and indentation 2013-08-21 18:54:05 +12:00
Daniel Hensby
4e36020118 BUG UnsavedRelationList aren't checked
When saveInto is called on ListboxField and CheckboxsetField,
UnsavedRelationList should be an acceptable relationship type. This is
leading to relations not being saved on initial creation of Member
objects
2013-02-19 14:58:31 +00: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
Tom
54d8abcdc7 Bug:ListBoxField and DropdownField does not respect getSource in all Places
In some places source is referenced directly and assumed to be array, while in some places the getSource() method is used instead.
By changing this you have more freedom when extending these classes
2012-09-14 16:08:34 +03:00
Simon Welsh
f8082e4814 MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
Will Rossiter
07d2d5273a ENHANCEMENT: populate FormField:: on the fly based on class name of field rather than requiring explict definition. 2012-04-14 17:36:19 +12:00
Andrew O'Neil
daab8f4cbc MINOR: Consistently use DataObjectInterface for saveInto() on FormField subclasses. Fixes E_STRICT notice 2012-04-11 17:00:57 +12:00
Ingo Schommer
1ba5e79e3b MINOR Re-fetching relationship in ListboxField->saveInto() when dealing with new records, to avoid errors on RelationList without foreign keys (fixes #6925) 2012-03-09 22:32:12 +01:00
Ingo Schommer
b43bdf3781 BUGFIX Allowing to save ListboxField and CheckboxSetField into custom relations (which don't return TRUE for has_many() or many_many()) 2012-03-07 01:23:41 +01:00
Ingo Schommer
1201f6c8bb BUGFIX Saving records in ListboxField->saveInto() and PermissionCheckboxSetField->saveInto() so we have a database ID to relate to (was previously customised in MemberTableField->saveComplexTableField(), which is now deprecated) 2012-03-06 01:23:34 +01:00
Ingo Schommer
5d565dcfa3 ENHANCEMENT Added ListboxField->setDisabledItems() and setDefaultItems() (similar to CheckboxSetField API) 2012-03-05 16:11:29 +01:00
Ingo Schommer
6e3ceefbb8 ENHANCEMENT Relationship saving in ListboxField (preparing for chosen.js usage), escaping commas in payload when serialising multiple values into a single field 2012-03-05 10:55:09 +01:00
Ingo Schommer
7602d081a2 ENHANCEMENT Fluent interface in Form API by returning instance from all setters 2012-02-17 13:35:26 +01:00
Fred Condo
d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Ingo Schommer
cb74dbccfc MINOR Removed overzealous value validation in ListboxField, should silently ignore unknown values (lacking better referential integrity measures in the underlying model layer) 2012-01-19 12:13:18 +01:00
Ingo Schommer
cc32957414 API CHANGE Don't allow specifying $form as constructor argument in various form fields, use setForm() instead (to achieve a cleaner API with less confusing parameter order) 2012-01-02 17:50:34 +01:00
Ingo Schommer
b5421d9598 ENHANCEMENT Allowing custom attributes in (most) FormField implementations, which allows for HTML5 data attributes 2012-01-02 16:48:14 +01:00
Ingo Schommer
4d31ac65a0 ENHANCEMENT Allowing array values in ListboxField->setValue(), serialising into comma-separated list of values (AIR-35) 2011-10-07 14:12:47 +02:00
Ingo Schommer
ce8e72cf0e MINOR Removing executable flag from all files (thanks miiihi) 2011-09-18 22:04:02 +02:00
Sam Minnee
ce06d13fd6 MINOR Cross-referencing some documentation (from r108375)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112721 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:50:48 +00:00
Ingo Schommer
a0dd4ff8f0 MINOR Moved class-specific documentation from doc.silverstripe.org back into class-level PHPDoc (from r107725)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112608 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:55:22 +00:00
Sean Harvey
8b81dbaa75 MINOR Explicitly set ListboxField::$multiple to be a boolean, added phpDoc to support this
MINOR Added proper phpDoc for ListboxField::__construct() arguments
MINOR Removed $source property on ListboxField. This class inherits from DropdownField, and should inherit it's source propery instead



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78186 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-01 23:37:03 +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
c8c9c2166d ENHANCEMENT Added DropdownField->setEmptyString() and DropdownField->setHasEmptyDefault() to decrease constructor arguments and allow for modification of behaviour after calling construtor. Added DropdownField->getSource() to dynamically include empty defaults at rendering-time rather than construction time. Adjusted DropdownField subclasses to new behaviour
ENHANCEMENT Added DropdownFieldTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64304 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 12:39:09 +00:00
Sam Minnee
a34ff7589b BUGFIX: Removed notice-level errors in ListboxField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63527 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-02 10:09:29 +00:00
Sean Harvey
fb1b0b4381 MINOR Fixed PHP notices in ListboxField->Field() by defining the variables first
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-30 03:21:28 +00:00
Ingo Schommer
60860cc1b9 MINOR Unified @package PHPdoc (added where missing, removed duplicates)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56212 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-06-15 13:33:53 +00:00
Sam Minnee
b1d2e3906b API Documentation updates
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47766 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-09 04:18:36 +00:00
Hayden Smith
4a5d9b03f8 Moved Sapphire module to open source path
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39001 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-07-19 10:40:28 +00:00