Skip to content

Commit 985bc54

Browse files
committed
0.10.0
2 parents 5933c7a + 782b618 commit 985bc54

File tree

11 files changed

+88
-12
lines changed

11 files changed

+88
-12
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Form
2+
====
3+
4+
**Legend:**
5+
6+
- *Add*: Added.
7+
- *Rem*: Remove.
8+
- *Enh*: Enhancement.
9+
- *Dep*: Deprecated.
10+
- *Fix*: Fixed.
11+
12+
0.10.0 [2017-09-24]
13+
-------------------
14+
15+
- Dep: Elements\Date element.
16+
- Dep: Elements\DateTimeLocal element.
17+
- Dep: FormServiceProvider.
18+
- Dep: Facades\Form.
19+
- Dep: OldInput\IlluminateOldInputProvider.
20+
- Dep: FormBuilder::selectMonth().
21+
- Add: Prompt for select.
22+
- Add: Custom attributes for option select.
23+

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
2-
"name": "adamwathan/form",
2+
"name": "bupy7/form",
33
"description": "A basic framework agnostic form building package with a few extra niceties like remembering old input and retrieving error messages.",
44
"authors": [
55
{
66
"name": "Adam Wathan",
77
"email": "[email protected]"
8+
},
9+
{
10+
"name": "Vasily Velosloodcev",
11+
"email": "[email protected]"
812
}
913
],
1014
"license": "MIT",
@@ -27,3 +31,4 @@
2731
},
2832
"minimum-stability": "dev"
2933
}
34+

readme.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
> **Important: This package is not actively maintained.** For bug fixes and new features, please fork.
2-
31
Form
4-
========
2+
====
53

6-
[![This Project Has Been Deprecated.](http://www.repostatus.org/badges/0.1.0/abandoned.svg)](http://www.repostatus.org/#abandoned)
7-
[![Code Climate](https://codeclimate.com/github/adamwathan/form/badges/gpa.svg)](https://codeclimate.com/github/adamwathan/form)
8-
[![Coverage Status](https://coveralls.io/repos/adamwathan/form/badge.svg?branch=master)](https://coveralls.io/r/adamwathan/form?branch=master)
4+
This is fork of [https://github.com/adamwathan/form](adamwathan/form). There is only HTML-elements builder
5+
without any support frameworks (including Laravel).
96

107
Boring name for a boring package. Builds form HTML with a fluent-ish, hopefully intuitive syntax.
118

@@ -22,10 +19,10 @@ Boring name for a boring package. Builds form HTML with a fluent-ish, hopefully
2219
You can install this package via Composer by running this command in your terminal in the root of your project:
2320

2421
```bash
25-
composer require adamwathan/form
22+
composer require bupy7/form
2623
```
2724

28-
### Laravel
25+
### Laravel [Deprecated]
2926

3027
> This package works great as a replacement Form Builder that was removed in Laravel 5. The API is different but all of the features are there.
3128
@@ -302,7 +299,7 @@ $options = [
302299
```
303300

304301
<a href="#remembering-old-input"></a>
305-
## Remembering Old Input
302+
## Remembering Old Input [Deprecated]
306303

307304
The FormBuilder can remember old input and prepopulate your form fields if you redirect back to the form because of a validation error.
308305

@@ -360,7 +357,7 @@ Assuming you set a CSRF token when instantiating the Formbuilder (or you are usi
360357
```
361358
362359
<a href="#data-binding"></a>
363-
## Data Binding
360+
## Data Binding [Deprecated]
364361
365362
Sometimes you might have a form where all of the fields match properties on some sort of object or array in your system, and you want the user to be able to edit that data. Data binding makes this really easy by allowing you to bind an object or array to your form that will be used to automatically provide all of the default values for your fields.
366363

src/AdamWathan/Form/Elements/Date.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
namespace AdamWathan\Form\Elements;
44

5+
/**
6+
* @deprecated
7+
*/
58
class Date extends Text
69
{
710
protected $attributes = [

src/AdamWathan/Form/Elements/DateTimeLocal.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<?php
22

3+
34
namespace AdamWathan\Form\Elements;
45

6+
/**
7+
* @deprecated
8+
*/
59
class DateTimeLocal extends Text
610
{
711
protected $attributes = [

src/AdamWathan/Form/Elements/Select.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ public function getOptAttribute($optValue, $name)
148148
}
149149
return null;
150150
}
151+
152+
public function prompt($label = '', $value = '')
153+
{
154+
$this->options = [$value => $label] + $this->options;
155+
return $this;
156+
}
151157

152158
protected function renderOptAttributes($optValue)
153159
{
@@ -165,3 +171,4 @@ protected function renderOptAttributes($optValue)
165171
}, $attributes, $values));
166172
}
167173
}
174+

src/AdamWathan/Form/Facades/Form.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
use Illuminate\Support\Facades\Facade;
66

7+
/**
8+
* @deprecated
9+
*/
710
class Form extends Facade
811
{
912
protected static function getFacadeAccessor()

src/AdamWathan/Form/FormBuilder.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ class FormBuilder
2929
protected $csrfToken;
3030

3131
protected $boundData;
32-
32+
33+
/**
34+
* @deprecated
35+
*/
3336
public function setOldInputProvider(OldInputInterface $oldInputProvider)
3437
{
3538
$this->oldInput = $oldInputProvider;
@@ -79,6 +82,9 @@ public function text($name)
7982
return $text;
8083
}
8184

85+
/**
86+
* @deprecated
87+
*/
8288
public function date($name)
8389
{
8490
$date = new Date($name);
@@ -90,6 +96,9 @@ public function date($name)
9096
return $date;
9197
}
9298

99+
/**
100+
* @deprecated
101+
*/
93102
public function dateTimeLocal($name)
94103
{
95104
$date = new DateTimeLocal($name);
@@ -286,6 +295,9 @@ protected function unbindData()
286295
$this->boundData = null;
287296
}
288297

298+
/**
299+
* @deprecated
300+
*/
289301
public function selectMonth($name)
290302
{
291303
$options = [
@@ -306,3 +318,4 @@ public function selectMonth($name)
306318
return $this->select($name, $options);
307319
}
308320
}
321+

src/AdamWathan/Form/FormServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use AdamWathan\Form\OldInput\IlluminateOldInputProvider;
77
use Illuminate\Support\ServiceProvider;
88

9+
/**
10+
* @deprecated
11+
*/
912
class FormServiceProvider extends ServiceProvider
1013
{
1114
protected $defer = false;
@@ -48,3 +51,4 @@ public function provides()
4851
return ['adamwathan.form'];
4952
}
5053
}
54+

src/AdamWathan/Form/OldInput/IlluminateOldInputProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
use Illuminate\Session\Store as Session;
66

7+
/**
8+
* @deprecated
9+
*/
710
class IlluminateOldInputProvider implements OldInputInterface
811
{
912
private $session;

0 commit comments

Comments
 (0)