Ingo Schommer
8717deca82
HTMLEditorField undefined $dimensionsField ( fixes #7494 )
...
Also use fluent API for form field definition to keep field invocations
in one place and thereby reduce these kind of bugs.
2013-01-21 11:11:21 +01:00
Ingo Schommer
5d37d55f35
BUG Form session message clearing regression
...
Regression originally from 729bcc95
, but made visible by 014f541a8
2013-01-21 11:11:21 +01:00
Ingo Schommer
014f541a89
BUG Regression in Form->clearMessage() ( fixes #8186 )
...
See 729bcc9
2013-01-15 14:25:07 +01:00
Andrew Short
16efd7402e
ENHANCEMENT: Add grid field save handler.
2013-01-15 22:41:25 +11:00
Ingo Schommer
80feb8c0b4
Respect displayFields in GridFieldPrintButton
...
Provides more coherent and expected default behaviour
2013-01-15 00:55:24 +01:00
micschk
7f605cfb54
NEW Disable items in DropdownField and GroupedDropdownField
2013-01-11 16:32:20 +01:00
uniun
e020c7be57
BUG doSave() and doDelete() should use translated singular name
2013-01-11 15:50:09 +01:00
Ingo Schommer
42a73715cf
Merge pull request #1051 from uniun/patch-3
...
BUG removeRequiredField() should use array_splice() instead of unset()
2013-01-11 06:45:35 -08:00
Ingo Schommer
9b42dec932
Merge pull request #1072 from sunnysideup/patch-2
...
adding extension hook in GridFieldDetailForm.php
2013-01-11 06:37:27 -08:00
Ingo Schommer
7dda38742e
Merge pull request #1071 from sunnysideup/patch-1
...
Update forms/TextareaField.php: small edit to description of the field
2013-01-11 06:37:01 -08:00
Ingo Schommer
e7e6c45aee
Merge pull request #1082 from sminnee/form-improvements
...
Form improvements
2013-01-11 02:29:14 -08:00
Ingo Schommer
acc616b2ca
Merge pull request #1080 from sminnee/caching-improvements
...
Caching improvements
2013-01-11 02:00:51 -08:00
Ingo Schommer
f3c0669fec
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
_config/uploadfield.yml
css/UploadField.css
forms/UploadField.php
scss/UploadField.scss
templates/UploadField.ss
tests/forms/uploadfield/UploadFieldTest.php
2013-01-11 10:02:39 +01:00
Ingo Schommer
9e82d8e857
Fixed line lengths
2013-01-11 09:59:33 +01:00
Sam Minnee
5b450f7fea
NEW: Added replaceExistingFile setting for UploadField.
...
Sometimes has-one UploadFields can get confused about whether or not there is an existing file that needs deleting. This setting lets you make a more robust has-one UploadField, where any existing file will be replaced. It more closely mimics simple single-file upload fields.
2013-01-11 09:29:06 +01:00
Sam Minnee
cc7318fde4
NEW: Added canAttachExisting config option for UploadField.
...
This is the companion setting to canUpload, letting you control whether existing files from the asset store can be referenced. It's particularly useful when using UploadField on the front-end.
2013-01-11 09:29:02 +01:00
Sam Minnee
2fdd9a3b13
FIX: Allow images attached to UploadFields to be unlinked without File::canEdit() or File::canDelete() permission.
...
Although editing meta-data or deleting permanently would require File editing/deleting permissions, merely linking to a record does not. This change is important for allowing front-end use of UploadField; or, more importantly, use of UploadFile by people without CMS rights.
2013-01-11 09:07:42 +01:00
Ingo Schommer
67c5db3320
NEW Global default config for UploadField
2013-01-11 09:07:42 +01:00
Ingo Schommer
2dfd42795e
NEW Restrict upload abilities in UploadField
...
Conflicts:
css/UploadField.css
templates/UploadField.ss
2013-01-11 09:07:42 +01:00
Ingo Schommer
43601d6010
NEW Global default config for UploadField
2013-01-10 00:15:35 +01:00
Ingo Schommer
9310b8d86d
NEW Restrict upload abilities in UploadField
2013-01-10 00:15:34 +01:00
Ingo Schommer
abfb3c7095
Default TreeDropdownField to TreeTitle
...
Same behaviour as in 2.x. All common elements displayed
in this field (SiteTree, Group, File) have a TreeTitle accessor.
2013-01-08 18:39:31 +01:00
Ingo Schommer
61cc033304
Fluent interface for TreeDropdownField
2013-01-08 18:32:40 +01:00
Ingo Schommer
79997477b3
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
model/DataList.php
2013-01-08 17:16:09 +01:00
Hamish Friedlander
2916f2043c
NEW: Improve HTTP caching logic to automatically disable caching for requests that use the session.
...
This improvement makes it easier to set a side-wide default cache time without needing to worry about CSRF-protected forms, etc.
2013-01-08 17:47:05 +13:00
Sam Minnee
729bcc95db
BUGFIX: Don't clear form messages unless forTemplate() is actually called.
...
BUGFIX: Clear session-stored form data as well as form error message.
2013-01-08 17:45:17 +13:00
Sam Minnee
abbee41b78
NEW: Add ReadonlyField::setIncludeHiddenField()
...
The new config setter restores the 2.4 behaviour of including <input type="hidden"> with a field. Although as a default, this option has security flaws; it is useful in a few circumstances and, if nothing else, is handy to make upgrading sites easier.
2013-01-08 17:45:17 +13:00
Sean Harvey
2140a621fb
Merge pull request #1067 from halkyon/shorthand_ternary_op
...
Remove unncessary variable from TreeDropdownField
2013-01-06 17:20:54 -08:00
Sean Harvey
68eb367d27
Remove unncessary variable from TreeDropdownField
2013-01-07 14:14:54 +13:00
Ingo Schommer
06f05d0e7a
Merge pull request #1075 from g4b0/8088-GroupedDropdownField-xhtml-strict-2
...
BUG:removed null FormField value. fixes #8088
2013-01-02 09:02:47 -08:00
g4b0
63dbb1c6c9
BUG:removed null FormField value. fixes #8088
2013-01-02 15:47:06 +01:00
Ingo Schommer
9dafc83f29
Fixed DateField phpdocs
2013-01-02 13:45:15 +01:00
Nicolaas
a32451f72e
adding extension hook in GridFieldDetailForm.php
...
This hook is useful so that you can add additional fields / actions in a gridfield form that are not available in other settings (e.g. additional actions: previous / next / save and publish / unpublish / etc
2012-12-27 19:22:54 +13:00
Justin Martin
f431b35b88
BUG: Confirmed Password Field now copies attributes to child fields.
2012-12-27 09:25:15 +13:00
Nicolaas
3fca288873
Update forms/TextareaField.php
...
small edit to description of the field (usage). Removed reference to cols and rows parameters.
2012-12-26 22:29:36 +13:00
Simon Elvery
775567d427
Allow <button type='submit'> for the benifit of IE<=7
2012-12-21 16:19:43 +01:00
Ingo Schommer
8ec3641e60
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
admin/javascript/LeftAndMain.FieldHelp.js
lang/en.yml
model/URLSegmentFilter.php
2012-12-21 15:04:17 +01:00
Ingo Schommer
661a4a2492
Removed direct sprintf() usage from _t() calls
...
Parameterized strings are easier to understand,
and more fail-proof, don't fatal out when not enough sprintf() args
2012-12-21 11:46:38 +01:00
Ingo Schommer
7a6ce01567
BUG Skip pagination on UnsavedRelationList in GFPaginator
2012-12-20 20:16:53 +01:00
Nathan J. Brauer
d487a42456
API Default to Upload::$uploads_dir in UploadField
2012-12-20 10:25:52 +01:00
uniun
6aba24b3e9
BUG removeRequiredField() should use array_splice() instead of unset()
...
Function unset() preserves numeric keys and method removeRequiredField() will give a PHP notice about nonexistent array key and loop won't iterate throughout all elements in array on second method call (and all subsequent).
So it's better to use foreach loop and array_splice() function (it doesn't preserve numeric keys).
2012-12-18 11:57:11 +02:00
Ingo Schommer
bbc8e06d49
API Show GridFieldEditButton even without edit permissions (for readonly forms)
2012-12-17 00:47:23 +01:00
Ingo Schommer
1848d7e90a
API Check model permissions in GridField
2012-12-17 00:46:51 +01:00
Ingo Schommer
963f02e7a3
Using new description style in MemberDateTimeOptionSetField
2012-12-14 01:58:04 +01:00
Ingo Schommer
1ca3883a76
NEW Tooltip and inline help text support for CMS form fields
2012-12-14 01:58:04 +01:00
Ingo Schommer
559abecd56
API Copying instance props on FormField readonly/disabled transformations
...
Introduced new FormField->castedCopy() method
which tries to replicate the existing form field instance
as closely as possible.
Primarily, the fix was targeted at consistently passing
through FormField->description to all of its variations.
2012-12-14 01:58:04 +01:00
Ingo Schommer
6f9d01f621
API FormField->setDescription() visible in default template
...
Renders into <span class="description"> instead of "title" attribute
2012-12-14 01:58:04 +01:00
Ingo Schommer
212c427c45
Pass setDescription() through to sub-fields in DatetimeField and PhoneNumberField
2012-12-14 01:57:27 +01:00
Ingo Schommer
26141718ec
BUG Deep cloning for DateTimeField
2012-12-14 01:57:26 +01:00
Ingo Schommer
644cc79ebb
API Removed methods previously deprecated in 3.0
2012-12-14 01:16:47 +01:00
Justin Martin
0f60ca7255
BUG: Confirmed Password Field now copies attributes to child fields.
2012-12-12 14:44:25 +01:00
Simon Welsh
b0121b541c
Add codesniffer that ensures indentation is with tabs.
2012-12-12 17:33:31 +13:00
Simon Welsh
fc5dd2994c
Add codesniffer that ensures indentation is with tabs.
2012-12-12 00:12:11 +13:00
Ingo Schommer
548ad503ed
API Removed keyed arrays for title/value setting in SelectionGroup
...
Use SelectionGroup_Item class instead. Necessary because
of removal of array key support from ArrayList (see d12b49702
).
2012-12-11 11:06:06 +01:00
Ingo Schommer
8108f7f936
NEW Relation search for GridFieldAddExistingAutocompleter
...
Now also searches 1:n relations if they where defined in searchableFields() with dot notation.
2012-11-27 10:51:10 +01:00
Ingo Schommer
c8136f5d4c
NEW Many-many relation data editing in GridFieldDetailForm
...
Also adds GridFieldDetailForm->setFields() for customizing
the displayed form fields (required for adding relational fields).
2012-11-27 10:45:43 +01:00
Ingo Schommer
c55c7c33f8
Merge branch '3.0'
...
Conflicts:
admin/code/CMSProfileController.php
composer.json
tests/model/DataObjectTest.php
2012-11-22 23:51:28 +01:00
Ingo Schommer
434759cc83
BUGFIX Correct redirection URL on deletion in GridFieldDetailForm
2012-11-16 15:32:17 +13:00
Ingo Schommer
bd0e597ac6
Use button tag for delete button in GridFieldEditForm
2012-11-16 15:32:17 +13:00
Hamish Friedlander
5edf86fe7a
Merge branch '3.0.3' into 3.0
2012-11-16 14:57:50 +13:00
Hamish Friedlander
7315be4531
FIX default values from DataObject not showing in GridField details form
2012-11-16 12:36:00 +13:00
Hamish Friedlander
0dd97a38f6
API: Form#loadDataFrom 2nd arg now sets how existing field data is merged with new data
2012-11-16 12:36:00 +13:00
Sean Harvey
6a868e79e1
Removing deprecated prototype/behaviour libraries
2012-11-16 11:37:56 +13:00
Sean Harvey
4651e9bbc9
BUG Fixing ToggleField to work correctly with jQuery
2012-11-16 11:33:58 +13:00
Sean Harvey
77337ae58c
Removing deprecated TableListField and subclasses
...
These have been moved to a module called "legacytablefields"
located at https://github.com/silverstripe-labs/legacytablefields
2012-11-16 11:04:28 +13:00
Sean Harvey
aeef4d6e84
Removing deprecated JS from AjaxUniqueTextField
2012-11-16 11:01:14 +13:00
Sean Harvey
8b0bb8dd09
API Replace deprecated FormField::createTag() with static create_tag()
...
GridField uses createTag() which is marked for deprecation, rather
than have it used as the cornerstone of generating FormField templates,
use it as a helper in case fields generate HTML tags from PHP.
2012-11-15 14:43:21 +13:00
Sean Harvey
8c3ecabc31
Removed deprecated ToggleCompositeField::startClosed()
...
Use ToggleCompositeField->setStartClosed() instead
2012-11-15 14:43:21 +13:00
Sean Harvey
4c803a2049
Removed deprecated arguments of row, cols to TextareaField
...
Use setColumns() and setRows() instead
2012-11-15 14:43:21 +13:00
Sean Harvey
4d110809d9
Remove deprecated rows and columns argument support from HtmlEditorField
...
Use setColumns() and setRows() instead
2012-11-15 14:43:20 +13:00
Sean Harvey
b3b071a05a
Removing deprecated FormField functions
...
setTabIndex() -> setAttribute('tabindex')
getTabIndex() -> getAttribute('tabindex')
describe() -> setDescription()
2012-11-15 14:43:20 +13:00
Sean Harvey
0d659a5e5a
Removing deprecated FormField::Name(), use getName() instead
2012-11-15 14:43:20 +13:00
Sean Harvey
c99ed7dc2b
Extending deprecation of legacy table fields to 3.1
2012-11-15 14:43:20 +13:00
Sean Harvey
b43b023c1e
Remove deprecated security token methods on Form
...
Use SecurityToken class directly instead
2012-11-15 14:43:18 +13:00
Sean Harvey
63820130c2
Remove deprecated Form::FormEncType(), use getEncType() instead
2012-11-15 14:43:17 +13:00
Sean Harvey
4e355bdb19
Removing deprecated methods on Form
...
Use FieldList API through Form::Fields() and Form::Actions() instead
2012-11-15 14:43:17 +13:00
Sean Harvey
208086754d
Removing deprecated arguments to FileField for setting folder name
...
Use setRightTitle() and setFolderName() instead
2012-11-15 14:43:17 +13:00
Sean Harvey
a9d7c9e2a6
Removing deprecated variables from FileField
2012-11-15 14:43:17 +13:00
Sean Harvey
0a5d43f1b3
Removing deprecated CompositeField::FieldSet(), use FieldList() instead
2012-11-15 14:43:17 +13:00
Sean Harvey
6448cd79bc
Removing deprecated Validator javascript methods
...
Use custom Javascript validation instead
2012-11-15 14:43:17 +13:00
Sean Harvey
de2509c3e0
Removing deprecated SimpleImageField
...
Use UploadField with
a$myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'))
2012-11-15 14:43:15 +13:00
Sean Harvey
6ce33d5e59
Removing deprecated ImageFormAction
...
Use FormAction with setAttribute('src', 'myimage.png') and custom
JavaScript to achieve hover effect.
2012-11-15 14:43:15 +13:00
Sean Harvey
8156f0ff5a
Removing deprecated ImageField, use UploadField instead
2012-11-15 14:43:14 +13:00
Sean Harvey
594faf71b2
Removing deprecated FileIFrameField, use UploadField instead
2012-11-15 14:43:14 +13:00
Sean Harvey
0673f278d8
Remove deprecated FieldSet, use FieldList instead
2012-11-15 14:43:11 +13:00
Tim Klein
f0f5dcb966
fixed mediaform urls in modeladmin
...
see http://open.silverstripe.org/ticket/8013
2012-11-09 16:44:48 +13:00
Andrew O'Neil
0c8de0a1de
APICHANGE: Use late static binding for Object::has_extension()
2012-11-07 11:07:55 +13:00
Ingo Schommer
2d075671c3
ENHANCEMENT Tab style consolidation and design consistency
2012-11-06 22:28:19 +01:00
Sean Harvey
169366a011
Merge branch '3.0'
2012-11-06 13:04:21 +13:00
Sean Harvey
532699c2ac
Merge pull request #877 from UndefinedOffset/3.0
...
FIX 7906 Regression: GridFieldConfig_RelationEditor: Removing relation d...
2012-11-05 11:53:25 -08:00
Sean Harvey
fbc6e3366b
Merge branch '3.0'
2012-11-05 15:11:48 +13:00
Ingo Schommer
bcbf4636fc
BUG Remove .ss-tabset class from CMS tabs to prevent rogue ajax load ( #7980 )
...
The existence of .ss-tabset triggers JS which applies $.tabs(),
and in turn interprets the first available link as the tab navigation.
jQuery UI subsequently tries to ajax-load this link, which is not
desired. Instead, $.tabs() should *only* be applied to a container
DOM element with .cms-tabset applied.
2012-11-01 00:25:13 +01:00
Ingo Schommer
2d04de0377
BUG FormField->removeExtraClass() works on indexed arrays
...
Was assuming an associative map, which isn't the case
in the current implementations.
2012-10-31 15:44:57 +01:00
Ingo Schommer
efabde1416
Merge remote-tracking branch 'origin/3.0'
...
Conflicts:
admin/css/screen.css
admin/scss/_style.scss
security/Member.php
2012-10-30 17:52:49 +01:00
Marcus Nyeholt
9c1b4693f7
BUG Fixed DateField date format error for IE8
...
On IE8, camel case element attributes are NOT included in the object returned
by $(elem).data(), meaning attrs defined in DateField.php (jqueryDateformat and
isoDateformat) are NOT seen by the code in DateField.js (ie the "config" var
doesn't have these set). Causing IE8 to fall back to using US date (mm/dd/yyyy)
formats. This can subsequently cause validation issues if the user's date
format is different.
DateField.js already explicitly checks for jquerydateformat (all lowercase)
so DateField.php has been modified to reflect the correct case for this
attribute name
2012-10-24 13:49:10 +11:00
UndefinedOffset
908869290e
FIX 7906 Regression: GridFieldConfig_RelationEditor: Removing relation deletes data object
2012-10-15 13:41:11 -03:00
Sean Harvey
f6a90467e4
Merge branch '3.0'
2012-10-15 10:10:01 +13:00
jean
574c53d5ba
FIX 7927 Redirect to the parent controller after deleting an item in a gridfield (edit form)
2012-10-12 18:09:17 +02:00
martimiz
5186bada17
FIX DateField Calendar - make dates with day- and monthnames validate
...
In locales other than en_US, as a result of missing jQuery locale
files, the DatePicker defaulted to English whenever day and monthnames
were used, breaking validation. Needed to change official locale files
before adding, because Zend_Date and jQuery day/monthnames not matching
again breaks validation.
Removed hard setting the names to uppercase, breaking validation for
other locales
Changed order in convert_iso_to_jquery_format(), to prevent EEE(E)
settings from being overwritten
Added a check for existing locale files, and made DatePicker fallback
to ISO yyy-MM-dd if a missing locale file would otherwise break
validation.
Added documentation for the DateField
2012-10-12 10:16:35 +02:00
Sean Harvey
bc64de0264
Fixing misleading SimpleImageField deprecation message
2012-10-11 16:58:57 +13:00