From 54599b98d11fae2870bce951d87fd64826578bfe Mon Sep 17 00:00:00 2001 From: UndefinedOffset Date: Wed, 1 Apr 2015 11:54:13 -0300 Subject: [PATCH 1/2] BUGFIX: Fixed issue where Widget::CMSEditor() can't see the enabled checkbox --- code/model/Widget.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/model/Widget.php b/code/model/Widget.php index 7eaad5c..a1444f4 100644 --- a/code/model/Widget.php +++ b/code/model/Widget.php @@ -159,10 +159,18 @@ class Widget extends DataObject { * @return FieldList */ public function getCMSFields() { - $fields = parent::getCMSFields(); + $fields = $this->scaffoldFormFields(array( + // Don't allow has_many/many_many relationship editing before the record is first saved + 'includeRelations' => ($this->ID > 0), + 'tabbed' => false, + 'ajaxSafe' => true + )); + $fields->removeByName('ParentID'); $fields->removeByName('Sort'); + $this->extend('updateCMSFields', $tabbedFields); + return $fields; } From 25a1a35a0b1d84290481d6a537adb6370829aa40 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 30 Apr 2015 22:58:48 +1200 Subject: [PATCH 2/2] Limit 1.0 compat to 3.1.* --- .travis.yml | 5 +---- README.md | 2 +- composer.json | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f769c6..b51d45f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,14 +6,11 @@ php: env: - DB=MYSQL CORE_RELEASE=3.1 - - DB=PGSQL CORE_RELEASE=3.1 matrix: include: - php: 5.4 - env: DB=MYSQL CORE_RELEASE=3 - - php: 5.4 - env: DB=MYSQL CORE_RELEASE=master + env: DB=PGSQL CORE_RELEASE=3.1 before_script: - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support diff --git a/README.md b/README.md index bf4269a..ebdefec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Widgets Module -[![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-widgets.png?branch=master)](http://travis-ci.org/silverstripe/silverstripe-widgets) +[![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-widgets.png?branch=1.0)](http://travis-ci.org/silverstripe/silverstripe-widgets) ## Introduction diff --git a/composer.json b/composer.json index a3bded1..b827b52 100644 --- a/composer.json +++ b/composer.json @@ -10,8 +10,8 @@ } ], "require": { - "silverstripe/framework": ">=3.1", - "silverstripe/cms": ">=3.1" + "silverstripe/framework": "3.1.*", + "silverstripe/cms": "3.1.*" }, "require-dev": { "phpunit/PHPUnit": "~3.7@stable"