Project Claire: contact full.html
From PikaDocs
Last modified: July 26, 2005
<!-- contact_full.html = Contact Information subtemplate -->
<!-- called from intake.php at lines 235 and 254 -->
<!-- called from contact.php at lines 42, 91, 125 and 141 -->
<script type="text/javascript" src="/pika/js/pop_up_help.js"></script>
<script type="text/javascript" src="/pika/js/validation.js"></script>
<form action="%%[form_action]%%" name=fc method="post" onSubmit="return Require(this,'last_name,language,ethnicity,gender')">
<div class="content-container" id="contact-container">
<!-- "side-content" DIV -->
<div class="side-content">
<h2>Aliases</h2>
<!-- see contact.php at line 132 for "No aliases found." -->
%%[begin:alias]%%
<p>
Name: %%[full_name]%%<br />
SSN: %%[ssn]%%<br />
ID: %%[state_d]%%
</p>
%%[end:alias]%%
<ul>
<li><a href="%%[base_url]%%/alias.php?contact_id=%%[contact_id]%%">Add a new alias</a></li>
</ul>
<h2>Actions</h2>
<ul>
<li><a href="%%[base_url]%%/merge_contacts.php?contact_id=%%[contact_id]%%">Merge Duplicate Records for this Contact</a></li>
<li><a href="%%[base_url]%%/ops/new_case.php?thiscon=%%[contact_id]%%">Create a New Case for this Contact</a></li>
</ul>
</div> <!-- "side-content" closing DIV -->
<!-- "main-content" DIV -->
<div class="main-content"> <!-- "wrapper" for "main content" area -->
<h2>Contact Information</h2>
<!-- "contact01" DIV -->
<!-- name ... DOB ... SSN ... phone -->
<div class="contact01">
First name<br />
<input type=text name=first_name value="%%[first_name]%%" tabindex=1 />
<br />
Middle<br />
<input type=text name=middle_name value="%%[middle_name]%%" tabindex=1 />
<br />
Last | Org. name<br />
<input type=text name=last_name value="%%[last_name]%%" tabindex=1 />
<br />
Jr. - Sr. - etc.<br />
<input id="suffix" type=text name=extra_name value="%%[extra_name]%%" tabindex=1 />
<br />
DOB - Age<br/>
<input id="dob" type="text" name="birth_date"onkeydown="pika_dob(this);" value="%%[birth_date]%%" maxlength="10" tabindex="1" onblur="return checkDate(this),update_age();" />
<input id="age" type=text name="client_age" value="%%[client_age]%%" maxlength="3" tabindex="1" />
<br />
SSN<br />
<input id="ssn" type="text" name="ssn" onkeydown="pika_ssn(this);" value="%%[ssn]%%" maxlength="11" size="22" tabindex="1"/>
<br/>
Phone<br />
<input id="area-code" type="text" name="area_code" value="%%[area_code]%%" maxlength="3" tabindex="1" onkeydown="pika_area_code(this, 3, 'phone');"/>
<input id="phone" type="text" name="phone" onkeydown="pika_phone(this);" value="%%[phone]%%" maxlength="11" tabindex="1" />
</div> <!-- "contact01" closing DIV -->
<!-- "contact02" DIV -->
<!-- address ... e-mail -->
<div class="contact02">
Zip Code ~ County<br />
<input id="zip" type=text name="zip"onkeydown="pika_zip(this);"value="%%[zip]%%" maxlength="10" tabindex="1" onBlur="update_zip();" class="zip"/> <input id="county" type=text name="county" value="%%[county]%%" size=26 tabindex=1 class="county"/>
<br />
Address ~ line 1<br />
<input id="address" type=text name="address" value="%%[address]%%" size=30 tabindex=1/>
<br />
Address ~ line 2<br />
<input id="address" type=text name="address2" value="%%[address2]%%" size=30 tabindex=1/>
<br />
City ~ State<br />
<input id="city" type=text name="city" value="%%[city]%%" tabindex="1" class="city"/>
<input id="state" type=text name="state" value="%%[state]%%" size=3 tabindex=1 class="state"/>
<br />
E-mail<br />
<input id="email" type=text name="email" value="%%[email]%%" size=22 tabindex=1 onchange="return checkEmail(this)" />
</div> <!-- "contact02" closing DIV -->
<!-- "contact03" DIV -->
<!-- race ... langauge ... residence ... marital status ... gender -->
<div class="contact03">
Race - Ethnicity<br />
%%[ethnicity,ethnicity]%%
<br />
Language<br />
%%[language,language]%%
<br />
<br />
Residence<br />
%%[residence,residence]%%
<br />
Marital Status<br />
%%[marital,marital]%%
<br />
Gender<br />
%%[gender,gender]%%
</div> <!-- "contact03" closing DIV -->
<!-- "contact04" DIV -->
<!-- contact notes -->
<div class="contact04">
Contact Notes:<br />
<textarea id="contact-notes" name="notes" rows="5" tabindex=1>%%[notes]%%</textarea>
</div>
<input type=hidden name="contact_id" value="%%[contact_id]%%"/>
<input type=hidden name="case_id" value="%%[case_id]%%"/>
<input type=hidden name="screen" value="%%[screen]%%"/>
<input type=hidden name="intake_id" value="%%[intake_id]%%"/>
<input type=hidden name="relation_code" value="%%[relation_code]%%"/>
<input type=hidden name=action value="%%[action_name]%%"/>
<input type=hidden name="con_url" value="%%[con_url]%%"/>
<!-- save button -->
<div id="save-contact">
<input class="button initial-intake" type=submit value="%%[submit_label]%%" tabindex=1 name="submit2" accesskey="s" onmouseover="this.className='button button-hover'" onmouseout="this.className='button initial-intake'" />
</div>
</div> <!-- "main-content" closing DIV -->
</div> <!-- "content-container" closing DIV -->
</form> <!-- FORM closing DIV -->
<!-- "Case List ..." -->
<div class="table-container">
<h2 class="list-results">Case List ... %%[full_name]%%</h2>
%%[begin:flex_header]%%
<!-- "Case List" TABLE -->
<table class="list-results" summary="List of client case records">
<!-- THEAD/TH = headings -->
<thead>
<tr>
<th class="first">Role</th>
<th>Case Number</th>
<th>Atty.</th>
<th>Office</th>
<th>Open Date</th>
<th>Close Date</th>
<th>Closing Code</th>
<th>Status</th>
<th class="last">Code</th>
</tr>
</thead>
%%[end:flex_header]%%
%%[begin:flex_row]%%
<tbody> <!-- opening TBODY content -->
<!-- record: first row = returned results -->
<tr class="%%[css_class]%% results">
<td>%%[role]%%</td>
<td>%%[number]%%</td>
<td>%%[atty_name]%%</td>
<td>%%[office text]%%</td>
<td>%%[open_date]%%</td>
<td>%%[close_date]%%</td>
<td>%%[close_code text]%%</td>
<td>%%[status text source=case_status]%%</td>
<td class="last">%%[problem]%%</td>
</tr>
<!-- record: second row = options for viewing -->
<tr class="%%[css_class]%%">
<td class="row-bottom" colspan="7">
<a class="options first-option" href="%%[base_url]%%/cases.php/%%[case_id]%%/act/">Case Notes</a>
<a class="options" href="%%[base_url]%%/cases.php/%%[case_id]%%/elig/">Reopen</a>
<a class="options" href="%%[base_url]%%/ops/duplicate_case.php?case_id=%%[case_id]%%" onclick="return confirm('Are you sure you want to duplicate this case?');">Duplicate</a>
<a class="options" href="javascript:popUp('%%[base_url]%%/helpdocs/help_case_list.html')" title="Click for Help about these options">?</a>
</td>
<td class="row-bottom last" colspan="2">
<a class="options" href="%%[base_url]%%/cases.php/%%[case_id]%%/info/">Review Case</a>
<a class="options" href="javascript:popUp('%%[base_url]%%/helpdocs/help_case_list.html')" title="Click for Help about these options">?</a>
</td>
</tr>
</tbody> <!-- closing TBODY content -->
%%[end:flex_row]%%
%%[begin:flex_footer]%%
</table> <!-- "Case List" closing TABLE -->
%%[end:flex_footer]%%
<div class="clear-fix"></div>
<!-- Intake List ... -->
<h2 class="list-results">Intake List ... %%[full_name]%%</h2>
%%[begin:intake_header]%%
<!-- "Intake List" TABLE -->
<table class="list-results" summary="List of potential client intake records">
<!-- THEAD/TH = headings -->
<thead>
<tr>
<th class="first">Intake ID</th>
<th>Income</th>
<th>Assets</th>
<th>% of Poverty</th>
<th>Citizenship</th>
</tr>
</thead>
%%[end:intake_header]%%
%%[begin:intake_row]%%
<tbody> <!-- opening TBODY content -->
<tr class="%%[css_class]%%">
<td><a href="%%[base_url]%%/intakes.php/%%[intake_id]%%/">%%[intake_id]%%</a></td>
<td>$%%[income]%%</td>
<td>$%%[assets]%%</td>
<td>%%[poverty]%% %</td>
<td>%%[citizen text]%%</td>
</tr>
</tbody> <!-- closing TBODY content -->
%%[end:intake_row]%%
%%[begin:intake_footer]%%
</table> <!-- "Intake List" closing TABLE tag -->
</div> <!-- "table-container" closing DIV -->
%%[end:intake_footer]%%
<!-- additional validation scripts -->
<script type="text/javascript">
<!--
var old_ssn_length = 0;
var old_phone_length = 0;
var ac_autotab_on = 1;
var old_dob_length = 0;
var old_zip_length = 0;
function pika_area_code(what, max, field_name)
{
if (max > 0 && what.value.length >= max && ac_autotab_on == 1)
{
eval('document.fc.' + field_name + '.focus()');
}
if (what.value.length >= 3)
{
ac_autotab_on = 0;
}
else if (what.value.length == 0)
{
ac_autotab_on = 1;
}
return;
}
function pika_ssn(what)
{
if (what.value.length == 3 && old_ssn_length == 2)
{
what.value += '-';
}
if (what.value.length == 6 && old_ssn_length == 5)
{
what.value += '-';
}
old_ssn_length = what.value.length;
}
function pika_zip(what)
{
if (what.value.length == 5 && old_zip_length == 4)
{
what.value += '-';
}
old_zip_length = what.value.length;
}
function pika_dob(what)
{
if (what.value.length == 2 && old_dob_length == 1)
{
what.value += '/';
}
if (what.value.length == 5 && old_dob_length == 4)
{
what.value += '/';
}
old_dob_length = what.value.length;
}
var ac_autotab_on = 1;
function pika_phone(what)
{
if (what.value.length == 3 && old_phone_length == 2)
{
what.value += '-';
}
old_phone_length = what.value.length;
}
function checkEmail() {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(fc.email.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
return (true)
}
function Require(obForm,szFields)
{
var fields = szFields.split(",")
var szMissing= new Array();
for (x=0;x<fields.length;x++) {
if (obForm.elements[fields[x]].value.length==0) {
szMissing[szMissing.length]=new String(fields[x]);
}
}
if (szMissing.length) {
alert("The field"+((szMissing.length>1)?"s ":" ")+szMissing.join(",")+" must be filled in first");
return false
}
return true;
}
function update_zip()
{
parent.zipframe.location.href = 'zip-server.php?zip=' + document.fc.zip.value;
return;
}
function update_age()
{
parent.ageframe.location.href = 'age-server.php?birth_date=' + document.fc.birth_date.value;
return;
}
//-->
</script>
<script type="text/javascript">
<!--
document.fc.first_name.focus();
//-->
</script>
<!-- IFRAME elements -->
<iframe style="display: none" name="zipframe" src="zip-server.php"></iframe>
<iframe style="display: none" name="ageframe" src="age-server.php"></iframe>
Related articles and files:

