Commit Graph

115 Commits

Author SHA1 Message Date
Sean Harvey
cc12a7baf0 BUGFIX #6299 TableListField::Link() includes $action value twice (thanks ajshort!)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@115379 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:06 +13:00
Jean-Fabien Barrios
1050c7ee4e ENHANCEMENT Validation for uploaded files
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113420 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:59 +13:00
Ingo Schommer
294f99d767 ENHANCEMENT Added Form->enableSecurityToken() as a counterpart to the existing disableSecurityToken()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113284 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:59 +13:00
Ingo Schommer
e4d3584805 ENHANCEMENT Added SecurityToken to wrap CSRF protection via "SecurityID" request parameter
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:58 +13:00
Ingo Schommer
ac21b75449 BUGFIX Fixed month conversion in DateField_View_JQuery::convert_iso_to_jquery_format() (fixes #6124, thanks mbren and natmchugh)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113247 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:58 +13:00
Ingo Schommer
dfb9c71342 MINOR Fixed regression from r111843 (i18nText, MemberDatetimeFieldTest, MemberTest)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111844 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Ingo Schommer
31e9726ace BUGFIX Enforcing canEdit() checks in ComplexTableField_Popup - making form readonly if the current user can't edit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110857 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Ingo Schommer
d07888b9ab BUGFIX CurrencyField doesn't accept negative value (#5769, thanks simon_w)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108422 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:42 +13:00
Sean Harvey
2cf33bc2d7 BUGFIX #5833 Duplicate IDs when two similar date formats in Member_DatetimeOptionsetField containing different delimiters (e.g / and .) replaced to an empty string
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108001 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:39 +13:00
Ingo Schommer
e8cc316c1a BUGFIX Fixed DateField->validate() with keyed, but empty array values
MINOR Fixed DateField/TimeField validation message translation (wrong sprintf() nesting)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107789 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:38 +13:00
Ingo Schommer
5c41df21d4 ENHANCEMENT Using jQuery UI datepicker in DateField and DatetimeField instead of outdated DHTML calendar.js (fixes #5397)
ENHANCEMENT Abstracted optional DateField->setConfig('showcalendar') logic to DateField_View_JQuery

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107438 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Sean Harvey
3be26a4cec ENHANCEMENT #5352 Decouple date display from i18n locales, users now have access to change their date and time formats in Member::getCMSFields() using Member_DatetimeOptionsetField field
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107326 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:35 +13:00
Will Rossiter
12aedc0e30 ENHANCEMENT: in referencing a file in combine_files() it should fall back to standard requirement tags if combining has been disabled eg dev mode
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107091 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Will Rossiter
31a7bbc6a3 BUGFIX: updated select options classes to work with the dataobjectset returned by selectoptions rather than the array previously
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105872 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Ingo Schommer
64b165c6ce MINOR More solid markup testing in TableListFieldTest through xpath
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105305 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:28 +13:00
Ingo Schommer
274bea2041 MINOR Fixed TableListFieldTest->testSelectOptionsRendering()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105297 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:28 +13:00
Saophalkun Ponlu
deb208f15d ENHANCEMENT: Preserve sort options in pagination links in TableListField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105275 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Ingo Schommer
ba2aabd702 ENHANCEMENT Allowing batch checkbox selection of TableListField rows with TableListField->Markable and TableListField->addSelectOptions()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105266 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Geoff Munn
f405d71645 Multi-use redemption page created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104442 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:21 +13:00
Ingo Schommer
577857b98c BUGFIX DateField with setConfig('dmyfields') now validates TRUE for empty values (fixes #5458)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103450 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:15 +13:00
Sam Minnee
6892f1d196 BUGFIX #4188 simon_w: Let require tags in templates be conditional
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101867 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:09 +13:00
Sam Minnee
f3a666b89f BUGFIX: Fixed issues with broekn link tracking
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101138 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:02 +13:00
Mark Stephens
140f463b96 MINOR: Correction on email address validator, and a unit test for EmailField php validation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100950 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:57 +13:00
Sean Harvey
54720e62e6 BUGFIX #5157 strftime() %F format parameter does not work on Windows - use %Y-%m-%d instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100795 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:53 +13:00
Ingo Schommer
9e7611e891 ENHANCEMENT Added 'updateImageForm', 'updateFlashForm', 'updateLinkForm' hooks to HtmlEditorField (the imageform hook was necessary to make the 'pixlr' module work) (see #3938)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100753 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:52 +13:00
Sean Harvey
84a7755e4e MINOR Removed Requirements:: static call and replace with instance
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100533 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:48 +13:00
Sean Harvey
975e3b5a82 ENHANCEMENT #3387 Requirements now has a new static function called Requirements::set_combined_files_folder() for setting where the combined files should belong
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100528 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:48 +13:00
Sean Harvey
d730def583 MINOR Removed whitespace
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:48 +13:00
Sean Harvey
ddf0f35d27 MINOR Removed end php tag for Requirements and RequirementsTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100514 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:47 +13:00
Sean Harvey
450c3cb408 API CHANGE Refactored Requirements to use Requirements_Backend at all times - this makes testing far easier. Thanks tobych!
MINOR Updated RequirementsTest to test Requirements_Backend instead of global statics


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100513 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:47 +13:00
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
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
Sean Harvey
a93d12cf31 MINOR Use 'b' mode for fopen() where possible for better portability
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98321 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Sam Minnee
cbb882be5c MINOR: Fixed TableListField test to suit changed behaviour. (from r96639)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98141 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
63096cfefb API CHANGE: Don't generate TestOnly DataObjects in the database immediately; instead let test developers specify them in SapphireTest::$extraDataObjects.
API CHANGE: Added SapphireTest::resetDBSchema() (from r90054)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96734 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:04 +13:00
Andrew O'Neil
8679fd9883 FEATURE: Allow Text/Varchar fields to be configured to differentiate between NULL and empty string. (#4178, petebd)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90036 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-23 01:29:55 +00:00
Sam Minnee
448d975b9a MINOR fixed failing unit test (from r86169)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89166 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 21:58:15 +00:00
Andrew Short
ce2e4e7333 MINOR: Added tests for HtmlEditorField's broken link tracking and highlighting.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88990 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 00:02:05 +00:00
Andrew Short
360dd5ebd9 MINOR: Added a test case for saving links without a href attribute in HtmlEditorField.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88800 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-13 02:44:10 +00:00
Sam Minnee
557ec1e3b3 MINOR: Fixed ComplexTableField test to not generate 404s when redirecting to homepage.
From: Sam Minnee <sam@silverstripe.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88511 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:28 +00:00
Andrew Short
9b4d9993a4 FEATURE: Added SS_HTMLValue to provide a simple wrapper around DOMDocument to allow the manipulation of HTML snippets.
FEATURE: Re-instated broken link highlighting by manually checking all shortcodes in HtmlEditorField->Field(), and adding a class to broken ones.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88510 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:27 +00:00
Andrew Short
f29eceecff API CHANGE #3724: Unified the Link() method to accept an action parameter.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:16 +00:00
Andrew Short
1859ba502b FEATURE: Updated HtmlEditorField to use DOMDocument to more reliably parse image tracking and shortcode link tracking data.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88492 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:13 +00:00
Will Rossiter
af9e4f59f5 MINOR: Reverted previous commit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88112 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 03:37:05 +00:00
Will Rossiter
620aa651aa FEATURE: added extend() call to enable FieldHolder() html to be customized via extensions.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88104 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 02:17:19 +00:00
Ingo Schommer
afcf846b90 BUGFIX Fixed ID associations in TableListFieldTest (was assuming numerically ascending IDs, which isnt necessarily true in Postgres)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87913 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:51:58 +00:00
Geoff Munn
d9b1b66c2b BUG FIX: tests which aren't supported by Postgres temporarily disabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87897 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:04:46 +00:00
Geoff Munn
a56db7cff1 MINOR: tests that don't work with Postgres disabled until a fix for ID requirements can be found
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87765 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-30 21:24:53 +00:00
Geoff Munn
e1763ab4f2 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86504 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:03:22 +00:00
Geoff Munn
b1ab0a5bc0 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:02:53 +00:00