Skip to content

Commit

Permalink
Merge pull request #1 from avengers/develop
Browse files Browse the repository at this point in the history
Changed meta informations of package
  • Loading branch information
emir authored Sep 25, 2017
2 parents 9b8daa6 + 9245911 commit e9b1638
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 55 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/build
/vendor
composer.phar
composer.lock
.DS_Store
.DS_Store
.idea
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "adamwathan/bootforms",
"name": "avengers/bootforms",
"description": "Just a Formbuilder with some Bootstrap specific conveniences. Remembers old input, retrieves error messages and handles all your boilerplate Bootstrap markup automatically.",
"authors": [
{
"name": "Emir Karşıyakalı",
"email": "[email protected]"
},
{
"name": "Adam Wathan",
"email": "[email protected]"
Expand All @@ -19,7 +23,7 @@
},
"autoload": {
"psr-0": {
"AdamWathan\\BootForms": "src/"
"TheAvengers\\BootForms": "src/"
}
},
"minimum-stability": "stable"
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<whitelist>
<directory suffix=".php">./src</directory>
<exclude>
<file>./src/AdamWathan/BootForms/BootFormsServiceProvider.php</file>
<file>./src/AdamWathan/BootForms/Facades/BootForm.php</file>
<file>./src/TheAvengers/BootForms/BootFormsServiceProvider.php</file>
<file>./src/TheAvengers/BootForms/Facades/BootForm.php</file>
</exclude>
</whitelist>
</filter>
Expand Down
34 changes: 18 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
> **Important: This package is not actively maintained.** For bug fixes and new features, please fork.
BootForms
===============

[![This Project Has Been Deprecated.](http://www.repostatus.org/badges/0.1.0/abandoned.svg)](http://www.repostatus.org/#abandoned)
[![Code Climate](https://codeclimate.com/github/adamwathan/bootforms/badges/gpa.svg)](https://codeclimate.com/github/adamwathan/bootforms)
[![Coverage Status](https://coveralls.io/repos/adamwathan/bootforms/badge.svg?branch=master)](https://coveralls.io/r/adamwathan/bootforms?branch=master)
[![Code Climate](https://codeclimate.com/github/avengers/bootforms/badges/gpa.svg)](https://codeclimate.com/github/avengers/bootforms)
[![Coverage Status](https://coveralls.io/repos/avengers/bootforms/badge.svg?branch=master)](https://coveralls.io/r/avengers/bootforms?branch=master)

BootForms builds on top of my more general [Form](https://github.com/adamwathan/form) package by adding another layer of abstraction to rapidly generate markup for standard Bootstrap 3 forms. Probably not perfect for your super custom branded ready-for-release apps, but a *huge* time saver when you are still in the prototyping stage!
BootForms builds on top of my more general [Form](https://github.com/avengers/form) package by adding another layer of abstraction to rapidly generate markup for standard Bootstrap 3 forms. Probably not perfect for your super custom branded ready-for-release apps, but a *huge* time saver when you are still in the prototyping stage!

- [Installation](#installing-with-composer)
- [Using BootForms](#using-bootforms)
Expand All @@ -24,7 +21,7 @@ BootForms builds on top of my more general [Form](https://github.com/adamwathan/
You can install this package via Composer by running this command in your terminal in the root of your project:

```bash
composer require adamwathan/bootforms
composer require avengers/bootforms
```

### Laravel
Expand All @@ -36,7 +33,7 @@ Modify the `providers` array in `config/app.php` to include the `BootFormsServic
```php
'providers' => [
//...
'AdamWathan\BootForms\BootFormsServiceProvider'
'TheAvengers\BootForms\BootFormsServiceProvider'
],
```

Expand All @@ -45,7 +42,7 @@ Add the `BootForm` facade to the `aliases` array in `config/app.php`:
```php
'aliases' => [
//...
'BootForm' => 'AdamWathan\BootForms\Facades\BootForm'
'BootForm' => 'TheAvengers\BootForms\Facades\BootForm'
],
```

Expand All @@ -60,19 +57,19 @@ BootForm::text('Email', 'email');
Usage outside of Laravel is a little trickier since there's a bit of a dependency stack you need to build up, but it's not too tricky.

```php
$formBuilder = new AdamWathan\Form\FormBuilder;
$formBuilder = new TheAvengers\Form\FormBuilder;

$formBuilder->setOldInputProvider($myOldInputProvider);
$formBuilder->setErrorStore($myErrorStore);
$formBuilder->setToken($myCsrfToken);

$basicBootFormsBuilder = new AdamWathan\BootForms\BasicFormBuilder($formBuilder);
$horizontalBootFormsBuilder = new AdamWathan\BootForms\HorizontalFormBuilder($formBuilder);
$basicBootFormsBuilder = new TheAvengers\BootForms\BasicFormBuilder($formBuilder);
$horizontalBootFormsBuilder = new TheAvengers\BootForms\HorizontalFormBuilder($formBuilder);

$bootForm = new AdamWathan\BootForms\BootForm($basicBootFormsBuilder, $horizontalBootFormsBuilder);
$bootForm = new TheAvengers\BootForms\BootForm($basicBootFormsBuilder, $horizontalBootFormsBuilder);
```

> Note: You must provide your own implementations of `AdamWathan\Form\OldInputInterface` and `AdamWathan\Form\ErrorStoreInterface` when not using the implementations meant for Laravel.
> Note: You must provide your own implementations of `TheAvengers\Form\OldInputInterface` and `TheAvengers\Form\ErrorStoreInterface` when not using the implementations meant for Laravel.
## Using BootForms

Expand Down Expand Up @@ -126,7 +123,7 @@ BootForm::open()->get()->action('/users');
BootForm::text('First Name', 'first_name')->defaultValue('John Doe');
```

For more information about what's possible, check out the documentation for [my basic Form package.](https://github.com/adamwathan/form)
For more information about what's possible, check out the documentation for [my basic Form package.](https://github.com/avengers/form)

### Reduced Boilerplate

Expand Down Expand Up @@ -236,7 +233,7 @@ You can add a help block underneath a form element using the `helpBlock()` helpe
#### Model Binding

BootForms makes it easy to bind an object to a form to provide default values. Read more about it [here](https://github.com/adamwathan/form#model-binding).
BootForms makes it easy to bind an object to a form to provide default values. Read more about it [here](https://github.com/avengers/form#model-binding).

```php
BootForm::open()->action( route('users.update', $user) )->put()
Expand All @@ -247,3 +244,8 @@ BootForm::close()
## Related Resources

- [Laravel Translatable BootForms](https://github.com/Propaganistas/Laravel-Translatable-Bootforms), integrates BootForms with Dimsav's [Laravel Translatable](https://github.com/dimsav/laravel-translatable) package

## Contributors

- [AdamWathan](https://github.com/avengers) Adam Wathan - creator
- [emir](https://github.com/emir) Emir Karşıyakalı - maintainer
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php namespace AdamWathan\BootForms;
<?php namespace TheAvengers\BootForms;

use AdamWathan\BootForms\Elements\CheckGroup;
use AdamWathan\BootForms\Elements\FormGroup;
use AdamWathan\BootForms\Elements\GroupWrapper;
use AdamWathan\BootForms\Elements\HelpBlock;
use AdamWathan\BootForms\Elements\InputGroup;
use TheAvengers\BootForms\Elements\CheckGroup;
use TheAvengers\BootForms\Elements\FormGroup;
use TheAvengers\BootForms\Elements\GroupWrapper;
use TheAvengers\BootForms\Elements\HelpBlock;
use TheAvengers\BootForms\Elements\InputGroup;
use AdamWathan\Form\FormBuilder;

class BasicFormBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms;
<?php namespace TheAvengers\BootForms;

class BootForm
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms;
<?php namespace TheAvengers\BootForms;

use AdamWathan\Form\ErrorStore\IlluminateErrorStore;
use AdamWathan\Form\FormBuilder;
Expand Down Expand Up @@ -32,24 +32,24 @@ public function register()

protected function registerErrorStore()
{
$this->app->singleton('adamwathan.form.errorstore', function ($app) {
$this->app->singleton('TheAvengers.form.errorstore', function ($app) {
return new IlluminateErrorStore($app['session.store']);
});
}

protected function registerOldInput()
{
$this->app->singleton('adamwathan.form.oldinput', function ($app) {
$this->app->singleton('TheAvengers.form.oldinput', function ($app) {
return new IlluminateOldInputProvider($app['session.store']);
});
}

protected function registerFormBuilder()
{
$this->app->singleton('adamwathan.form', function ($app) {
$this->app->singleton('TheAvengers.form', function ($app) {
$formBuilder = new FormBuilder;
$formBuilder->setErrorStore($app['adamwathan.form.errorstore']);
$formBuilder->setOldInputProvider($app['adamwathan.form.oldinput']);
$formBuilder->setErrorStore($app['TheAvengers.form.errorstore']);
$formBuilder->setOldInputProvider($app['TheAvengers.form.oldinput']);
$formBuilder->setToken($app['session.store']->token());

return $formBuilder;
Expand All @@ -59,14 +59,14 @@ protected function registerFormBuilder()
protected function registerBasicFormBuilder()
{
$this->app->singleton('bootform.basic', function ($app) {
return new BasicFormBuilder($app['adamwathan.form']);
return new BasicFormBuilder($app['TheAvengers.form']);
});
}

protected function registerHorizontalFormBuilder()
{
$this->app->singleton('bootform.horizontal', function ($app) {
return new HorizontalFormBuilder($app['adamwathan.form']);
return new HorizontalFormBuilder($app['TheAvengers.form']);
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms\Elements;
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Label;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms\Elements;
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Element;
use AdamWathan\Form\Elements\Label;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms\Elements;
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Label;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms\Elements;
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Element;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms\Elements;
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Element;
use AdamWathan\Form\Elements\Label;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms\Elements;
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Text;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms\Elements;
<?php namespace TheAvengers\BootForms\Elements;

class OffsetFormGroup
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php namespace AdamWathan\BootForms\Facades;
<?php namespace TheAvengers\BootForms\Facades;

use Illuminate\Support\Facades\Facade;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php namespace AdamWathan\BootForms;
<?php namespace TheAvengers\BootForms;

use AdamWathan\BootForms\Elements\CheckGroup;
use AdamWathan\BootForms\Elements\HelpBlock;
use AdamWathan\BootForms\Elements\HorizontalFormGroup;
use AdamWathan\BootForms\Elements\OffsetFormGroup;
use TheAvengers\BootForms\Elements\CheckGroup;
use TheAvengers\BootForms\Elements\HelpBlock;
use TheAvengers\BootForms\Elements\HorizontalFormGroup;
use TheAvengers\BootForms\Elements\OffsetFormGroup;
use AdamWathan\Form\FormBuilder;

class HorizontalFormBuilder extends BasicFormBuilder
Expand Down
2 changes: 1 addition & 1 deletion tests/BasicFormBuilderTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use AdamWathan\BootForms\BasicFormBuilder;
use TheAvengers\BootForms\BasicFormBuilder;
use AdamWathan\Form\FormBuilder;

class BasicFormBuilderTest extends PHPUnit_Framework_TestCase
Expand Down
4 changes: 2 additions & 2 deletions tests/FormGroupTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use AdamWathan\BootForms\Elements\FormGroup;
use AdamWathan\BootForms\Elements\HelpBlock;
use TheAvengers\BootForms\Elements\FormGroup;
use TheAvengers\BootForms\Elements\HelpBlock;
use AdamWathan\Form\FormBuilder;

class FormGroupTest extends PHPUnit_Framework_TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/HelpBlockTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use AdamWathan\BootForms\Elements\HelpBlock;
use TheAvengers\BootForms\Elements\HelpBlock;

class HelpBlockTest extends PHPUnit_Framework_TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/HorizontalFormBuilderTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use AdamWathan\BootForms\HorizontalFormBuilder;
use TheAvengers\BootForms\HorizontalFormBuilder;
use AdamWathan\Form\FormBuilder;

class HorizontalFormBuilderTest extends PHPUnit_Framework_TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/InputGroupTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use AdamWathan\BootForms\Elements\InputGroup;
use TheAvengers\BootForms\Elements\InputGroup;

class InputGroupTest extends PHPUnit_Framework_TestCase
{
Expand Down

0 comments on commit e9b1638

Please sign in to comment.