Skip to content

Commit a428129

Browse files
committed
Add selectYear snippets
1 parent 021626d commit a428129

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@ When you're editing your view in Sublime Text, type the snippet shortcut then pr
4444
| **Radio** | `bootradio` |
4545
| **Select** | `bootselect` |
4646
| **SelectMonth** | `bootselectmonth` |
47+
| **SelectYear** | `bootselectyear` |
4748
| **SelectRange** | `bootselectrange` |
4849
| **Text** | `boottextarea` |
4950
| **Textarea** | `boottext` |
5051

5152
### Horizontal inputs
5253

53-
| Input | Shortcut |
54-
|-----------------|-------------------|
54+
| Input | Shortcut |
55+
|-----------------|--------------------|
5556
| **Checkbox** | `bootcheckboxh` |
5657
| **Date** | `bootdateh` |
5758
| **Email** | `bootemailh` |
@@ -61,6 +62,7 @@ When you're editing your view in Sublime Text, type the snippet shortcut then pr
6162
| **Radio** | `bootradioh` |
6263
| **Select** | `bootselecth` |
6364
| **SelectMonth** | `bootselectmonthh` |
65+
| **SelectYear** | `bootselectyearh` |
6466
| **SelectRange** | `bootselectrangeh` |
6567
| **Text** | `boottextareah` |
6668
| **Textarea** | `boottexth` |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<div class="form-group @if(\$errors->first('${1:year}')) has-error @endif">
4+
{!! Form::label('${1:year}', '${2:Year}') !!}
5+
{!! Form::selectYear('${1:year}', ${3:date('Y')}, ${4:date('Y') + 10}, null, ['class' => 'form-control'${5:, 'required' => 'required'}]) !!}
6+
<small class="text-danger">{{ \$errors->first('${1:year}') }}</small>
7+
</div>
8+
]]></content>
9+
<tabTrigger>bootselectyear</tabTrigger>
10+
<scope>text.html.laravel-blade</scope>
11+
</snippet>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<div class="form-group @if(\$errors->first('${1:year}')) has-error @endif">
4+
{!! Form::label('${1:year}', '${2:Year}', 'class' => '${6:col-sm-3 control-label}') !!}
5+
<div class="${7:col-sm-9}">
6+
{!! Form::selectYear('${1:year}', ${3:date('Y')}, ${4:date('Y') + 10}, null, ['class' => 'form-control'${5:, 'required' => 'required'}]) !!}
7+
<small class="text-danger">{{ \$errors->first('${1:year}') }}</small>
8+
</div>
9+
</div>
10+
]]></content>
11+
<tabTrigger>bootselectyearh</tabTrigger>
12+
<scope>text.html.laravel-blade</scope>
13+
</snippet>

0 commit comments

Comments
 (0)