Commit Graph

2540 Commits

Author SHA1 Message Date
Ingo Schommer
adfc2131dd API CHANGE Enforcing usage of a Validator instance in Forms if its not explicitly passed to the Form constructor. By default a new RequiredField instance is used without any fields marked as required. This was necessary because some FormField implementations rely on their validate() method, sometimes as a wrongly placed processing hook, but mostly for security reasons. One example are file extension checks in FileField subclasses.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69688 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:54 +13:00
Will Rossiter
ad60ef40f8 FEATURE: added Smiliey support to BBCode / forum. Now BBCode supports :) :P :D :( 8-) and :^). Yays for icons. Should move from BBCodeParser to TextParser so its available in tinymce but this will do for the forum
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69687 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Sean Harvey
e5bafe0467 MINOR Updated correct HTTPRequest class for @deprecated notice on HTTP::sendFileToBrowser()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69686 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Ingo Schommer
7a6cca4d35 MINOR Added french translation (see #3290)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69592 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Will Rossiter
7b00e015fa MINOR: merge patch from ajshort: allow db build without running requireDefaultRecords
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69562 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Sean Harvey
355637b805 MINOR Don't trigger user_error() when country code not found in countries array
MINOR Code syntax tidy up

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69419 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Sean Harvey
5bde2dbe93 BUGFIX CountryDropdownField now allows for title to be optional, which uses the name of the field if not set. This makes it consistent with DropdownField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69378 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Sean Harvey
1213a073a0 BUGFIX Added check before foreach() to fix potential HMCTF bugs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69377 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Sean Harvey
ae2cb53fb1 ENHANCEMENT Add a <span class="highlight"> around all keywords (space delimited) and not just the entire search phrase
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Sean Harvey
42520dff8f MINOR Removed @todo from Text->ContextSummary as it's already done
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69369 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Sean Harvey
2ac842538d MINOR Added phpDoc to Text->ContextSummary() $string argument
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69368 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:53 +13:00
Sam Minnee
1a9180abaa ENHANCEMENT: Update ForeignKey and Primary key default fields to use SQLMap for their dropdown source for better performance.
API CHANGE: Add keyField and titleField arguments to SQLMap
BUGFIX: Get DrodpownField::$emptyString working when used with a SQLMap source

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69360 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sam Minnee
c0fc790e32 Simplified implementation of FieldSet::makeReadonlyField()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69350 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sam Minnee
d64297e9ee Simplified implementation of FieldSet::makeReadonlyField()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69349 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sean Harvey
ac83f9d4d9 MINOR Added todo and phpDoc to Text->ContextSummary()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69348 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Ingo Schommer
8bacc8b8ff ENHANCEMENT Added styling for "form .message.notice" in sapphire/css/Form.css
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69323 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Andrew O'Neil
636d2a6225 MINOR: Disable caching in RestfulService test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69249 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Andrew O'Neil
b90efd8791 MINOR: Removed debug message
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69248 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sean Harvey
c5ab033cdd ENHANCEMENT Added renameField() to FieldSet
MINOR Added test for FieldSet->renameField() to test method behaviour

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69244 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sean Harvey
e24c5801d3 MINOR Added tests for Text->LimitWordCountXML()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69226 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sean Harvey
316124989d MINOR Added phpDoc to Convert::raw2xml() and Convert::raw2js()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69225 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sean Harvey
05dd641817 ENHANCEMENT Allow choosing ellipsis for truncated text on Text->LimitWordCountXML()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69224 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sean Harvey
5f0bbbc0da BUGFIX Strip potential whitespace from the beginning and end of string before limiting word count in Text->LimitWordCount(), fixing potential interference with truncation process
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69222 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sean Harvey
6a04824ef9 MINOR Removed comment that isn't appropriate
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69221 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:52 +13:00
Sean Harvey
358fbd418e BUGFIX Fixed Text->LimitWordCount() not returning the correct number of words in the truncated text.
MINOR Added TextTest for testing Text class methods

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69220 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Sean Harvey
576f7e15c6 MINOR Updated phpDoc cautionary message on Text->LimitCharacters()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69219 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Sean Harvey
9ded3dfd1f MINOR Added documentation to various Text class methods for limiting field values
ENHANCEMENT Added ability to define the ellipsis for LimitWordCount() setting "..." as the default

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69218 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Ingo Schommer
5115c38355 ENHANCEMENT Changed order of array merging in DataObject->db() - contains fields from subclasses at end of the array instead of the beginning. Important because db() is used by FormScaffolder, which shoved custom fields on the front of auto-generated forms. Shouldn't have any effect on the actual content of returned array
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69207 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Ingo Schommer
22a9f3ab91 MINOR logical bug in FormScaffolder
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69206 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Ingo Schommer
eebab1df71 BUGFIX Making Password formfield in Member->getCMSFields() translatable
ENHANCEMENT Hiding Member->BlacklistedEmail field in getCMSFields() by default - only relevant in newsletter/bounce context at the moment

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69204 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Ingo Schommer
c5bb7b76a2 BUGFIX Making "Main" tab in FormScaffolder translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69203 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Sam Minnee
bf3c850e94 BUGFIX: Fixed notice-level error in no-get-var URL processing when there is no querystring.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Hayden Smith
9f56a774de Fixed URL in the list of tasks.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69052 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Will Rossiter
9b85835604 MINOR: reorganized layout of bbcode list elements to move longer ones to bottom row for BBCode popouts
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68973 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Sam Minnee
5a5bdef2ba BUGFIX: Fixed bug in SQLQuery::unlimitedRowCount() when used with grouped queries, that should fix a lot of pagination situations.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68940 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Sean Harvey
f0e661a253 BUGFIX "console not defined" error in IE in en_US.js, check typeof(console) is not undefined before calling console.error()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68890 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Will Rossiter
1d584cee73 BUGFIX: remove Debug::message
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68881 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Sam Minnee
10ee07db0d Improved rendering of [php] tags in BBCode view
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68873 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:51 +13:00
Ingo Schommer
4b2b3e3c5b ENHANCEMENT Added RestfulServerTest->testGETRelationshipsXML()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68860 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
b69711f05c BUGFIX Added closing tags to relation XML in XMLDataFormatter. Was relying on ContentNegotiator fixing self-closing tags automatically, but this form of content parsing is disabled for xml content by default now (see r68484)
MINOR renamed $json to $xml in XMLDataFormatter

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68858 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Andrew O'Neil
064a9019b0 BUGFIX: Make sure date is a string before trying to use strtotime
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68834 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
1cdb9bb61d BUGFIX Fixed sprintf detection bug in SiteTree->getClassDropdown()
ENHANCEMENT Appending classnames to translated pagetype titles in SiteTree->getClassDropdown() when the cms is loaded in a non-english version - see inline comment

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68817 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Andrew O'Neil
915decb1f6 BUGFIX: Check hasChanged method exists before calling it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68809 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
aa09425948 MINOR translation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68763 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
5a31a74b6f BUGFIX Fixed label spacing in Date->TimeDiff()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68762 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
76f4af842e ENHANCEMENT Making Date->Ago() translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68761 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
345ec4e885 MINOR Making Folder->getCMSFields() translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68760 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
522c34b6da MINOR Making CTF save button translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68758 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
94389690a7 MINOR translation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68753 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:50 +13:00
Ingo Schommer
5282119620 BUGFIX Fixed TranslatableTest to instanciate Page instead of SiteTree fixtures - pages in the database should never have ClassName=SiteTree. This was causing failing tests due to the changes in SiteTree->getClassDropdown()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68752 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:26:49 +13:00