Skip to content

Commit

Permalink
drop Form::jsControl method
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Oct 1, 2022
1 parent 3361ede commit d7a8066
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion demos/form/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@

return [
$form->jsInput('email')->val('[email protected]'),
$form->jsControl('is_accept_terms')->checkbox('set checked'),
$form->getControl('is_accept_terms')->js()->checkbox('set checked'),
];
});

Expand Down
2 changes: 1 addition & 1 deletion docs/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ it's always nicer to load values for the database. Given a ``User`` model this i
you can create a form to change profile of a currently logged user::

$user = new User($db);
$user->getControl('password')->neverPersist = true; // ignore password field
$user->getField('password')->neverPersist = true; // ignore password field
$user = $user->load($current_user);

// Display all fields (except password) and values
Expand Down
13 changes: 0 additions & 13 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,19 +389,6 @@ public function jsInput($name)
return $this->layout->getControl($name)->js()->find('input');
}

/**
* Returns JS Chain that targets INPUT of a specified element. This method is handy
* if you wish to set a value to a certain field.
*
* @param string $name Name of control
*
* @return JsChain
*/
public function jsControl($name)
{
return $this->layout->getControl($name)->js();
}

// }}}

// {{{ Internals
Expand Down

0 comments on commit d7a8066

Please sign in to comment.