Skip to content

Commit bfa84a4

Browse files
author
Dmitry Drozd
committed
Added isEnabled parameter && argument to disable method
1 parent e61762f commit bfa84a4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Form.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public function view()
8383
]);
8484
}
8585

86-
public function disable()
86+
public function disable($disabled = true)
8787
{
88-
$this->disabled = true;
88+
$this->disabled = $disabled;
8989

9090
return $this;
9191
}
@@ -95,6 +95,11 @@ public function isDisabled()
9595
return $this->disabled;
9696
}
9797

98+
public function isEnabled()
99+
{
100+
return !$this->disabled;
101+
}
102+
98103
public function render()
99104
{
100105
$this->setupFormName();

0 commit comments

Comments
 (0)