summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-27 16:27:59 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-27 16:27:59 +0100
commit6f5e5e15c078bd0f61e224da08eadf1da9bbf992 (patch)
tree0ec091fada856c1c48b24fba1d140b7651c28d92 /templates
parent620f081325c4e181a011781b5e72d251079b4271 (diff)
downloadcontact-6f5e5e15c078bd0f61e224da08eadf1da9bbf992.tar.gz
contact-6f5e5e15c078bd0f61e224da08eadf1da9bbf992.tar.bz2
contact-6f5e5e15c078bd0f61e224da08eadf1da9bbf992.zip
Fix Firebird/PDO compatibility and strip Cotswold Security remnants
- Fix LOCALTIMESTAMP default in contact_address (CURRENT_TIMESTAMP caused timezone error with Firebird 4+ / PDO session having no timezone set) - Add xref_id sequence call to all liberty_xref INSERTs in Contact::store() - Add CONTACT_PKG_CLASS_PATH so getLibertyObject resolves Contact class - Fix LibertyXref date fields: format Unix timestamps as Y-m-d H:i:s before INSERT; use null instead of empty string for nullable TIMESTAMP columns - Remove Contract/Key Number column from list and edit templates - Remove find_key search box and getContractList() method - Remove alarm and council xref groups and items from schema seed - Add SCREF (Stock Source Reference) to links xref group seed - Archive and git-remove Cotswold-specific templates and list_contracts.php - Clean up contact_header: remove xkey prefix, restore plain title display - Browser title now shows contact name instead of generic "Contact Information" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/contact_header.tpl12
-rwxr-xr-xtemplates/display_list_header.tpl1
-rwxr-xr-xtemplates/edit.tpl7
-rwxr-xr-xtemplates/edit_key_break.tpl57
-rwxr-xr-xtemplates/edit_xref_key_seal_fields.tpl19
-rwxr-xr-xtemplates/list.tpl6
-rwxr-xr-xtemplates/list1.tpl76
-rwxr-xr-xtemplates/list_contracts.tpl78
-rwxr-xr-xtemplates/view_xref_key_seal.tpl75
9 files changed, 1 insertions, 330 deletions
diff --git a/templates/contact_header.tpl b/templates/contact_header.tpl
index bcc680a..4487ff7 100755
--- a/templates/contact_header.tpl
+++ b/templates/contact_header.tpl
@@ -5,17 +5,7 @@
</div> {* end category *}
{/if}
- <h1>{$gContent->mInfo.xkey}&nbsp;-&nbsp;
-{* {if isset(gContent->mInfo.organisation) && (gContent->mInfo.organisation <> '') }
- {$gContent->mInfo.organisation}
- {elseif isset(gContent->mInfo.surname) && (gContent->mInfo.surname <> '') }
- {$gContent->mInfo.prefix}&nbsp;
- {$gContent->mInfo.forename}&nbsp;
- {$gContent->mInfo.surname}
- {else} *}
- {$gContent->mInfo.title}
-{* {/if} *}
- </h1>
+ <h1>{$gContent->mInfo.title}</h1>
<div class="description">{$gContent->mInfo.description|default:''}</div>
</div> {* end .header *}
diff --git a/templates/display_list_header.tpl b/templates/display_list_header.tpl
index 58269be..c79cee3 100755
--- a/templates/display_list_header.tpl
+++ b/templates/display_list_header.tpl
@@ -5,7 +5,6 @@
{/foreach}
<input type="hidden" name="sort_mode" value="{$sort_mode|default:$smarty.request.sort_mode}" />
- <label class="col-md-1 col-sm-3 col-xs-12">{tr}Key{/tr}:&nbsp;<input size="4" type="text" name="find_key" value="{$find_key|default:$smarty.request.find_key|escape}" /></label>
<label class="col-md-3 col-sm-3 col-xs-12">{tr}Title{/tr}:&nbsp;<input size="20" type="text" name="find_title" value="{$find_title|default:$smarty.request.find_title|escape}" /></label>
<label class="col-md-3 col-sm-3 col-xs-12">{tr}Location{/tr}:&nbsp;<input size="20" type="text" name="find_location" value="{$find_location|default:$smarty.request.find_location|escape}" /></label>
<label class="col-md-2 col-sm-3 col-xs-12">{tr}Postcode{/tr}:&nbsp;<input size="10" type="text" name="find_postcode" value="{$find_postcode|default:$smarty.request.find_postcode|escape}" /></label>
diff --git a/templates/edit.tpl b/templates/edit.tpl
index 65b6627..82a7086 100755
--- a/templates/edit.tpl
+++ b/templates/edit.tpl
@@ -94,13 +94,6 @@
{/if}
{* include edit_personal.tpl *}
- <div class="form-group">
- {formlabel label="Key Number" for="xkey"}
- {forminput}
- <input size="10" type="text" name="xkey" id="xkey" value="{$gContent->mInfo.xkey|escape}" />
- {/forminput}
- <div class="clear"></div>
- </div>
<div class="form-group">
{formlabel label="Note" for="description"}
diff --git a/templates/edit_key_break.tpl b/templates/edit_key_break.tpl
deleted file mode 100755
index bb070af..0000000
--- a/templates/edit_key_break.tpl
+++ /dev/null
@@ -1,57 +0,0 @@
-{strip}
-<div class="floaticon">{bithelp}</div>
-<div class="edit contact_xref">
- <div class="header">
- <h1>{tr}Edit Contact Xref{/tr}: {$title|escape}-{$xref_title|escape}</h1>
- </div>
-
- {formfeedback hash=$feedback}
- {formfeedback warning=$errors.title}
-
- <div class="body">
- {form enctype="multipart/form-data" id="writexref"}
- <input type="hidden" name="content_id" value="{$xrefInfo.content_id}" />
- <input type="hidden" name="xref_id" value="{$xrefInfo.xref_id}" />
-
- {legend legend="Break Seal Contents"}
- <div class="form-group">
- {formlabel label="Seal Break Job Reference" for="xref"}
- {forminput}
- <input type="text" name="xref" id="xref" value="{$xrefInfo.xref|escape}" />
- {formhelp note="Link to job that caused seal break."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="Reference Key" for="xkey"}
- {forminput}
- <input type="text" name="xkey" id="xkey" value="{$xrefInfo.xkey|escape}" />
- {formhelp note="ID Key use to access data in other systems identified by the xref type."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="Reference Text" for="xkey_ext"}
- {forminput}
- <input type="text" name="xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" />
- {formhelp note="Variable text element such as url or email address."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- {formlabel label="Reference Notes" for="data"}
- {capture assign=textarea_help}
- {tr}Keep the text attached to reference items short and use comment records to add larger volumns of text. This should be reserved for simple notes such 'as use after 5PM' or the link.{/tr}
- {/capture}
- {textarea rows=5 noformat=1 id="edittext" nowysiwyg="yes" edit=$xrefInfo.data}
- {/legend}
- <div class="form-group submit">
- <input type="submit" name="fCancel" value="{tr}Cancel{/tr}" />&nbsp;
- <input type="submit" name="fSaveXref" value="{tr}Save{/tr}" />
- </div>
- {/form}
- </div><!-- end .body -->
-</div><!-- end .article -->
-{/strip}
diff --git a/templates/edit_xref_key_seal_fields.tpl b/templates/edit_xref_key_seal_fields.tpl
deleted file mode 100755
index 75f805d..0000000
--- a/templates/edit_xref_key_seal_fields.tpl
+++ /dev/null
@@ -1,19 +0,0 @@
-{strip}
-<div class="form-group">
- {formlabel label="Key Seal Code" for="`$output`xkey"}
- {forminput}
- <input type="text" name="{$output}xkey" id="xkey" value="{$xrefInfo.xkey|escape}" />
- {formhelp note="Key Seal Code from key management system."}
- {/forminput}
- <div class="clear"></div>
-</div>
-
-<div class="form-group">
- {formlabel label="Contract Number" for="`$output`xkey_ext"}
- {forminput}
- <input type="text" name="{$output}xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" />
- {formhelp note="Contract number."}
- {/forminput}
- <div class="clear"></div>
-</div>
-{/strip}
diff --git a/templates/list.tpl b/templates/list.tpl
index 430ad80..fed9c8a 100755
--- a/templates/list.tpl
+++ b/templates/list.tpl
@@ -14,17 +14,11 @@
<table class="col-xs-12">
<caption>{tr}Available Content{/tr} <span class="total">[ {$listInfo.total_records} ]</span></caption>
<tr>
- <th class="width2p">{smartlink ititle="Contract" isort="xkey" ihash=$listInfo.ihash|default:''}</th>
<th>{smartlink ititle="Title" isort="title" idefault=1 iorder=desc ihash=$listInfo.ihash|default:''}</th>
<th>{smartlink ititle="Address" isort="street" ihash=$listInfo.ihash|default:''}</th>
</tr>
{section name=content loop=$listcontacts}
<tr class="first">
- <td class="alignright">
- <a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
- {$listcontacts[content].xkey}
- </a>
- </td>
<td class="alignleft">
<a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
{$listcontacts[content].title}
diff --git a/templates/list1.tpl b/templates/list1.tpl
deleted file mode 100755
index b9d08c4..0000000
--- a/templates/list1.tpl
+++ /dev/null
@@ -1,76 +0,0 @@
-{strip}
-
-<div class="floaticon">{bithelp}</div>
-
-<div class="listing contacts">
- <div class="header">
- <h1>{tr}Contacts{/tr}</h1>
- </div>
-
- <div class="body">
-
- {include file="bitpackage:contact/display_list_header1.tpl"}
- <div class="table-responsive">
- <table class="col-xs-12">
- <caption>{tr}Available Content{/tr} <span class="total">[ {$listInfo.total_records} ]</span></caption>
- <tr>
- <th class="width2p">{booticon ipackage="icons" iname="icon-link" iexplain="sort by"}</th>
- <th>{smartlink ititle="Contract" isort="xkey" ihash=$listInfo.ihash}</th>
- {* {if $gBitUser->hasPermission( 'p_liberty_view_all_status' )}
- <th>{smartlink ititle="Forename" isort="forename" ihash=$listInfo.ihash}</th>
- <th>{smartlink ititle="Surname" isort="surname" ihash=$listInfo.ihash}</th>
- {/if} *}
- <th>{smartlink ititle="Title" isort="title" idefault=1 iorder=desc ihash=$listInfo.ihash}</th>
- <th>{smartlink ititle="Address" isort="street" ihash=$listInfo.ihash}</th>
- </tr>
- {section name=content loop=$listcontacts}
- <tr class="first">
- <td class="alignright">
- <a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
- {$listcontacts[content].xkey}
- </a>
- </td>
- <td class="alignleft">
- <a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
- {$listcontacts[content].title}
- </a>
- </td>
- <td>{if isset($listcontacts[content].house) && ($listcontacts[content].house <> '') }
- {$listcontacts[content].house},&nbsp;{/if}
- {if isset($listcontacts[content].add1) && ($listcontacts[content].add1 <> '') }
- {$listcontacts[content].add1},&nbsp;{/if}
- {if isset($listcontacts[content].add2) && ($listcontacts[content].add2 <> '') }
- {$listcontacts[content].add2},&nbsp;{/if}
- {if isset($listcontacts[content].add3) && ($listcontacts[content].add3 <> '') }
- {$listcontacts[content].add3},&nbsp;{/if}
- {if isset($listcontacts[content].add4) && ($listcontacts[content].add4 <> '') }
- {$listcontacts[content].add4},&nbsp;{/if}
- {if isset($listcontacts[content].town) && ($listcontacts[content].town <> '') }
- {$listcontacts[content].town},&nbsp;{/if}
- {$listcontacts[content].postcode}</td>
- </tr>
- <tr class="second">
- <td>{$item.display_link}</td>
- <td>{assign var=content_type_guid value=$item.content_type_guid}{$gLibertySystem->getContentTypeName($content_type_guid)}</td>
- <td>
- {tr}Refs{/tr}: {$listcontacts[content].refs|default:0}&nbsp;&nbsp;
- {tr}Tasks{/tr}: {$listcontacts[content].tasks|default:0}&nbsp;&nbsp;
- {tr}Addresses{/tr}: {$listcontacts[content].addresses|default:0}
- </td>
- {if $gBitUser->hasPermission( 'p_liberty_view_all_status' )}
- <td>{if isset($listcontacts[content].dob) && ($listcontacts[content].dob <> '') }DOB: {$listcontacts[content].dob}{/if}</td>
- <td>{if isset($listcontacts[content].nino) && ($listcontacts[content].nino <> '') }NI: {$listcontacts[content].nino}{/if}</td>
- {/if}
- </tr>
- {sectionelse}
- <tr class="norecords">
- <td colspan="8">{tr}No records found{/tr}</td>
- </tr>
- {/section}
- </table>
- </div>
- {pagination}
- </div><!-- end .body -->
-</div><!-- end .contacts -->
-
-{/strip}
diff --git a/templates/list_contracts.tpl b/templates/list_contracts.tpl
deleted file mode 100755
index 1bfc040..0000000
--- a/templates/list_contracts.tpl
+++ /dev/null
@@ -1,78 +0,0 @@
-{* $Header: /cvsroot/bitweaver/_bit_contact/templates/list_contact.tpl,v 1.3 2010/02/09 17:21:21 wjames5 Exp $ *}
-<div class="floaticon">
- {if $gBitUser->hasPermission('p_contact_admin')}
- <a title="{tr}configure listing{/tr}" href="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?page=contact">{biticon ipackage="icons" iname="document-properties" iexplain="configure"}</a>
- {/if}
- {bithelp}
-</div>
-
-<div class="admin contact">
-<div class="header">
-<h1><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?contract=2">{tr}Contract Records{/tr}</a></h1>
-</div>
-
-<div class="body">
-
-{*
-<table class="find">
-<tr><td>{tr}Find{/tr}</td>
- <td>
- <form method="get" action="{$gBitLoc.CONTACT_PKG_URL}list_contacts.php">
- <input type="text" name="find" value="{$listInfo.find|escape}" />
- <input type="submit" name="search" value="{tr}find{/tr}" />
- <input type="hidden" name="sort_mode" value="{$listInfo.sort_mode|escape}" />
- </form>
- </td>
-</tr>
-</table>
-*}
-
-<form id="checkform" method="post" action="{$smarty.server.PHP_SELF}">
-<input type="hidden" name="offset" value="{$listInfo.offset|escape}" />
-<input type="hidden" name="sort_mode" value="{$listInfo.sort_mode|escape}" />
-<table class="data">
-<tr>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'contract_desc'}contract_asc{else}contract_desc{/if}">{tr}Contract Number{/tr}</a></th>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'content_id_desc'}content_id_asc{else}content_id_desc{/if}">{tr}Contact Id{/tr}</a></th>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'title_desc'}title_asc{else}title_desc{/if}">{tr}Title{/tr}</a></th>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'town_desc'}town_asc{else}town_desc{/if}">{tr}Town{/tr}</a></th>
- <th style="text-align:center;"><a href="{$gBitLoc.CONTACT_PKG_URL}list_contracts.php?offset={$listInfo.offset}&amp;sort_mode={if $listInfo.sort_mode eq 'postcode_desc'}postcode_asc{else}postcode_desc{/if}">{tr}Postcode{/tr}</a></th>
-</tr>
-
-{cycle values="even,odd" print=false}
-{section name=changes loop=$list}
-<tr class="{cycle}">
-<td style="text-align:center;">{$list[changes].contract}</td>
-<td><a href="{$gBitLoc.CONTACT_PKG_URL}index.php?content_id={$list[changes].content_id|escape:"url"}" title="{$list[changes].content_id}">{$list[changes].content_id|truncate:20:"...":true}</a>
- {if $gBitUser->hasPermission('p_edit_contact')}
- <br />(<a href="{$gBitLoc.CONTACT_PKG_URL}edit.php?content_id={$list[changes].content_id|escape:"url"}">{tr}edit{/tr}</a>)
- {/if}
-</td>
-<td style="text-align:center;">{$list[changes].title}<br />
- {if isset($list[changes].house) && ($list[changes].house <> '') }
- {$list[changes].house},&nbsp;{/if}
- {if isset($list[changes].add1) && ($list[changes].add1 <> '') }
- {$list[changes].add1},&nbsp;{/if}
- {if isset($list[changes].add2) && ($list[changes].add2 <> '') }
- {$list[changes].add2},&nbsp;{/if}
- {if isset($list[changes].add3) && ($list[changes].add3 <> '') }
- {$list[changes].add3},&nbsp;{/if}
- {if isset($list[changes].add4) && ($list[changes].add4 <> '') }
- {$list[changes].add4},&nbsp;{/if}
-<td style="text-align:center;">{$list[changes].town}<br />
- {$list[changes].county}</td>
-<td style="text-align:center;">{$list[changes].postcode}</td>
-</tr>
-{sectionelse}
- <tr class="norecords"><td colspan="16">
- {tr}No records found{/tr}
- </td></tr>
-{/section}
-</table>
-</form>
-
-</div><!-- end .body -->
-
-{pagination}
-
-</div> {* end .admin *}
diff --git a/templates/view_xref_key_seal.tpl b/templates/view_xref_key_seal.tpl
deleted file mode 100755
index 883e758..0000000
--- a/templates/view_xref_key_seal.tpl
+++ /dev/null
@@ -1,75 +0,0 @@
-{strip}
-<div class="view contact_xref">
- <div class="header">
- <h1>{$xrefInfo.template_title|escape}: {$xref_title|escape} for {$title|escape}</h1>
- </div>
-
- <div class="body">
- {legend legend="Contents"}
- <div class="form-group">
- {formlabel label="`$xrefInfo.template_title`" for="xkey"}
- {forminput}
- {if $xrefInfo.xkey }
- {$xrefInfo.xkey|escape}
- {else}
- Not yet set
- {/if}
- {formhelp note="Key Seal Code from key management system."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="Contract Number" for="xkey_ext"}
- {forminput}
- {if $xrefInfo.xkey_ext }
- {$xrefInfo.xkey_ext|escape}
- {else}
- Not yet set
- {/if}
- {formhelp note="Contract number."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="`$xrefInfo.template_title` Notes" for="data"}
- {forminput}
- {$xrefInfo.data|escape}
- {formhelp note="Keep the text attached to reference items short and use comment records to add larger volumns of text. This should be reserved for simple notes such 'as use after 5PM' or the link."}
- {/forminput}
- <div class="clear"></div>
- </div>
- {/legend}
-
- {legend legend="Start and Stop Dates"}
- <div class="form-group">
- {formlabel label="Start Date" for=""}
- {forminput}
- {if $xrefInfo.ignore_start_date eq "y"}
- No start date set
- {else}
- {$xrefInfo.start_date|bit_long_datetime}
- {/if}
- {formhelp note="This key seal code becomes valid on this date."}
- {/forminput}
- <div class="clear"></div>
- </div>
-
- <div class="form-group">
- {formlabel label="End Date" for=""}
- {forminput}
- {if $xrefInfo.ignore_end_date eq "y"}
- No end date set
- {else}
- {$xrefInfo.end_date|bit_long_datetime}
- {/if}
- {formhelp note="This key seal code finishes on this date."}
- {/forminput}
- <div class="clear"></div>
- </div>
- {/legend}
- <a class="item" href="{$smarty.const.CONTACT_PKG_URL}index.php?content_id={$xrefInfo.content_id}">{tr}Return{/tr}</a>
- </div><!-- end .body -->
-</div><!-- end .article -->
-{/strip}