mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #1757 from tractorcow/3.1-phone-field-fix
BUG Fixed incorrect variable usage in generation of PhoneNumberField form fields
This commit is contained in:
commit
2a65f17542
@ -31,7 +31,6 @@ class PhoneNumberField extends FormField {
|
||||
$fields = new FieldGroup( $this->name );
|
||||
$fields->setID("{$this->name}_Holder");
|
||||
list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue();
|
||||
$hasTitle = false;
|
||||
|
||||
if ($this->value=="") {
|
||||
$countryCode=$this->countryCode;
|
||||
@ -51,7 +50,7 @@ class PhoneNumberField extends FormField {
|
||||
}
|
||||
|
||||
if($this->ext !== null) {
|
||||
$field->push(new NumericField( $this->name.'[Extension]', 'ext', $extension, 6));
|
||||
$fields->push(new NumericField( $this->name.'[Extension]', 'ext', $extension, 6));
|
||||
}
|
||||
|
||||
$description = $this->getDescription();
|
||||
@ -62,7 +61,7 @@ class PhoneNumberField extends FormField {
|
||||
$field->setReadonly($this->isReadonly());
|
||||
}
|
||||
|
||||
return $field;
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public function setValue( $value ) {
|
||||
|
Loading…
Reference in New Issue
Block a user