BUG Fixed incorrect variable usage in generation of PhoneNumberField form fields

This commit is contained in:
Damian Mooyman 2013-04-12 15:13:58 +12:00
parent 59dc0085d8
commit 0dfc6d5eab

View File

@ -31,7 +31,6 @@ class PhoneNumberField extends FormField {
$fields = new FieldGroup( $this->name ); $fields = new FieldGroup( $this->name );
$fields->setID("{$this->name}_Holder"); $fields->setID("{$this->name}_Holder");
list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue(); list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue();
$hasTitle = false;
if ($this->value=="") { if ($this->value=="") {
$countryCode=$this->countryCode; $countryCode=$this->countryCode;
@ -51,7 +50,7 @@ class PhoneNumberField extends FormField {
} }
if($this->ext !== null) { 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(); $description = $this->getDescription();
@ -62,7 +61,7 @@ class PhoneNumberField extends FormField {
$field->setReadonly($this->isReadonly()); $field->setReadonly($this->isReadonly());
} }
return $field; return $fields;
} }
public function setValue( $value ) { public function setValue( $value ) {