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:
Sean Harvey 2013-04-14 14:01:09 -07:00
commit 2a65f17542

View File

@ -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 ) {