Skip to content

Commit

Permalink
NEW Disable inline editing for form blocks in elemental 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Oct 17, 2018
1 parent 61bd613 commit 27b2e55
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Expand Up @@ -4,18 +4,18 @@ dist: trusty

env:
global:
- COMPOSER_ROOT_VERSION=1.x-dev
- COMPOSER_ROOT_VERSION=2.x-dev

matrix:
include:
- php: 5.6
env: DB=MYSQL RECIPE_VERSION="4.2.x-dev" PHPCS_TEST=1 PHPUNIT_TEST=1
env: DB=MYSQL RECIPE_VERSION="4.3.x-dev" PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.0
env: DB=MYSQL RECIPE_VERSION="4.2.x-dev" PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION="4.3.x-dev" PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION="4.4.x-dev" PHPUNIT_TEST=1
- php: 7.2
env: DB=PGSQL RECIPE_VERSION="4.3.x-dev"PHPUNIT_COVERAGE_TEST=1
env: DB=PGSQL RECIPE_VERSION="4.4.x-dev" PHPUNIT_COVERAGE_TEST=1
- php: 7.2
env: DB=MYSQL RECIPE_VERSION="4.x-dev" PHPUNIT_TEST=1

Expand Down
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -15,15 +15,15 @@ content block called "Form", which can be used to create user defined forms.
## Requirements

* SilverStripe ^4.0
* Elemental ^2.0
* Elemental ^4.0
* UserForms ^5.0

## Installation

Install with Composer:

```
composer require dnadesign/silverstripe-elemental-userforms 1.x-dev
composer require dnadesign/silverstripe-elemental-userforms 2.x-dev
```

Ensure you run `dev/build?flush=1` to build your database and flush your cache.
Expand All @@ -48,6 +48,11 @@ There are valid use cases where this might be what you want (or variations of it
applying the ElementalPageExtension to subclasses of Page and excluding the UserDefinedForm class from this
extension to avoid this situation from happening.

## Inline editing

Please note that form elements are not inline editable. Clicking on them in the CMS will take you to a GridField
edit form instead.

## Blocking default CSS and JS

[silverstripe/silverstripe-userforms](https://github.com/silverstripe/silverstripe-userforms) includes default CSS and Javascript. If you want to block them from being included in your page when using `ElementForm`, you will need to set the configuration flag at the `ElementForm` level.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -19,7 +19,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"dnadesign/silverstripe-elemental": "^3.0",
"dnadesign/silverstripe-elemental": "^4.0@dev",
"silverstripe/userforms": "^5.0",
"silverstripe/vendor-plugin": "^1.0"
},
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ElementForm.php
Expand Up @@ -22,6 +22,8 @@ class ElementForm extends BaseElement

private static $plural_name = 'forms';

private static $inline_editable = false;

/**
* @return UserForm
*/
Expand Down

0 comments on commit 27b2e55

Please sign in to comment.