Commit Graph

2451 Commits

Author SHA1 Message Date
Damian Mooyman
f88d708ee9 BUG Fix GridFieldAddExistingAutocompleter and GridFieldExportButton
Based on https://github.com/silverstripe/silverstripe-framework/pull/5426
Fixes #5267
2016-05-03 17:45:46 +12:00
Damian Mooyman
70480f5ee4 [ss-2015-027] FIX HtmlEditorField_Toolbar#viewfile not whitelisting URLs
Fixes #4947
2016-05-03 15:29:18 +12:00
Damian Mooyman
d52db0ba34 Merge 3 into master
# Conflicts:
#	.travis.yml
#	admin/css/ie7.css
#	admin/css/ie7.css.map
#	admin/css/ie8.css.map
#	admin/css/screen.css
#	admin/css/screen.css.map
#	admin/javascript/LeftAndMain.js
#	admin/scss/_style.scss
#	admin/scss/_uitheme.scss
#	control/HTTPRequest.php
#	core/Object.php
#	css/AssetUploadField.css
#	css/AssetUploadField.css.map
#	css/ConfirmedPasswordField.css.map
#	css/Form.css.map
#	css/GridField.css.map
#	css/TreeDropdownField.css.map
#	css/UploadField.css
#	css/UploadField.css.map
#	css/debug.css.map
#	dev/Debug.php
#	docs/en/00_Getting_Started/00_Server_Requirements.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/How_Tos/Extend_CMS_Interface.md
#	filesystem/File.php
#	filesystem/Folder.php
#	filesystem/GD.php
#	filesystem/Upload.php
#	forms/ToggleField.php
#	forms/Validator.php
#	javascript/lang/en_GB.js
#	javascript/lang/fr.js
#	javascript/lang/src/en.js
#	javascript/lang/src/fr.js
#	model/Image.php
#	model/UnsavedRelationList.php
#	model/Versioned.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/DBField.php
#	model/fieldtypes/Enum.php
#	scss/AssetUploadField.scss
#	scss/UploadField.scss
#	templates/email/ChangePasswordEmail.ss
#	templates/forms/DropdownField.ss
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
#	tests/forms/EnumFieldTest.php
#	tests/security/MemberTest.php
#	tests/security/MemberTest.yml
#	tests/security/SecurityTest.php
2016-04-29 17:50:55 +12:00
Loz Calver
61a9b2a41a
FIX: GridFieldPaginator now prevents viewing pages with no results (fixes #3192) 2016-04-26 09:34:03 +01:00
Damian Mooyman
43f2680af8 BUG Fix missing return in ReadonlyField 2016-04-26 16:57:07 +12:00
Damian Mooyman
b2e8fd96ec BUG Fix form schema to use correct ID values
API Implement creation of new changesets endpoint
2016-04-26 15:32:08 +12:00
Daniel Hensby
679185514d
Merge 3.3 into 3
Conflicts:
	admin/css/screen.css.map
2016-04-26 00:24:59 +01:00
Daniel Hensby
745faebd81
Merge 3.2 into 3.3
Conflicts:
	.travis.yml
2016-04-26 00:17:09 +01:00
Damian Mooyman
8b239a5011 Docs and tests for exempt validation actions 2016-04-22 14:52:38 +12:00
Hamish Friedlander
241cdfed1b API Allow actions to declare they are exempt from validation themselves 2016-04-22 14:22:11 +12:00
Ingo Schommer
19de22f427 API Moved frontend assets into admin/client/
admin/javascript => admin/client
admin/javascript/src => admin/client/src/legacy (mostly)
admin/scss/_variables.scss => admin/client/styles/_variables.scss
admin/scss => admin/client/styles/legacy/
admin/css/editor.css => admin/client/dist/css/editor.css
admin/css/screen.css => admin/client/dist/css/bundle.css
admin/images => admin/client/dist/images
admin/images/sprites/src => admin/client/src/sprites
admin/images/sprites/dist => admin/client/dist/sprites
admin/font => admin/client/dist/font
2016-04-20 21:13:10 +12:00
assertchris
ec247cefd8 Changed comments in forms\ToggleField.php 2016-04-20 18:31:17 +12:00
Damian Mooyman
30894eb4cf Merge pull request #5357 from assertchris/cast-heading-level-to-int-in-forms-toggle-composite-field
Cast heading level to int, in forms\ToggleCompositeField.php
2016-04-20 18:01:43 +12:00
Damian Mooyman
61db5c8f76 Merge pull request #5356 from assertchris/forms-toggle-composite-field-comment-changes
Changed comments in forms\ToggleCompositeField.php
2016-04-20 18:01:31 +12:00
Damian Mooyman
b83293d2e4 Merge pull request #5354 from assertchris/forms-toggle-field-style-changes
Changed style in forms\ToggleField.php
2016-04-20 18:00:59 +12:00
assertchris
6fd11f584d
Cast heading level to int, in forms\ToggleCompositeField.php 2016-04-20 16:16:59 +12:00
assertchris
f6effb9347 Changed comments in forms\ToggleCompositeField.php 2016-04-20 16:02:40 +12:00
assertchris
8e7e783dd0
Changed style in forms\ToggleField.php 2016-04-20 15:00:38 +12:00
assertchris
29ee58abc3
Changed comments in forms\Validator.php 2016-04-20 14:27:50 +12:00
Marijn Kampf
ea3aa0063a Addition of extend for newRowClasses (#4711)
* Addition of extend for newRowClasses

Allows for creation of extension of row classes in gridfield.

* Update GridField.php

Including suggestions by @tractorcow and @dhensby.
2016-04-12 15:48:02 +01:00
Ingo Schommer
f0906f6e92 Merge pull request #5261 from tractorcow/pulls/4.0/fixup-tinymce
BUG fix missing language on non-global TinyMCE Configs
2016-04-06 19:32:55 +12:00
Damian Mooyman
77b47bac92 Merge pull request #5063 from benmanu/pulls/add-npm-json-js
Moving thirdparty module to npm dependency - json-js
2016-04-04 10:13:33 +12:00
Damian Mooyman
640691f544 BUG fix missing language on non-global configs
BUG Prevent external plugins from being passed to the minifier
API Change TinyMCEConfig::requireJS to getScriptURL() for testabilitiy
2016-04-04 09:59:31 +12:00
Sean Harvey
b1b85b539e TinyMCE 4 optimisations. Use TinyMCE_Compressor. 2016-04-04 07:58:45 +12:00
Ben Manu
5c7a6166b6 Moving thirdparty module to npm dependency - json-js. 2016-04-01 15:43:09 +13:00
Ingo Schommer
55f12939bb Defined $schemaDataType constant, added to FormField subclasses 2016-03-30 23:00:00 +13:00
Jake Bentvelzen
43c9f15647 Fixed bug where breadcrumb title wouldn't appear if title was blank 2016-03-30 16:46:18 +11:00
Damian Mooyman
f6dca68be1 Merge pull request #5234 from kinglozzer/gridfield-onbeforerender
NEW: Add onBeforeRender() hook to GridField
2016-03-30 17:53:04 +13:00
Ingo Schommer
7ba4b5b6ef Merge pull request #5241 from timkung/pulls/upload-validator-filesize-spelling
BUG changing all cases of filesize spelling to file size
2016-03-29 16:15:27 +13:00
Tim Kung
7907d20da7 BUG changing all cases of filesize spelling to file size 2016-03-29 13:38:24 +13:00
Ingo Schommer
3862a7a0a7 Moved FormFieldSchemaTrait into FormField
The RFC requires a FormField implementation to override $schemaDataType,
but its defined on the trait - which can't be redefined by a field subclass.

In the end, the trait was never designed to be reuseable on classes other than FormField.
We need to admit that architecturally, we'll have to add all that API weight to the base FormField
class because of the way forms are structured in SilverStripe (mainly due to a missing layer
of indirection in getCMSFields implementations).

Also implemented the $schemaDataType on fields where its known.

See https://github.com/silverstripe/silverstripe-framework/issues/4938
See http://php.net/manual/en/language.oop5.traits.php#language.oop5.traits.properties.example
2016-03-28 21:54:42 +13:00
Ingo Schommer
adbcddee80 Only iterate through dataFields() in FormSchema
Temporary measure until we implement nested fields
2016-03-28 21:54:27 +13:00
Ingo Schommer
8ae2894890 Fix form schema ID getter
Also moved keys of higher importance to start of array,
easier to review this way
2016-03-28 21:54:24 +13:00
David Craig
5d88950735 Adds schemaDataType to FormFieldSchema 2016-03-28 21:14:06 +13:00
Loz Calver
1e7281a2ba NEW: Add onBeforeRender() hook to GridField 2016-03-27 10:55:58 +01:00
Loz Calver
5ede516c77 FIX: GridField::FieldHolder() should not attempt to parse shortcodes (fixes #5129) 2016-03-27 10:51:46 +01:00
Loz Calver
d9798af30c Deprecate TextField::InternallyLabelledField() (closes #1684) 2016-03-26 11:07:33 +00:00
Sam Minnee
aeccb8b8e0 API: Move DBField subclasses into SilverStripe\Model\FieldType namespace
API: Deprecate SS_Datetime.

The DBField subclasses are have all been renamed to start with “DB” and
be in the SilverStripe\Model\FieldType namespace. To keep DataObject
definitions concise, the original short variations of their names are
preserved as service definitions. Most of the field generation code
doesn’t need to change, but where field classes are referenced directly,
changes will be needed.

SS_Datetime, which is commonly referenced outside the model system
itself, has been preserved as a subclass of DBDatetime. This has been
marked as deprecated and can be removed in SilverStripe 5.

A few places that referred to $db and $casting values weren’t using
the Injector to instantiate the relevant classes. This meant that the
remapping we have created as part of moving classes into a namespace
didn’t work.
2016-03-22 18:09:30 +13:00
Ingo Schommer
8ae794ee99 API TinyMCE Image shortcodes 2016-03-21 09:23:40 +13:00
Damian Mooyman
3dada00905 Cleanup trailing whitespace 2016-03-09 10:20:31 +13:00
Damian Mooyman
6d88caa9b3 Merge pull request #5132 from open-sausages/features/form-schema
API Form schema
2016-03-07 14:08:36 +13:00
Ingo Schommer
627fbf9051 Fixed merge regression 2016-03-07 10:17:15 +13:00
Ingo Schommer
3b11d73c46 Merge remote-tracking branch 'origin/3'
# Conflicts:
#	forms/gridfield/GridFieldDetailForm.php
#	javascript/GridField.js
2016-03-07 09:26:35 +13:00
Ingo Schommer
61a8529d76 More reuseable FormSchema logic, return on save 2016-03-03 13:36:51 +13:00
Ingo Schommer
e1fcc64c41 Form field schema state
See https://github.com/silverstripe/silverstripe-framework/issues/4938
2016-03-03 13:36:48 +13:00
Ingo Schommer
746322a9f1 Replace CMSForm use with new setValidationResponseCallback() API
Preparing for form schema API, see https://github.com/silverstripe/silverstripe-framework/issues/4938
2016-03-03 08:20:55 +13:00
David Craig
404ac4ae43 Initial schemaState implementation 2016-03-03 08:20:54 +13:00
David Craig
afccef718c Initial Form Field Schema implementation
- Adds FormSchema class
- Adds FormSchema dependency to LeftAndMain via Injector
- Adds schema allowed_action method to LeftAndMain for generating Form schemas
- Adds FormFieldSchemaTrait to for schema getters and setters on FormFields
2016-03-03 08:20:54 +13:00
Matthew Hailwood
5810ecf7b9 Populate foreign key before getting CMS fields
In it's current state you need to revert to something like `Session::get('CMSMain.currentPage')` to get the foreign key of what the item you are creating relates to (e.g. a Book => has_many Author) - if you create a new Author you may need to reference the owning Book in the `getCMSFields` function.

This is just a small quality of life buff that populates that foreign key before calling `getCMSFields()` rather than after.

This should not break backwards compatibility in any way and isn't exactly a new feature so could be considered a bug fix.
2016-02-28 20:56:10 +13:00
Damian Mooyman
3b0a9f4ba2 Merge remote-tracking branch 'origin/3'
# Conflicts:
#	admin/javascript/LeftAndMain.Menu.js
#	control/HTTPRequest.php
#	css/GridField.css
#	css/GridField.css.map
#	docs/en/02_Developer_Guides/03_Forms/Field_types/01_Common_Subclasses.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/01_File_Management.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	filesystem/Upload.php
#	javascript/HtmlEditorField.js
#	model/Image.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/Enum.php
#	model/versioning/Versioned.php
#	scss/GridField.scss
2016-02-25 14:51:59 +13:00