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
Does not actually change behaviour, but ensures that the hyphen
is not interpreted as a range identifier should it be placed
between two characters which PCRE regards as "rangeable".
The accordion widget was previously being passed true and false, where as it either expects true or the integer of the panel to show.
This fix sets it as either false or 0.
This causes a 'Fatal error: Call to a member function hasMethod() on a non-object'.
This can happen when displaying a field in a gridfield on a belongs_to relationship.
In certain cases, the button may not yet be initialized or may no longer have button properties at the time of removal from the DOM. Without this check, an uncaught exception is thrown.
The onclick event for LeftAndMain menu links didn't check if the click
was left or right, meaning that right click events could trigger the
function for loading split view mode in some browser/os combinations.
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).
+ has a special meaning in the URLs so overall it's a good idea to
strip them out. Otherwise they would need to appear in their ugly url
encoded form "%2B".
Refer: http://open.silverstripe.org/ticket/7929
Also removing the 'changed' class from the form once
no further fields are marked as changed. That's important
now that we're surfacing the state much more visibly
through the alternative "save" button styles in the CMS.
Title in CMS is set using header X-Title. But UTF-8 characters can't be used in HTTP headers. So the title should be encoded just before sending X-Title header and decoded before setting HTML document title (fixes#7942).
Specifically, the change removed the "add page" panel padding,
because it moved padding from .cms-panel-padded into
commonly contained elements, like .ui-tabs-panel.
Apart from breaking layouts, it makes the class meaningless,
since its only padded depending on which elements it contains.
In order to rectify some introduced inconsistencies,
much too complex were required, e.g.
.ui-tabs .cms-edit-form, .ui-tabs .cms-content-fields {...}.