From: Iain Patterson Date: Wed, 10 Apr 2013 20:50:41 +0000 (-0400) Subject: Added contact registration date. X-Git-Tag: 2013-04-10~3 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=d11f3b9f2da834281ab505d371d4b23bae80251a;p=readifood.git Added contact registration date. Record date a contact was registered on the system. --- diff --git a/lib/contact.php b/lib/contact.php index 3dd0fc3..98340b8 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -173,7 +173,7 @@ return show_role_form($role, $GLOBALS['contact_roles']); } - function show_contact_form($contact = null) { + function show_contact_form($contact = null, $new = false) { global $contact_roles; if (! $contact) $contact = new Contact; @@ -184,6 +184,14 @@ echo " "; show_contact_role_form($contact->getRole()); echo "\n"; echo "\n"; + /* Date added. */ + if (! $new) { + echo "\n"; + echo " Registered\n"; + echo " " . $contact->getAdded() . "\n"; + echo "\n"; + } + /* Forename. */ echo "\n"; echo " Forename\n"; @@ -271,7 +279,7 @@ echo "

Add a new contact:

\n"; echo "\n"; - show_contact_form($contact); + show_contact_form($contact, true); echo "\n"; echo " \n"; diff --git a/propel/schema.xml b/propel/schema.xml index 62658f5..7c801b4 100644 --- a/propel/schema.xml +++ b/propel/schema.xml @@ -52,6 +52,7 @@ +
"; submit("add_contact", "Add"); echo "