htmlform: Replace some uses of isHidden to isDisabled
After its logic is refactored, we have more faith to use isDisabled() in these cases, which matches the original semantics of isHidden(). Change-Id: I1aece7c691307ac8bb3770e6dc4b8e2877e4d65c
This commit is contained in:
parent
0c8c75436c
commit
a745a87216
3 changed files with 3 additions and 3 deletions
|
|
@ -395,7 +395,7 @@ abstract class HTMLFormField {
|
|||
* false to fail validation without displaying an error.
|
||||
*/
|
||||
public function validate( $value, $alldata ) {
|
||||
if ( $this->isHidden( $alldata ) ) {
|
||||
if ( $this->isDisabled( $alldata ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ class HTMLFormFieldCloner extends HTMLFormField {
|
|||
if ( !array_key_exists( $fieldname, $value ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( $field->isHidden( $alldata ) ) {
|
||||
if ( $field->isDisabled( $alldata ) ) {
|
||||
continue;
|
||||
}
|
||||
$ok = $field->validate( $value[$fieldname], $alldata );
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class HTMLRestrictionsField extends HTMLTextAreaField {
|
|||
* false to fail validation without displaying an error.
|
||||
*/
|
||||
public function validate( $value, $alldata ) {
|
||||
if ( $this->isHidden( $alldata ) ) {
|
||||
if ( $this->isDisabled( $alldata ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue