diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8943349 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +/tests export-ignore +/docs export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/.scrutinizer.yml export-ignore +/phpunit.xml export-ignore diff --git a/.travis.yml b/.travis.yml index 97f618f..3540404 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,27 @@ # See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details -language: php - sudo: false +language: php + php: - 5.3 - 5.4 - 5.5 - 5.6 + - 7.0 env: - - DB=MYSQL CORE_RELEASE=3 - - DB=MYSQL CORE_RELEASE=3.1 - - DB=PGSQL CORE_RELEASE=3.1 + - DB=MYSQL CORE_RELEASE=3.1 matrix: - exclude: - - php: 5.4 - env: DB=MYSQL CORE_RELEASE=3 - - php: 5.5 - env: DB=MYSQL CORE_RELEASE=3 - - php: 5.6 - env: DB=MYSQL CORE_RELEASE=3 - - php: 5.4 - env: DB=PGSQL CORE_RELEASE=3.1 - - php: 5.5 - env: DB=PGSQL CORE_RELEASE=3.1 - - php: 5.6 - env: DB=PGSQL CORE_RELEASE=3.1 include: - - php: 5.4 + - php: 5.6 + env: DB=MYSQL CORE_RELEASE=3 + - php: 5.6 env: DB=MYSQL CORE_RELEASE=3.1 SECUREASSETS=1 + - php: 5.6 + env: DB=PGSQL CORE_RELEASE=3.1 before_script: - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support @@ -39,5 +29,15 @@ before_script: - "if [ \"$SECUREASSETS\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/secureassets; fi" - cd ~/builds/ss -script: - - phpunit userforms/tests +script: + - vendor/bin/phpunit --coverage-clover coverage.clover userforms/tests + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover coverage.clover --repository=g/silverstripe/silverstripe-userforms + +branches: + only: + - master + +matrix: + allow_failures: + - php: 7.0 diff --git a/README.md b/README.md deleted file mode 100644 index 0009f8a..0000000 --- a/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# UserForms - -[![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-userforms.png?branch=master)](http://travis-ci.org/silverstripe/silverstripe-userforms) - -## Introduction - -UserForms enables CMS users to create dynamic forms via a drag and drop interface -and without getting involved in any PHP code. - -## Maintainer Contact - - * Will Rossiter (Nickname: wrossiter, willr) `` - -## Requirements - - * SilverStripe 3.1 - -## Features - -* Construct a form using all major form fields (text, email, dropdown, radio, checkbox..) -* Ability to extend userforms from other modules to provide extra fields. -* Ability to email multiple people the form submission -* View submitted submissions and export them to CSV -* Define custom error messages and validation settings -* Optionally display and hide fields using javascript based on users input -* Pre fill your form fields, by passing your values by url (http://yoursite.com/formpage?EditableField1=MyValue) - -## Installation - -Installation can be done either by composer or by manually downloading a release. - -### Via composer - -`composer require "silverstripe/userforms:*"` - -### Manually - - 1. Download the module from [the releases page](https://github.com/silverstripe/silverstripe-userforms/releases). - 2. Extract the file (if you are on windows try 7-zip for extracting tar.gz files - 3. Make sure the folder after being extracted is named 'userforms' - 4. Place this directory in your sites root directory. This is the one with framework and cms in it. - -### Configuration - -After installation, make sure you rebuild your database through `dev/build`. - -You should see a new PageType in the CMS 'User Defined Form'. This has a new 'Form' tab which has your form builder. - -## Documentation - - * [Index](docs/en/index.md) - * [Installation instructions](docs/en/installation.md) - * [Troubleshooting](docs/en/troubleshooting.md) - * [User Documentation](docs/en/user-documentation.md) - -## Thanks - -I would like to thank everyone who has contributed to the module, bugfixers, -testers, clients who use the module and everyone that submits new features. - -A big thanks goes out to [Jan Düsedau](http://eformation.de) for drawing -the custom icon set for the form fields. - -## Contributing - -### Translations - -Translations of the natural language strings are managed through a third party translation interface, transifex.com. Newly added strings will be periodically uploaded there for translation, and any new translations will be merged back to the project source code. - -Please use [https://www.transifex.com/projects/p/silverstripe-userforms](https://www.transifex.com/projects/p/silverstripe-userforms) to contribute translations, rather than sending pull requests with YAML files. diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..0b54f6a --- /dev/null +++ b/changelog.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +This project adheres to [Semantic Versioning](http://semver.org/). + +## [3.0.0] + +Changelog added. diff --git a/code-of-conduct.md b/code-of-conduct.md new file mode 100644 index 0000000..9cad55d --- /dev/null +++ b/code-of-conduct.md @@ -0,0 +1,3 @@ +# Code of Conduct + +https://docs.silverstripe.org/en/3.1/contributing/code_of_conduct/ \ No newline at end of file diff --git a/composer.json b/composer.json index 15363c2..2944d01 100644 --- a/composer.json +++ b/composer.json @@ -4,14 +4,32 @@ "type": "silverstripe-module", "keywords": ["silverstripe", "userforms"], "license": "BSD-3-Clause", - "authors": [{ - "name": "Will Rossiter", - "email": "will@fullscreen.io" - }], + "authors": [ + { + "name": "Will Rossiter", + "email": "will@fullscreen.io" + }, + { + "name": "Damian Mooyman", + "email": "damian@silverstripe.com" + }, + { + "name": "David Craig", + "email": "david@silverstripe.com" + }, + { + "name": "Scott Hutchinson", + "email": "scott@silverstripe.com" + }, + { + "name": "Christopher Pitt", + "email": "chris@silverstripe.com" + } + ], "require": { - "silverstripe/framework": ">=3.1.0", - "silverstripe/cms": ">=3.1.0", - "silverstripe-australia/gridfieldextensions": "1.1.0", + "silverstripe/framework": "~3.1", + "silverstripe/cms": "~3.1", + "silverstripe-australia/gridfieldextensions": "~1.1", "silverstripe/segment-field": "^1.0" }, "suggest": { diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..fbece7e --- /dev/null +++ b/contributing.md @@ -0,0 +1,9 @@ +# Contributing + +Contributions are welcome! Create an issue, explaining a bug or proposal. Submit pull requests if you feel brave. Speak to me on [Twitter](https://twitter.com/assertchris). + +## Translations + +Translations of the natural language strings are managed through a third party translation interface, transifex.com. Newly added strings will be periodically uploaded there for translation, and any new translations will be merged back to the project source code. + +Please use [https://www.transifex.com/projects/p/silverstripe-userforms](https://www.transifex.com/projects/p/silverstripe-userforms) to contribute translations, rather than sending pull requests with YAML files. diff --git a/LICENSE b/license.md similarity index 100% rename from LICENSE rename to license.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..4a0a0ff --- /dev/null +++ b/readme.md @@ -0,0 +1,55 @@ +# UserForms + +UserForms enables CMS users to create dynamic forms via a drag and drop interface +and without getting involved in any PHP code. + +[![Build Status](http://img.shields.io/travis/silverstripe/silverstripe-userforms.svg?style=flat-square)](https://travis-ci.org/silverstripe/silverstripe-userforms) +[![Code Quality](http://img.shields.io/scrutinizer/g/silverstripe/silverstripe-userforms.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms) +[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/silverstripe/silverstripe-userforms.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms) +[![Version](http://img.shields.io/packagist/v/silverstripe/userforms.svg?style=flat-square)](https://packagist.org/packages/silverstripe/silverstripe-userforms) +[![License](http://img.shields.io/packagist/l/silverstripe/userforms.svg?style=flat-square)](LICENSE.md) + +## Requirements + + * SilverStripe 3.1 + +## Features + +* Construct a form using all major form fields (text, email, dropdown, radio, checkbox..) +* Ability to extend userforms from other modules to provide extra fields. +* Ability to email multiple people the form submission +* View submitted submissions and export them to CSV +* Define custom error messages and validation settings +* Optionally display and hide fields using javascript based on users input +* Pre fill your form fields, by passing your values by url (http://yoursite.com/formpage?EditableField1=MyValue) + +## Installation + +```sh +$ composer require silverstripe/userforms +``` + +You'll also need to run `dev/build`. You should see a new page type in the CMS 'User Defined Form'. This has a new 'Form' tab which has your form builder. + +## Documentation + + * [Index](docs/en/index.md) + * [Installation instructions](docs/en/installation.md) + * [Troubleshooting](docs/en/troubleshooting.md) + * [User Documentation](docs/en/user-documentation.md) + +## Thanks + +I would like to thank everyone who has contributed to the module, bugfixers, testers, clients who use the module and everyone that submits new features. + +A big thanks goes out to [Jan Düsedau](http://eformation.de) for drawing the custom icon set for the form fields. + +## Versioning + +This library follows [Semver](http://semver.org). According to Semver, you will be able to upgrade to any minor or patch version of this library without any breaking changes to the public API. Semver also requires that we clearly define the public API for this library. + +All methods, with `public` visibility, are part of the public API. All other methods are not part of the public API. Where possible, we'll try to keep `protected` methods backwards-compatible in minor/patch versions, but if you're overriding methods then please test your work before upgrading. + +## Reporting Issues + +Please [create an issue](http://github.com/silverstripe/silverstripe-userforms/issues) for any bugs you've found, or features you're missing. diff --git a/UPGRADE.md b/upgrading.md similarity index 100% rename from UPGRADE.md rename to upgrading.md