Project Claire: intake contact list.html

From PikaDocs

 Valid XHTML 1.0!

Last modified: July 22, 2005

<!-- intake_contact_list.html = Prospective Client search results subtemplate -->
<!-- called from intake2.php at line 21 -->

<script type="text/javascript" src="/pika/js/pop_up_help.js"></script>
<script type="text/javascript" src="/pika/js/validation.js"></script>

<!-- "content-container" DIV -->

<div id="content-container">

    <!-- "side-content" DIV -->

    <div class="side-content">
	
        <h2>Prospective Client</h2>
		
        <form name="form1" method="get" action="%%[base_url]%%/intake2.php" onsubmit="return validate();">

            <!-- "side-form" DIV -->
            
            <div id="side-form">

                First name <br />
                <input type="text" name="first_name" value="%%[first_name]%%" tabindex="1" />
				
                Middle <br />
                <input type="text" name="middle_name" value="%%[middle_name]%%" tabindex="1" />
				
                Last | Org. name <br />
                <input type="text" name="last_name" value="%%[last_name]%%" tabindex="1" />
				
                Jr. - Sr. - etc. <br />
                <input id="suffix" type="text" name="extra_name" value="%%[extra_name]%%" tabindex="1" />
				
                DOB <br />
                <input id="dob" type="text" name="birth_date" onkeydown="pika_dob(this);" value="%%[birth_date]%%" maxlength="10" tabindex="1"onchange="return checkDate(this);" />

                SSN <br />
                <input id="ssn" type="text" name="ssn" onkeydown="pika_ssn(this);" value="%%[ssn]%%" maxlength="11" tabindex="1" />

                Phone <br />
                <input id="area-code" type="text" name="area_code" value="%%[area_code]%%" maxlength="3" tabindex="1" onkeyup="pika_area_code(this, 3, 'phone');" />
                <input id="phone" type="text" name="phone" onkeydown="pika_phone(this);" value="%%[phone]%%" maxlength="11" tabindex="1" />

            </div> <!-- "side-form" closing DIV -->

            <!-- "side-form-submit" DIV -->

            <div id="side-form-submit">

                <input type="hidden" name="order_field" value="%%[order_field]%%"onclick="return checkForm(this.form)" />
                <input type="hidden" name="order" value="%%[order]%%" />
                <input type="hidden" name="offset" value="%%[offset]%%" />
                <input class="button initial-intake" type="submit" name="dmodes" value="Search Records" tabindex="1" onmouseover="this.className='button button-hover'" onmouseout="this.className='button initial-intake'" title="Search for phonetic and literal matches only" />				
                <input class="button initial-intake" type="submit" name="dmodeb" value="Browse Contacts" tabindex="1" onmouseover="this.className='button button-hover'" onmouseout="this.className='button initial-intake'" title="Search and target Contact records" />

            </div> <!-- "side-form-submit" closing DIV -->

        </form> <!-- "side-content" closing FORM -->

    </div> <!-- "side-content" closing DIV -->
	
    <!-- "main-content" DIV -->

    <div class="main-content"> <!-- "wrapper" for "main content" area -->
	
        <h2>Search Results</h2>
        
        %%[begin:intake_text]%%

        <p class="following">
        The following is a list of existing names in the Pika system. If <strong>%%[last_name]%%</strong> appears on this list, click the button below the name to view the <strong>Contact</strong>, begin a <strong>New Intake</strong> or create a <strong>New Case</strong> record.
        </p>

        %%[end:intake_text]%%

        %%[search_list]%% <!-- generates content for first TABLE with phonetic matches -->

        %%[ab_list]%% <!-- generates content for second TABLE with address book matches -->

        %%[begin:flex_header]%%
		
        <!-- "search-results" TABLE structure for "search_list" and "ab_list" -->
        
        <table class="intake-search-results" summary="Prospective client search results">
            
            <thead>
            <tr> <!-- first row = headings -->

                <th>&nbsp;</th>
                <th>Name</th>
                <th>Phone</th>
                <th>Birth Date</th>
                <th>SSN</th>
                <th class="last">City</th>
                
            </tr>
            </thead>
            
        %%[end:flex_header]%%

        %%[begin:flex_row]%%
			
            <tbody> <!-- opening TBODY content -->
            
            <tr class="row%%[row_class]%%"> <!-- second row = zebra rows of returned results -->
            
                <td>
                <img class="marker" src="%%[base_url]%%/images/square_point_large.gif" width="%%[arrow_img]%%" height="%%[arrow_img]%%" alt="Search marker" />
                </td>
			    
                <td>
                <a href="%%[base_url]%%/contact.php?contact_id=%%[contact_id]%%">%%[client_name]%%</a>
                </td>
                
                <td>
                %%[client_phone]%% %%[phone_notes]%%
                </td>
                
                <td>
                %%[birth_date]%%
                </td>
                
                <td>
                %%[ssn]%%
                </td>
                
                <td class="last">
                %%[city]%%
                </td>
                
            </tr>
            
            <tr class="row%%[row_class]%%"> <!-- third row = view options + [role] -->
            
                <td class="row-bottom">&nbsp;</td> <!-- empty first cell in each row -->
                
                <td class="row-bottom" colspan="4"> <!-- options for viewing records + Help -->

                    <a class="options first-option" href='%%[base_url]%%/contacts.php/%%[contact_id]%%/'>View Contact</a>
                    <a class="options" href='%%[base_url]%%/ops/new_intake.php?thiscon=%%[contact_id]%%'>New Intake</a>
                    <a class="options" href='%%[base_url]%%/ops/new_case.php?thiscon=%%[contact_id]%%'>New Case</a>
                    <a class="options" href="javascript:popUp('%%[base_url]%%/helpdocs/help_prospective.html')" title="Click for Help about these options">?</a>

                </td>
                
                <td class="row-bottom last">
                %%[role]%%
                </td>
		    	
            </tr>
            
        %%[end:flex_row]%%
            
        %%[begin:flex_footer]%%
        
            </tbody> <!-- closing TBODY content -->
            
        </table> <!-- "search-results" closing TABLE -->
            
        %%[end:flex_footer]%%
            
        %%[begin:new_contact_link]%%

        <!-- new block-level element below search returns -->

        <h2 id="create">Create a New Client Record</h2>
		
        <p class="following">
        ... or click <b>Continue</b> to automatically enter <strong>%%[last_name]%%'s</strong> information into a new record.
        </p>

        <!-- pass search keywords to new case record -->


        <!-- FORM "autocomplete" attribute = IE proprietary -->
        <form action="%%[base_url]%%/ops/new_intake.php" method="get" autocomplete="off">

            <p>

                <input type="hidden" name="newcon" value="1" />
                <input type="hidden" name="first_name" value="%%[first_name]%%" />
                <input type="hidden" name="middle_name" value="%%[middle_name]%%" />
                <input type="hidden" name="last_name" value="%%[last_name]%%" />
                <input type="hidden" name="extra_name" value="%%[extra_name]%%" />
                <input type="hidden" name="birth_date" value="%%[birth_date]%%" />
                <input type="hidden" name="ssn" value="%%[ssn]%%" />
                <input type="hidden" name="area_code" value="%%[area_code]%%" />
                <input type="hidden" name="phone" value="%%[phone]%%" />
                <input id="continue" class="button initial-intake" type="submit" value="Continue" tabindex="1" onmouseover="this.className='button button-hover'" onmouseout="this.className='button initial-intake'" />

            </p>

        </form>

        %%[end:new_contact_link]%%

    </div> <!-- "main-content" closing DIV -->
	
</div> <!-- "content-container" closing DIV -->



<!-- additional validation scripts -->

<script type="text/javascript">
<!-- 
var old_ssn_length = 0;
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;
}
var ac_autotab_on = 1;
var old_dob_length = 0;
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_area_code(what, max, field_name)
{	
	if (max > 0 && what.value.length >= max && ac_autotab_on == 1)
	{
		eval('document.form1.' + field_name + '.focus()');
	}
	if (what.value.length >= 3)
	{
		ac_autotab_on = 0;
	}
	else if (what.value.length == 0)
	{
		ac_autotab_on = 1;
	}
	return;
}
var old_phone_length = 0;
function pika_phone(what)
{
	if (what.value.length == 3 && old_phone_length == 2)
	{
		what.value += '-';
	}
	old_phone_length = what.value.length;
}
document.form1.first_name.focus();
// -->
</script>


Return to Table of Contents

Related articles and files: