Skip to content

Commit b8558a5

Browse files
committed
added errorBlockPath
1 parent b58d7e1 commit b8558a5

File tree

9 files changed

+18
-8
lines changed

9 files changed

+18
-8
lines changed

src/helpers.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
use Kris\LaravelFormBuilder\Form;
55

66

7+
if(!function_exists('errorBlockPath'))
8+
{
9+
10+
function errorBlockPath()
11+
{
12+
return __DIR__.'/views/errors.php';
13+
}
14+
15+
}
16+
717
if(!function_exists('helpBlockPath'))
818
{
919

src/views/checkbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<?php include helpBlockPath(); ?>
1515
<?php endif; ?>
1616

17-
<?php include 'errors.php' ?>
17+
<?php include errorBlockPath(); ?>
1818

1919
<?php if ($showLabel && $showField): ?>
2020
<?php if ($options['wrapper'] !== false): ?>

src/views/child_form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<?php endif; ?>
2121

22-
<?php include 'errors.php' ?>
22+
<?php include errorBlockPath(); ?>
2323

2424
<?php if ($showLabel && $showField): ?>
2525
<?php if ($options['wrapper'] !== false): ?>

src/views/choice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<?php endif; ?>
1919

2020

21-
<?php include 'errors.php' ?>
21+
<?php include errorBlockPath(); ?>
2222

2323
<?php if ($showLabel && $showField): ?>
2424
<?php if ($options['wrapper'] !== false): ?>

src/views/collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<?php endif; ?>
1919

20-
<?php include 'errors.php' ?>
20+
<?php include errorBlockPath(); ?>
2121

2222
<?php if ($showLabel && $showField): ?>
2323
<?php if ($options['wrapper'] !== false): ?>

src/views/radio.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<?php include helpBlockPath(); ?>
1515
<?php endif; ?>
1616

17-
<?php include 'errors.php' ?>
17+
<?php include errorBlockPath(); ?>
1818

1919
<?php if ($showLabel && $showField): ?>
2020
<?php if ($options['wrapper'] !== false): ?>

src/views/select.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<?php include helpBlockPath(); ?>
1515
<?php endif; ?>
1616

17-
<?php include 'errors.php' ?>
17+
<?php include errorBlockPath(); ?>
1818

1919
<?php if ($showLabel && $showField): ?>
2020
<?php if ($options['wrapper'] !== false): ?>

src/views/text.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<?php include helpBlockPath(); ?>
1515
<?php endif; ?>
1616

17-
<?php include 'errors.php' ?>
17+
<?php include errorBlockPath(); ?>
1818

1919
<?php if ($showLabel && $showField): ?>
2020
<?php if ($options['wrapper'] !== false): ?>

src/views/textarea.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<?php include helpBlockPath(); ?>
1515
<?php endif; ?>
1616

17-
<?php include 'errors.php' ?>
17+
<?php include errorBlockPath(); ?>
1818

1919
<?php if ($showLabel && $showField): ?>
2020
<?php if ($options['wrapper'] !== false): ?>

0 commit comments

Comments
 (0)