Moved the customer edit page to include address and email fields. This is largely all the work on the presentation side, now I just need to take the data and update the database.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@214 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-05 20:01:06 +00:00
parent 0f9bafab31
commit ae276d310a
5 changed files with 184 additions and 6 deletions

View File

@@ -17,5 +17,23 @@ class ContactAddress extends AppModel {
'conditions' => "method = 'POST'",
)
);
function addressList() {
$results = $this->find('all',
array('contain' => false,
'fields' => array('id', 'address', 'city', 'state', 'postcode'),
'order' => array('state', 'city', 'postcode', 'address')));
$list = array();
foreach ($results as $key => $val) {
$list[$val['ContactAddress']['id']]
= preg_replace("/\n/", ", ", $val['ContactAddress']['address'])
. ', ' . $val['ContactAddress']['city']
. ', ' . $val['ContactAddress']['state']
. ' ' . $val['ContactAddress']['postcode']
;
}
return $list;
}
}
?>