高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<apex:page standardController="Survey__c" extensions="SurveyManagerController" showHeader="true">
<apex:stylesheet value="{!$Page.labs_survey_css}" />
 
    
    <style>
    .activeTab {background-color: #236FBD; color:white; background-image:none}
    .inactiveTab { background-color: lightgrey; color:black; background-image:none}
    </style>
    <div id="labs_container">
    <h2><apex:outputtext value="{!Survey__c.Name}" id="surveyTitle" /></h2>
    </div>
    <!-- Create Tab panel --> 
    <apex:tabPanel switchType="client" selectedTab="name1" id="SurveyTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">
        <apex:tab label="{!$Label.LABS_SF_Share}" name="name1" id="tabOne">
            <c:viewShareSurveyComponent surveyId="{!Survey__c.Id}" id="shareComp" />
             <apex:actionSupport event="ontabenter" rerender="shareComp"/>
            
        </apex:tab>
        <apex:tab label="{!$Label.LABS_SF_Edit}" name="name4" id="tabFour">
                 <apex:iframe src="SurveyPage?id={!Survey__c.Id}" scrolling="True" id="editSurvey" />                           
        </apex:tab>
        <apex:tab label="{!$Label.LABS_SF_HeaderAndThankYou}" name="name2" id="tabTwo">
 
<apex:form >
        <apex:pageBlock mode="edit">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" id="saveButton" value="{!$Label.LABS_SF_Save}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection columns="1" >
                <apex:inputField value="{!Survey__c.Name}" />
                <apex:inputField value="{!Survey__c.Hide_Survey_Name__c}" />
                <apex:inputField value="{!Survey__c.Survey_Header__c}" />
                <apex:inputField value="{!Survey__c.Thank_You_Text__c}" />
                <apex:inputField value="{!Survey__c.Survey_Container_CSS__c}"  style="width: 70%;" rendered="{!editCSS}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>                
            
        </apex:tab>        
        <apex:tab label="{!$Label.LABS_SF_Results}" name="name3" id="tabThree">
            <c:viewSurveyResultsComponent surveyId="{!Survey__c.Id}" />
                         <apex:actionSupport event="onclick" rerender="tabThree"/>
            
        </apex:tab>
    </apex:tabPanel>
    
</apex:page>