GridField doesn't have a valid readonly state if it's value is set to an Object
without `forTemplate()`. The default behaviour is to render a ReadonlyField,
but given GridField is a complex type this isn't suitable.
This bugfix provides a transformation method to render only components that are
whitelisted to provide a readonly state.
@see #3357 - https://github.com/silverstripe/silverstripe-framework/issues/3357
* Allow use of display names with SwiftMailer
The syntax to allow display names with SwiftMailer is as follow:
`->setFrom(['john@doe.com' => 'John Doe'])`
Just like you set the `Email.admin_email`, you can set the default sender display name through the `Email.admin_email_displayname` configuration setting.
Refs:
- https://swiftmailer.symfony.com/docs/introduction.html#basic-usage
- https://docs.silverstripe.org/en/4/developer_guides/email/#administrator-emails
* Update Email.php
Simpler code using `Email.admin_email` as an associative array
* Update index.md
Added documentation showing how to add an email display name.
If no body is defined, the email is rendered according to a template. Clearing requirements prevent unnecessary styles/scripts to be included in the html (and that needs to be processed/stripped down the line).
The ` $has_one` can be used both for `1-to-1` and `many-to-1` relations, depending on how is configured the inverse mapping on the related class. The documentation seems to suggest that `$has_one` implies a `1-to-1` relation, but then it gives an example of a `many-to-1` relationship. Since we are focusing on `$has_one` I would also put the `Player` class before the `Team` class.
Print view uses the SilverStripe templating to render values which means that
values are safely escaped by default. This can be tested by chaing `$CellString`
to `$CellString.RAW` in the GridField_print.ss template to see this escaping
being disabled.
This pull request removes double escaping of HTML in strings.
I felt the negation docs didn't cover checking if a value was *not* another value and didn't point out that `not` can't be combined with other operators.
[ci skip]
This fixes a bug where the installer redirects to home/ ('home' as the domain) as the url as opposed to localhost/home.
To reproduce:
* Use chrome (untested in other browsers)
* composer create project silverstripe/installer
* Run through the installer
Expected:
* Silverstripe installs and it takes you to the success page
Actual:
* SilverStripe installs and takes you to a different domain (ie. 'http://home')
The problem seems to be, any URL starting with `//` (two slashes) is normalised by the browser to an absolute URL by removing both slashes meaning `//home` becomes just `home` (as in http://home)