Commit Graph

754 Commits

Author SHA1 Message Date
Ingo Schommer
916518e8c5 ENHANCEMENT Added OptionsetField->setDisabledItems() to allow specifically disabling certain checkboxes
ENHANCEMENT Added CheckboxSetField->setDefaultItems() to tick specified checkboxes regardless of the value passed (from r99596)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99664 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:40 +13:00
Ingo Schommer
aca3bdf9b8 BUGFIX Fixed TreeMultiselectField/TreeDropdownField saving with 'unchanged' default values from constructor (from r99581)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99655 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:40 +13:00
Ingo Schommer
02c188633c BUGFIX Fixed TreeMultiselectField->Field() to respect settings, and give them priority over existing relations through getItems(). This is used in MemberTableField to set default groups for 'add member' popups. (from r98879)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99647 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:39 +13:00
Ingo Schommer
7954bc4052 BUGFIX Fixed variable existence checks in setValue() in FormField::__construct() by checking for !== NULL (changed from isset($value) to $value in r99360)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99394 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:38 +13:00
Ingo Schommer
63c543c18d BUGFIX Fixed MoneyField constructor - parent (FormField) constructor calls setValue() already, which needs to happen *after* setting certain field instances
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99391 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:38 +13:00
Ingo Schommer
d3a85844f7 ENHANCEMENT Allow locale/dateformat specific reordering of day, month, year input fields in DateField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99361 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:38 +13:00
Ingo Schommer
c945e23c62 FEATURE New DatetimeField class (form field wrapper composed of DateField andTimeField)
FEATURE New DateField and TimeField form classes with more consistent API and easier localization
API CHANGE Date/time parsing in DateField, TimeField and DatetimeField defaults to i18n::get_locale() ('en_US') instead of using en_NZ/en_GB specific parsing. Use i18n::set_locale('en_NZ') in mysite/_config.php to revert to old behaviour.
API CHANGE $timeformat constructor parameter in TimeField needs to be in ISO date notation (not PHP's date())
API CHANGE TimeField, DateField and related subclasses use Zend_Date for date parsing, meaning they're stricer than the previously used strtotime()
API CHANGE Removed DMYCalendarDateField and CalendarDateField, use DateField with setConfig('showcalendar')
API CHANGE Removed CompositeDateField, DMYDateField, use DateField with setConfig('dmyfields')
API CHANGE Removed DropdownTimeField, use TimeField with setConfig('showdropdown')
API CHANGE Removed PopupDateTimeField, use DatetimeField
API CHANGE Changed 'date', 'month' and 'year' HTML field names to lowercase in DMYDateField
API CHANGE Removed support for ambiguous date formats in DateField, e.g. '06/03/03'. Use DateField->setConfig('dateformat', '<format>') to revert to this behaviour.
API CHANGE Removed $futureOnly flag from DateField, CalendarDateField etc., use DateField->setConfig('min') and DateField->setConfig('max')
ENHANCEMENT Using Zend_Date for DateField and TimeField, with more robust date handling, starting localization support. Set globally via i18n::set_locale(), or for a field instance through setLocale(). Note: Javascript validation is not localized yet.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99360 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:38 +13:00
Ingo Schommer
b700e2ccff BUGFIX Added missing Requirements to TreeDropdownField->Field() and TreeMultiSelect->Field()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98852 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:31 +13:00
Mark Stephens
130290a8f2 BUGFIX: fallback for changes in r98101, required if TreeDropdownField is used in a widgetarea, and does not know its field
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98671 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:30 +13:00
Sean Harvey
055bb06429 MINOR Removed useless third argument to instantiation of itemClass in TableListField::generateExportFileData()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98544 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:29 +13:00
Sean Harvey
aa437701ae API CHANGE Made ComplexTableField not use Object::create() for item and popup classes to be consistent with TableListField. These can be overridden as itemClass and popupClass are public properties on ComplexTableField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98543 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:29 +13:00
Sam Minnee
7cc3efa898 BUGFIX: Removed obsolete start argument from ComplexTableField_Item constructor.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98536 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:28 +13:00
Sean Harvey
67e2157052 BUGFIX Fixed missing third argument to ComplexTableField_Item when the parent class instantiates it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98448 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:28 +13:00
Sean Harvey
8b1367794e ENHANCEMENT Allow overriding TableListField_Item on TableListField by setting the property itemClass
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98428 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:27 +13:00
Sam Minnee
392c5effb7 MINOR set Print flag correctly on TLF
MINOR custom print template for SSReport TLF's that exposes the report title, and filters set (from r97138)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98154 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:24 +13:00
Sam Minnee
e764dec48d MINOR: Fixed TableListField tests that don't set $_REQUEST['url'] (from r97127)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
59cf48db87 BUGFIX pagination was being applied (with a limit of NULL) to print and export actions. This was due to $_REQUEST['methodname'] not existing. (from r97114)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
5039273e75 BUGFIX TreeMultiselectField_Readonly now posts the correct value to the server (from r97100)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98150 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
ca4030df12 Validation for calendardatefields (from r96958)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98147 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
962dae2dc7 MINOR move sort column&direction into their own vars, otherwise, canSortBy(Date DESC) will always return false, since DESC is not part of the column name. (from r96411)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98137 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
298735506a BUGFIX still use the correct methods to get a value, even if we're generating a CSV ($xmlSafe = false) (from r96212)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98136 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
4492109749 MINOR fix field escaping in CSV export of TableListField (from r96157)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98135 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
ff1e605de9 BUGFIX: Don't default to sorted descending if you already have a different column sorted ascending. (from r96061)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98134 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
55423c1547 BUGFIX: Make TableListField sort checking use SQLQuery::canSortBy() to let SSReprot_FakeQuery work.
ENHANCEMENT: Allow sort descending as well as ascending. (from r96054)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98132 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
589d9216c9 BUGFIX: Fixed readonly transformation of TreeMultiselectField in cases where $this->value is explicitly set. (from r95962)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98103 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sam Minnee
19b745ad9e BUGFIX: Allow creation of TreeDropdownFields on forms with querystring URLs.
API CHANGE: Allow passing of an explicit map of dropdown items to a TreeDropdownField.
BUGFIX: Make use of the $this->value setting of TreeMultiselectFields. (from r95910)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98101 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sam Minnee
a03e43c8b2 API CHANGE: Refactored test for whether a SQLQuery can be sorted by a particular column into SQLQuery::canSortBy($fieldName) (from r95850)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98096 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sam Minnee
b23263b1cd BUGFIX: Let FieldMap access non-data fields too (from r95825)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98095 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sam Minnee
ce4067608c BUGFIX: Make TableListField rely on SQLQuery for its count-generation.
BUGFIX: Make SQLQuery return an appropriate count if a HAVING clause is used. (from r95814)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98094 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sam Minnee
738737e258 MINOR: Initialise variables to fix unit test (from r95754)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98092 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Sam Minnee
60687965ec MINOR: Don't try and access the ORM from ComplexTableField in situations where it shouldn't. (from r95544)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98089 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Sam Minnee
ef0b9be1da MINOR: Boundary condition check in TableListField for more helpful errors. (from r95543)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98088 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Mateusz Uzdowski
75b7021c25 BUGFIX: reintroducing the forceValue url param, so the TreeDropdownField value can be set via JS (previously if the item was deep within the tree structure it would not be selected)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98083 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Carlos Barberis
e1f025d1d1 Deleted javascript/CalendarDateField.js. The file is empty.
MINOR: Deleted reference to CalendarDateField.js
MINOR: Year validation (accept just 4 digit, like the error message says).


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97991 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:19 +13:00
Normann Lou
cce52a59d2 BUGFIX: FileIFrameField throws sub-URLs error when changing cms to a non default language (#4767)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97984 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Normann Lou
d0343cdda6 BUGFIX: remove serverside Validator::get_javascript_validator_handler() checking when trying to valid the field in serverside.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97833 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Normann Lou
4939a0a4dc ENHANCEMENT: use Validator::get_javascript_validator_handler() to check if the handler is turned on before doing either js or php validation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97792 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:16 +13:00
Normann Lou
4d6a0e61d0 BUGFIX: File don't have method URL(), instead, we use $image->URL, which will call $image->getURL()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97783 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:16 +13:00
Will Rossiter
b853c1ce47 ENHANCEMENT: Select the uploaded image after uploading by default. #4962
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97765 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:16 +13:00
Mateusz Uzdowski
b285c68d5c BUGFIX: changed the stylesheet path to proper one - #4968
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97764 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:16 +13:00
Mateusz Uzdowski
f31c9998d3 BUGFIX: add custom search function, so the search catches also the Titles (search uses DataObject::get, which bypasses the getMenuTitle function)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97755 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:16 +13:00
Mateusz Uzdowski
f38e20a7d1 BUGFIX: allow only 2 and 4 digit years.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97746 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Normann Lou
89ccd1cacf BUGFIX: fix front-end validation for DYMCalendarDateField, addressed in open ticket #4967(http://open.silverstripe.org/ticket/4967).
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97730 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Normann Lou
aa27047ed9 git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97726 467b73ca-7a2a-4603-9d3b-597d59a354a9 2011-02-02 14:18:15 +13:00
Andrew O'Neil
afa1b74f3e BUGFIX: Use correct paths for requirements
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97599 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:14 +13:00
Sean Harvey
a6f9a2539b MINOR If CurrencyField->setValue() passed a null or empty value, default to 0.00 so number_format() has no issues converting the number
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97566 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:13 +13:00
Will Rossiter
80c69abdb8 APICHANGE: removed SWFUpload. Refactored Content Editors uploader to use standard uploader.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97489 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:13 +13:00
Ingo Schommer
b6c797cbeb MINOR Fixed setForm() invocation in Form::__construct() (see #4558, thanks ajshort)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97483 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:13 +13:00
Ingo Schommer
0d79696883 BUGFIX Fixed NumericField->jsValidation(), now accepts negative numbers, making it more like the equivalent phpValidation(), which is using is_numeric() (see #4874, thanks Allisone)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97482 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:13 +13:00
Ingo Schommer
73409d4cac MINOR Use addExtraClass() in FormField::__construct() instead of direct assignment (see #4607, thanks Tjofras)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97481 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:13 +13:00