Commit Graph

101 Commits

Author SHA1 Message Date
Ingo Schommer
8f2d9200ae Multi-use redemption page created (from r104442)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112346 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:04:47 +00:00
Sam Minnee
a2f6487fa3 BUGFIX DateField with setConfig('dmyfields') now validates TRUE for empty values (fixes #5458) (from r103450)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112140 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:52:36 +00:00
Sam Minnee
34207e069a BUGFIX #4188 simon_w: Let require tags in templates be conditional (from r101867)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112044 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:15:47 +00:00
Sam Minnee
e09cc66e94 BUGFIX: Fixed issues with broekn link tracking (from r101138)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111960 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-12 21:42:25 +00:00
Sam Minnee
29623a639d MINOR: Correction on email address validator, and a unit test for EmailField php validation (from r100950)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111548 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:26:12 +00:00
Andreas Piening
983fb1fc09 BUGFIX #5157 strftime() %F format parameter does not work on Windows - use %Y-%m-%d instead (from r100795)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@108762 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-08-02 01:00:44 +00:00
Ingo Schommer
c81a788ba7 ENHANCEMENT Added 'updateImageForm', 'updateFlashForm', 'updateLinkForm' hooks to HtmlEditorField (the imageform hook was necessary to make the 'pixlr' module work) (see #3938) (from r100753)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105642 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:56:02 +00:00
Ingo Schommer
656eccc7a4 MINOR Removed Requirements:: static call and replace with instance (from r100533)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105598 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:16:33 +00:00
Ingo Schommer
9a438d26b0 ENHANCEMENT #3387 Requirements now has a new static function called Requirements::set_combined_files_folder() for setting where the combined files should belong (from r100528)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105596 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:15:43 +00:00
Ingo Schommer
a030d33f33 MINOR Removed whitespace (from r100517)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105592 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:14:18 +00:00
Ingo Schommer
7d8ac7662b MINOR Removed end php tag for Requirements and RequirementsTest (from r100514)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105591 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:14:00 +00:00
Ingo Schommer
9c03cc7fe1 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 (from r100513)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:13:45 +00:00
Ingo Schommer
6227478f82 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  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  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. (from r99360)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102859 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 04:38:40 +00:00
Ingo Schommer
f34bdada7b MINOR Use 'b' mode for fopen() where possible for better portability (from r98321)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102641 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 03:19:41 +00:00
Ingo Schommer
1e78fbc34c MINOR: Fixed TableListField test to suit changed behaviour. (from r96639) (from r98141)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102613 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 02:17:51 +00:00
Ingo Schommer
e921b376bc 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) (from r96734)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102356 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:03:16 +00:00
Ingo Schommer
93895a4f0f ENHANCEMENT Added OptionsetField->setDisabledItems() to allow specifically disabling certain checkboxes
ENHANCEMENT Added CheckboxSetField->setDefaultItems() to tick specified checkboxes regardless of the value passed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@99596 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-02-22 06:11:58 +00:00
Tom Rix
6f9177ef43 MINOR fixed validation on CurrencyField. Will no longer parse non-numeric characters out of input. Added test coverage.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@97057 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-01-18 00:56:29 +00:00
Ingo Schommer
ba344f2531 ENHANCEMENT Added SapphireTest->usesDatabase flag to explicitly request building of a test database for a test suite. This is necessitated by r93717, which removed the automatic building of these databases on every run.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93975 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-30 01:48:26 +00:00
Ingo Schommer
ffe57db895 MINOR Removed UniqueTextfieldTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92565 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:33:37 +00:00
Ingo Schommer
4b1293771d MINOR Using jquery.concrete and jquery.selector on github through piston dependency management
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92542 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:31:55 +00: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
Sean Harvey
df31edf8b6 MINOR Added unit test for DropdownField::performReadonlyTransformation()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84978 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-21 04:16:21 +00:00
Ingo Schommer
946025adb9 API CHANGE Removed TableField->FieldSet() and TableField->SubmittedFieldSet(), please use Items() and TableField_Item->Fields() instead (merged branches/2.3-nzct)
BUGFIX Fixed re-loading of unsaved TableField form data (e.g. after a validation error). The (now removed) method SubmittedFieldSet() was setting incremental temporary identifiers ("new1", "new2", etc), which wasn't picked up by Items() (merged from branches/2.3-nzct)
BUGFIX Using $this->value instead of $_POST to process submitted data in TableField (merged from branches/2.3-nzct)
BUGFIX TableField validation logic iterates over TableField_Item instances to get all formfields, rather than creating their own set in SubmittedFieldSet()
MINOR Removed repitition of temporary Form generation in TableField by generateTableFieldItem() method (merged from branches/2.3-nzct)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82089 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-17 02:09:27 +00:00
Ingo Schommer
8a20d5c1ad ENHANCEMENT Added TableField?->autoRelationSetting to allow for automatic saving into relationships (similiar to ComplexTableField? implementation) (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82060 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 23:49:32 +00:00
Ingo Schommer
f512347e33 BUGFIX Making sure RequirementsTest? has combine_files activated (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82055 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 23:45:23 +00:00
Ingo Schommer
f3959b038d API CHANGE Deprecated use of SapphireTest->fixture to access YML fixtures, please use gateway methods on SapphireTest instead (e.g. $this->objFromFixture() instead of $this->fixture->objFromFixture())
ENHANCEMENT Allowing multiple fixtures to be defined in SapphireTest::$fixture_file through array notation. 
BUGFIX Disabling DataObject validation in YamlFixture->saveIntoDatabase() instead of SapphireTest->setUp()
MINOR Adapted sapphire unit tests to deprecated $this->fixture usage

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81286 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 00:06:16 +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
Rainer Spittel
ca4ec1af03 ENHANCEMENT: enabled saveInto to use the setter method when available instead of passing through the form field values directly to the money class.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80521 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-30 03:16:28 +00:00
Sam Minnee
6bcabcbe46 BUGFIX #4306 simon_w: Fixed ConfirmedPasswordField::setValue()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80192 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 04:00:10 +00:00
Sean Harvey
6c754d29e9 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79438 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 11:36:49 +00:00
Ingo Schommer
204620b99d BUGFIX Conditionally setting and getting NULL values in TimeField->setValue()/dataValue(). Previously overriding a TimeField with an empty value wasn't possible.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79357 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 07:03:17 +00:00
Ingo Schommer
efb6f0ceaf API CHANGE TimeField doesn't internally store value as "Y-m-d g:ia" (including date), but only as "g:ia"
BUGFIX Allowing TimeField and subclasses to be set to NULL through setValue()
BUGFIX Added TimeField->dataValue() to apply same conversion as setValue()
MINOR Added TimeFieldTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79355 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 06:39:57 +00:00
Sam Minnee
4df21d29e0 BUGFIX: Fixed date field manipulation.
MINOR: Added sorts to TableListFieldTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79327 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 04:03:47 +00:00
Sean Harvey
60c5570bf8 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77817 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 02:19:50 +00:00
Ingo Schommer
b478c8be34 FEATURE Added MoneyField as a form field to edit Money values
ENHANCEMENT Using MoneyField in Money->scaffoldFormField()
BUGFIX Fixed Money->setValue() to respect $value parameter over $record to avoid wrongly updated values from stale $record values instead of new $value

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77772 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 22:21:02 +00:00