This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
Name: "admin-custom" | |
--- | |
SilverStripe\Admin\LeftAndMain: | |
extra_requirements_css: | |
- "app/client/element-preview.css" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use SilverStripe\Forms\FieldList; | |
use SilverStripe\ORM\DataExtension; | |
use SilverStripe\ORM\DataQuery; | |
use SilverStripe\ORM\Queries\SQLSelect; | |
use SilverStripe\Subsites\Model\Subsite; | |
use SilverStripe\Subsites\State\SubsiteState; | |
class SubsiteAwareRedirectExtension extends DataExtension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use SilverStripe\ORM\DataObject; | |
use SilverStripe\Forms\DropdownField; | |
use SilverStripe\ORM\Filters\ExactMatchFilter; | |
class Project extends DataObject | |
{ | |
private static $db = [ | |
'Title' => 'Varchar(200)', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use SilverStripe\Control\Controller; | |
use SilverStripe\ORM\DataObject; | |
use SilverStripe\ORM\ValidationException; | |
use SilverStripe\Forms\GridField\GridField; | |
use SilverStripe\Forms\GridField\GridField_FormAction; | |
use SilverStripe\Forms\GridField\GridField_ColumnProvider; | |
use SilverStripe\Forms\GridField\GridField_ActionProvider; | |
use SilverStripe\Forms\GridField\GridField_ActionMenuItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Psr\Log\LoggerInterface; | |
use SilverStripe\Control\Email\Email; | |
use SilverStripe\Control\Director; | |
use SilverStripe\Core\Environment; | |
use SilverStripe\Core\Injector\Injector; | |
class PostmarkMailTransport extends \Postmark\Transport | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use SilverStripe\Control\Director; | |
use SilverStripe\Control\HTTP; | |
use SilverStripe\Security\Member; | |
use SilverStripe\Core\Extension; | |
/** | |
* Implements Content-Security-Policy and other security headers on the | |
* controllers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This script will copy a pre-commit hook from this repo to a developers local git | |
// The pre-commit hook will be run whenever a developer runs "git commit" | |
// This script will run after running composer install, via the "post-install-cmd" in composer.json | |
// | |
$gitHookFilename = '.git/hooks/pre-commit'; | |
$shellHookFilename = 'pre-commit.sh'; | |
if (file_exists($gitHookFilename)) { | |
unlink($gitHookFilename); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/app/src/Search/CustomerSolrIndex.php | |
+++ b/app/src/Search/CustomerSolrIndex.php | |
@@ -9,10 +9,14 @@ use SilverStripe\Control\Director; | |
*/ | |
class CustomerSolrIndex extends GazetteSolrIndex | |
{ | |
+ private static $casting = [ | |
+ 'FieldDefinitions' => 'HTMLFragment', | |
+ 'CopyFieldDefinitions' => 'HTMLFragment' | |
+ ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Injector from 'lib/Injector'; | |
Injector.transform( | |
'require-alt-text', | |
(updater) => { | |
updater.form.addValidation( | |
'AssetAdmin.*', | |
(values, Validation) => { | |
if (typeof values.AltText === 'undefined') { | |
return; |
NewerOlder