|
@@ -764,31 +764,37 @@ class Field implements Renderable
|
|
|
/**
|
|
|
* Set the field automatically get focus.
|
|
|
*
|
|
|
+ * @param bool $value
|
|
|
+ *
|
|
|
* @return $this
|
|
|
*/
|
|
|
- public function autofocus()
|
|
|
+ public function autofocus(bool $value = true)
|
|
|
{
|
|
|
- return $this->attribute('autofocus', true);
|
|
|
+ return $this->attribute('autofocus', $value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Set the field as readonly mode.
|
|
|
*
|
|
|
+ * @param bool $value
|
|
|
+ *
|
|
|
* @return $this
|
|
|
*/
|
|
|
- public function readOnly()
|
|
|
+ public function readOnly(bool $value = true)
|
|
|
{
|
|
|
- return $this->attribute('readonly', true);
|
|
|
+ return $this->attribute('readonly', $value);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Set field as disabled.
|
|
|
*
|
|
|
+ * @param bool $value
|
|
|
+ *
|
|
|
* @return $this
|
|
|
*/
|
|
|
- public function disable()
|
|
|
+ public function disable(bool $value = true)
|
|
|
{
|
|
|
- return $this->attribute('disabled', true);
|
|
|
+ return $this->attribute('disabled', $value);
|
|
|
}
|
|
|
|
|
|
/**
|