mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Updated BankAccountField to allow setting it to blank without a notice-level error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63552 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7574120f15
commit
6694936cc8
@ -60,7 +60,7 @@ class BankAccountField extends FormField {
|
|||||||
|
|
||||||
public function setValue($value) {
|
public function setValue($value) {
|
||||||
$this->value = self::join_bank_number($value);
|
$this->value = self::join_bank_number($value);
|
||||||
|
if($this->value) {
|
||||||
$this->valueArr = array();
|
$this->valueArr = array();
|
||||||
list(
|
list(
|
||||||
$this->valueArr['BankCode'],
|
$this->valueArr['BankCode'],
|
||||||
@ -69,6 +69,7 @@ class BankAccountField extends FormField {
|
|||||||
$this->valueArr['AccountSuffix']
|
$this->valueArr['AccountSuffix']
|
||||||
) = explode(" ",$this->value);
|
) = explode(" ",$this->value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
@ -108,6 +109,7 @@ class BankAccountField extends FormField {
|
|||||||
public static function join_bank_number($value) {
|
public static function join_bank_number($value) {
|
||||||
if(is_array($value)) {
|
if(is_array($value)) {
|
||||||
$value = self::convert_format_nz($value);
|
$value = self::convert_format_nz($value);
|
||||||
|
$completeNumber = "";
|
||||||
if($value['BankCode']) {
|
if($value['BankCode']) {
|
||||||
$completeNumber .= $value['BankCode'] . " ";
|
$completeNumber .= $value['BankCode'] . " ";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user