|
|
|
|
File: [Development] / p2rx-programs / dsp_addnewcontact.cfm
(download)
Revision: 1.3, Fri Aug 26 16:08:19 2005 UTC (4 years, 2 months ago) by pKanel Branch: MAIN CVS Tags: HEAD Changes since 1.2: +36 -71 lines Enhancements made to resolve programs added or udpated by Outsite users. |
<!--- Name: dsp_addnewcontact.cfm
Purpose: It helps to add new organization in your program database. It also transfers
all the form variable values to act_addcontact.cfm where the actual action of inserting the data
into the table(dcontacts) takes place.
Date created: 03/06/2005
Dependancy: URL.orgid
Variables: getOrgID.OrganizationName and GetOrgID.OrgId are used to display newly added organization name and ID.
Primary - Primary contact or not
FirstName - First Name of the contact(Required)
Middle - Middle name of the contact if applicable.
LastName - Phone Number of the organization (Required)
NameSuffix - Suffix such as Mr, Mrs or Miss
Title - Title of the contact
Address - Postal address of the contact
City- Contact's city name
Zip - Zip code for the contact's address
Country - Country of official residence.
WorkPhone_Area - Work Phone Area Number of the contact
WorkPhone_Prefix - Work Phone Prefix of the contact
WorkPhone_Num - Work Phone Number of the contact
WorkExtension - Extension if applicable
FaxNumber_Area - Fax Area Number of the contact
FaxNumber_Prefix - Fax Number Prefix of the contact
FaxNumber_Num - Fax Number of the contact
MobilePhone_Area - Mobile Phone Area of the contact
MobilePhone_Prefix - Mobile Phone Prefix of the contact
MobilePhone_Num - Mobile Phone Number of the contact
EmailName - Email of the contact
Functions:
Date changed:
03/1/2005 Prabin,Neena Created, Documentation
03/25/2005 Neena Made changes so the existing contact state and country info is passed on to the next new contact being added.
--->
<cfoutput>
<cfquery name="GetOrgID" datasource="#ProgramsDB#">
Select Orgid,Organizationname
From dOrganization
Where orgid = #URL.orgid#
</cfquery>
</cfoutput>
<cfquery name="contactinfo" datasource="#ProgramsDB#">
Select *
From dOrganization
Where orgid = #getorgid.orgid#
</cfquery>
<table width="100%" border="0" cellspacing="0" cellpadding="10" name="text">
<tr>
<td>
<p>
<span class="subheading">
ADD A PROGRAM <!--- <img src="../images/siteimage/dart.gif" border="0"> --->
CONTACT PERSON INFO <!--- <img src="../images/siteimage/dart.gif" border="0"> ---></span>
<span class="sublink2">Step 2 <!--- <img src="../images/siteimage/dart.gif" border="0"> ---></span><br><br>
<span class="redtext"><font style="color: red">* Required Fields</font></span><br><br>
<cfoutput>Organization Name: <strong>#getORGID.OrganizationName#</strong></cfoutput><br><br>
<cfif #URL.fuseaction# is "AddNewContacts">
<form name="addContact" action="addeditprograms.cfm?fuseaction=AddMoreContacts&OrgID=<cfoutput>#URL.OrgID#</cfoutput>" onsubmit="return namevalidate(addContact)" method="post">
<cfelseif #URL.fuseaction# is "AddNewContacts1">
<form name="addContact" action="addeditprograms.cfm?fuseaction=AddMoreContacts1&OrgID=<cfoutput>#URL.OrgID#</cfoutput>" onsubmit="return namevalidate(addContact)" method="post">
</cfif>
<table width="95%" border="0" cellspacing="0" cellpadding="5" bgcolor="#F4FFE9">
<tr>
<td><div class="formtext">Primary ? <font style="color: red" size="-1">* </font><a href="javascript:newWindow ('help1.cfm')"><font style="color: red" size="-1">Help</font></a></td>
<td><input type="checkbox" name="Primary" value="1"></div></td>
</tr>
<cfoutput query="contactinfo">
<cfset fax=#contactinfo.faxNumber#>
<tr>
<td><div class="formtext">Prefix</td>
<td><input type="text" name="Prefix" size="4"></div>
<input type="hidden" size="3" name="statename" value="#contactinfo.StateOrProvince#"></td>
</tr>
<tr>
<td><div class="formtext">First Name <font style="color: red">*</font></td>
<td><input type="text" size="15" name="FirstName" onfocus="return getStateOption('addContact')">
<input type="hidden" name="FirstName_required" value="Please enter contact person's first name, or enter 'n/a'.">
</td>
</tr>
<tr>
<td><div class="formtext">Middle</td>
<td><input type="text" size="1" name="Middle"></div></td>
</tr>
<tr>
<td><div class="formtext">Last Name <font style="color: red">*</font></td>
<td><input type="text" size="15" name="LastName">
<input type="hidden" name="LastName_required" value="Please enter contact person's last name, or enter 'n/a'.">
</td>
</tr>
<tr>
<td><div class="formtext">Suffix </td>
<td><input type="text" size="5" name="NameSuffix"></td>
</tr>
<tr>
<td><div class="formtext">Title</td>
<td><input type="text" size="20" name="Title"></td>
</tr>
<tr>
<td><div class="formtext">Address</td>
<td>
<input type="text" size="25" name="Address" value="#contactinfo.address1#">
</div>
</td>
</tr>
<tr>
<td><div class="formtext">City</td>
<td align="justified" nowrap>
<input type="text" size="25" name="City" value="#contactinfo.city#"></div>
</td>
</tr>
<tr>
<td><div class="formtext">State</td>
<td>
<select name="State">
<cfoutput query="getState">
<option value="#Abbr#" <cfif #Abbr# EQ #ContactInfo.stateOrProvince#> selected </cfif>>#State#</option>
</cfoutput>
</select>
</div>
</td>
</tr>
</cfouput>
<cfoutput query="contactinfo">
<tr>
<td><div class="formtext">Zip</td>
<td align="justified" nowrap>
<input type="text" size="10" name="Zip" value="#Contactinfo.postalcode#"></div>
</td>
</tr>
<tr>
<td><div class="formtext">Country </td>
<td><input type="text" size="18" name="Country" value="#Contactinfo.country#"></div>
</td>
</tr>
<cfset phone=#contactinfo.phone#>
<tr>
<td><div class="formtext">Work Phone</td>
<td><input type="Text" size="3" value="#gettoken(phone,1,"-")#" maxlength="3" name="WorkPhone_Area">-
<input type="Text" size="3" value="#gettoken(phone,2,"-")#" maxlength="3" name="WorkPhone_Prefix">-
<input type="Text" size="4" value="#gettoken(phone,3,"-")#" maxlength="4" name="WorkPhone_Num">
<font class="formtext">Ext.</font>
<input type="text" size="5" name="WorkExtension">
</td>
</tr>
<tr>
<td><div class="formtext">Fax</td>
<td><input type="Text" size="3" value="#gettoken(fax,1,"-")#" maxlength="3" name="FaxNumber_Area">-
<input type="Text" size="3" value="#gettoken(fax,1,"-")#" maxlength="3" name="FaxNumber_Prefix">-
<input type="Text" size="4" value="#gettoken(fax,1,"-")#" maxlength="4" name="FaxNumber_Num"></div>
</td>
</tr>
<tr>
<td><div class="formtext">Mobile Phone</td>
<td><input type="Text" size="3" maxlength="3" name="MobilePhone_Area">-
<input type="Text" size="3" maxlength="3" name="MobilePhone_Prefix">-
<input type="Text" size="4" maxlength="4" name="MobilePhone_Num"></div>
</td>
</tr>
<tr>
<td><div class="formtext">Email</td>
<td colspan="3"><input type="text" size="40" name="EmailName"></div></td>
</tr>
</cfoutput>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div class="formtext">
<INPUT type="submit" value="Add Contact">
<INPUT type="reset" value="Reset"></div>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</p>
<!--- <cfinclude template="../cfi/global_footer.cfm"> --->
| CVS Admin |
Powered by ViewCVS 1.0-dev |