Advertisement
aenila

Custom Object Custom Edit Page - Insurance Cert

Nov 20th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 7.32 KB | None | 0 0
  1. <apex:page standardController="certificateOfInsurance__c" extensions="editICController" >
  2.     <apex:messages />
  3.     <apex:form id="theForm">
  4.         <h2>
  5.             Hello, {!$User.FirstName}!
  6.         </h2>
  7.        
  8.         <apex:pageBlock title="General Info(Please fill all required fields to continue)">
  9.             <apex:pageBlockButtons location="Top">
  10.                 <apex:commandButton action="{!createCert}" value="Save"/>
  11.                 <!--<apex:commandButton action="{!andNew}" value="Save and New" rerender="theForm"/>-->
  12.                 <apex:commandButton action="{!Cancel}" value="Cancel"/>
  13.             </apex:pageBlockButtons>
  14.             <apex:pageBlockSection title="Contact Details">
  15.                 <apex:inputField value="{!certificateOfInsurance__c.Policy_Holder2__c}">
  16.                     <apex:actionSupport event="onchange" action="{!checkContactInfo}" rerender="coverageInfo"/>
  17.                 </apex:inputField>
  18.                 <apex:inputField value="{!certificateOfInsurance__c.Primary_Contact__c}">
  19.                     <apex:actionSupport event="onchange" action="{!checkContactInfo}" rerender="coverageInfo"/>
  20.                 </apex:inputField>
  21.                 <apex:inputField label="Phone" value="{!certificateOfInsurance__c.Phone__c}">
  22.                     <apex:actionSupport event="onchange" action="{!checkContactInfo}" rerender="coverageInfo"/>
  23.                 </apex:inputField>
  24.                 <apex:inputField label="Email" value="{!certificateOfInsurance__c.Email__c}"/>
  25.                 <apex:inputField label="Fax" value="{!certificateOfInsurance__c.Fax__c}"/>
  26.             </apex:pageBlockSection>
  27.             <apex:pageBlockSection title="Mailing Address">
  28.                 <apex:inputField value="{!certificateOfInsurance__c.Street_Address__c}">
  29.                     <apex:actionSupport event="onchange" action="{!checkContactInfo}" rerender="coverageInfo"/>
  30.                 </apex:inputField>
  31.                 <apex:inputField value="{!certificateOfInsurance__c.City__c}">
  32.                     <apex:actionSupport event="onchange" action="{!checkContactInfo}" rerender="coverageInfo"/>
  33.                 </apex:inputField>
  34.                 <apex:inputField value="{!certificateOfInsurance__c.Line_2__c}"/>
  35.                 <apex:inputField value="{!certificateOfInsurance__c.State__c}">
  36.                     <apex:actionSupport event="onchange" action="{!checkContactInfo}" rerender="coverageInfo"/>
  37.                 </apex:inputField>
  38.                 <apex:inputField value="{!certificateOfInsurance__c.Country__c}">
  39.                     <apex:actionSupport event="onchange" action="{!checkContactInfo}" rerender="coverageInfo"/>
  40.                 </apex:inputField>
  41.                 <apex:inputField value="{!certificateOfInsurance__c.Postal_Code__c}"/>
  42.             </apex:pageBlockSection>
  43.         </apex:pageBlock>
  44.         <apex:outputPanel id="coverageInfo">
  45.         <apex:pageBlock title="Coverage Selection" rendered="{!contactDone}">
  46.             <apex:pageBlockSection title="Coverage Types">
  47.                 <apex:inputField value="{!certificateOfInsurance__c.Automobile_Liability__c}">
  48.                    
  49.                     <apex:actionSupport event="onchange" rerender="AutoCoverage"/>
  50.                 </apex:inputField>
  51.                 <apex:inputField value="{!certificateOfInsurance__c.Commercial_General_Liability__c}">
  52.                     <apex:actionSupport event="onchange" rerender="GeneralCoverage"/>
  53.                 </apex:inputField>
  54.                 <apex:inputField value="{!certificateOfInsurance__c.Umbrella_Liability__c}">
  55.                     <apex:actionSupport event="onchange" rerender="umbrella"/>
  56.                 </apex:inputField>
  57.                 <apex:inputField value="{!certificateOfINsurance__c.single_multiple_property__c}" required="{!contactDone}"/>
  58.             </apex:pageBlockSection>
  59.            
  60.         </apex:pageBlock>
  61.        
  62.            
  63.         <apex:pageBlock title="Coverage Details" id="Details" rendered="{!contactDone}">
  64.             <apex:pageBlockButtons location="Bottom">
  65.                 <apex:commandButton action="{!createCert}" value="Save"/>
  66.                 <!--<apex:commandButton action="{!andNew}" value="Save and New"/>-->
  67.                 <apex:commandButton action="{!Cancel}" value="Cancel"/>
  68.             </apex:pageBlockButtons>
  69.             <apex:outputPanel id="AutoCoverage">
  70.             <apex:pageBlockSection title="Auto Coverage(All Fields Required)" id="auto" rendered="{!certificateOfInsurance__c.Automobile_Liability__c}" >
  71.                 <apex:inputField value="{!certificateOfInsurance__c.Combined_Single_Limit_Ea_accident__c}" />
  72.                 <apex:inputField value="{!certificateOfInsurance__c.Bodily_Injury_Per_person__c}" />
  73.                 <apex:inputField value="{!certificateOfInsurance__c.Bodily_Injury_Per_accident__c}" />
  74.                 <apex:inputField value="{!certificateOfInsurance__c.Property_Damage_Per_accident__c}" />
  75.                 <apex:inputField value="{!certificateOfInsurance__c.Auto_Effective_Date__c}" />
  76.                 <apex:inputField value="{!certificateOfInsurance__c.Auto_Expiration_Date__c}" />
  77.                 <apex:inputField value="{!certificateOfInsurance__c.Covered_Vehicles__c}" />
  78.                 <apex:inputField value="{!certificateOfInsurance__c.Auto_Deductible__c}" />
  79.             </apex:pageBlockSection>
  80.             </apex:outputPanel>
  81.             <apex:outputPanel id="GeneralCoverage">
  82.             <apex:pageBlockSection title="Commercial General Liability Coverages(All Fields Required)" id="general" rendered="{!certificateOfInsurance__c.Commercial_General_Liability__c}">
  83.                 <apex:inputField value="{!certificateOfInsurance__c.GL_Each_Occurrence__c}"/>
  84.                 <apex:inputField value="{!certificateOfInsurance__c.Medical_Expenses__c}"/>
  85.                 <apex:inputField value="{!certificateOfInsurance__c.Personal_Adv_Injury__c}"/>
  86.                 <apex:inputField value="{!certificateOfInsurance__c.General_Aggregate__c}"/>
  87.                 <apex:inputField value="{!certificateOfInsurance__c.Products_Comp__c}"/>
  88.                 <apex:inputField value="{!certificateOfInsurance__c.General_Aggregate_Limit__c}"/>
  89.                 <apex:inputField value="{!certificateOfInsurance__c.GL_effective_date__c}"/>
  90.                 <apex:inputField value="{!certificateOfInsurance__c.GL_expiration_date__c}"/>
  91.                 <apex:inputField value="{!certificateOfInsurance__c.GL_Deductible__c}"/>
  92.             </apex:pageBlockSection>
  93.                 </apex:outputPanel>
  94.             <apex:outputPanel id="umbrella">
  95.                 <apex:pageBlockSection title="Umbrella Liability(All Fields Required)" rendered="{!certificateOfInsurance__c.Umbrella_Liability__c}">
  96.                     <apex:inputField value="{!certificateOfInsurance__c.Umbrella_Each_Occurrence__c}"/>
  97.                     <apex:inputField value="{!certificateOfInsurance__c.Aggregate__c}"/>
  98.                     <apex:inputField value="{!certificateOfInsurance__c.Umbrella_Effective_Date__c}"/>
  99.                     <apex:inputField value="{!certificateOfInsurance__c.Umbrella_Expiration_Date__c}"/>
  100.                     <apex:inputField value="{!certificateOfInsurance__c.Umbrella_Deductible__c}"/>
  101.                 </apex:pageBlockSection>
  102.                 </apex:outputPanel>
  103.         </apex:pageBlock>
  104.            </apex:outputPanel>
  105.     </apex:form>
  106. </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement