From 173b6db354a04d101f963a26217850ca8355f025 Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Thu, 4 Nov 2010 07:14:48 +0000 Subject: Include name element in generic data --- templates/display_contact.tpl | 8 ++++++ templates/edit.tpl | 64 +++++++++++++++++++++++-------------------- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/templates/display_contact.tpl b/templates/display_contact.tpl index bd4f850..1d8075e 100644 --- a/templates/display_contact.tpl +++ b/templates/display_contact.tpl @@ -11,6 +11,14 @@ {/forminput} {/if} + {if isset($pageInfo.name) && ($pageInfo.name <> '') } +
+ {formlabel label="Name" for="name"} + {forminput} + {$pageInfo.name|escape} + {/forminput} +
+ {/if} {if isset($pageInfo.organisation) && ($pageInfo.organisation <> '') }
{formlabel label="Organisation" for="organisation"} diff --git a/templates/edit.tpl b/templates/edit.tpl index f2f0621..5ee9fac 100644 --- a/templates/edit.tpl +++ b/templates/edit.tpl @@ -53,37 +53,41 @@ {include file="bitpackage:contact/edit_type_header.tpl"} + {if $pageInfo.name or $pageInfo.contact_types.0.content_id or !isset( $pageInfo.contact_types ) } +
+ {formlabel label="Title" for="prefix"} + {forminput} + + {/forminput} +
+
+ {formlabel label="Forename" for="forename"} + {forminput} + + {/forminput} +
+
+ {formlabel label="Surname" for="surname"} + {forminput} + + {/forminput} +
+
+ {formlabel label="Suffix" for="suffix"} + {forminput} + + {/forminput} +
+ {/if} + {if $pageInfo.organisation or $pageInfo.contact_types.1.content_id or !isset( $pageInfo.contact_types ) } +
+ {formlabel label="Organisation" for="organisation"} + {forminput} + + {/forminput} +
+ {/if} {*
- {formlabel label="Title" for="prefix"} - {forminput} - - {/forminput} -
-
- {formlabel label="Forename" for="forename"} - {forminput} - - {/forminput} -
-
- {formlabel label="Surname" for="surname"} - {forminput} - - {/forminput} -
-
- {formlabel label="Suffix" for="suffix"} - {forminput} - - {/forminput} -
-
- {formlabel label="Organisation" for="organisation"} - {forminput} - - {/forminput} -
-
{formlabel label="NI Number" for="nino"} {forminput} -- cgit v1.3