<apex:page standardcontroller="Survey__c" extensions="SurveyAndQuestionController" cache="false" sidebar="false" showheader="false" id="thePage">
|
|
<apex:stylesheet value="{!$Page.labs_survey_css}" />
|
|
<apex:includeScript value="{!URLFOR($Resource.SurveyForce, 'jquery.js')}"/>
|
<script type="text/javascript" src="{!URLFOR($Resource.SurveyForce, 'survey_jui.js')}" ></script>
|
|
|
<style>
|
table tr{
|
width:200px;
|
border:1px;
|
}
|
|
form[id*="navBar"]{
|
position: relative;
|
background: #fff;
|
z-index: 10;
|
}
|
|
#navBarBg{
|
width: 100%;
|
height: 30px;
|
z-index: 9;
|
position: fixed;
|
top:0;
|
left: 0;
|
background: #fff;
|
display: none;
|
-moz-box-shadow:0 0 30px #000;
|
-webkit-box-shadow:0 0 30px #000;
|
}
|
|
#surveyMenu h4{
|
display: block;
|
margin-top: 10px;
|
}
|
|
</style>
|
<script src="/soap/ajax/32.0/connection.js" type="text/javascript"></script>
|
<script src="/soap/ajax/32.0/apex.js" type="text/javascript"></script>
|
<script>sforce.connection.sessionId = '{!$Api.Session_ID}'; </script>
|
<script type="text/javascript">
|
|
function confirmDelete(deleteId){
|
var r = confirm("{!$Label.LABS_SF_DelQuestion}");
|
if(r){
|
return true;
|
}
|
else
|
{
|
return false;
|
}
|
}
|
|
$(document).ready(function() {
|
|
// Displays overlays
|
$("a[rel]").overlay({oneInstance: 'false', mask:'#000', zIndex:'1000',
|
onLoad: function() {
|
if ($.browser.msie && $.browser.version == 7.0) {
|
$('#exposeMask').hide();
|
}
|
}
|
});
|
|
|
|
// setup h2#editMenu to work as tabs for each div directly under div#editSections
|
$("h2#editMenu").tabs("div#editSections > div", {tabs: 'span'});
|
|
$(window).scroll(function() {
|
if ($(this).scrollTop() > 148) {
|
$('#navBarBg').fadeIn(1000);
|
$('form[id*="navBar"]').css('position', "fixed");
|
$('form[id*="navBar"]').css('top', "4px");
|
$('form[id*="navBar"]').css('width', $('body').width()-40 + "px");
|
} else if ($(this).scrollTop() < 148){
|
$('#navBarBg').fadeOut(100);
|
$('form[id*="navBar"]').css('position', "relative");
|
$('form[id*="navBar"]').css('top', "0px");
|
}
|
});
|
|
$("#justQuestionList").sortable({
|
axis: 'y', opacity: .6, tolerance: 'pointer', revert: true,
|
update: function(event, ui) {
|
var elemParent = $('#justQuestionList');
|
var childrenList = elemParent.children();
|
var childIds = new Array();
|
var cIds = "";
|
for(var i=0; i<childrenList.length; i++){
|
cIds = cIds + childrenList[i].id + ",";
|
|
}
|
|
jQuery("input[id*='newOrderList']").val(cIds);
|
jQuery("a[id*='saveOrder']").effect("pulsate", { times: 2 }, 1000);
|
}
|
|
});
|
|
$("#surveyDeleteLink").click(function() {
|
if ($("#surveyDelete").css("display") == "none"){
|
$("#surveyDelete").fadeIn();
|
}
|
else
|
$("#surveyDelete").fadeOut();
|
});
|
|
$("#surveyCancelLink").click(function() {
|
$("#surveyDelete").fadeOut();
|
});
|
|
});
|
|
function resetSelect(){
|
$("select[id*='questionSelect']").val(0);
|
};
|
|
function checkRequired(bid) {
|
var q = document.getElementById("thePage:theForm:" + bid + ":qQuestion");
|
var c = document.getElementById("thePage:theForm:" + bid + ":qChoices");
|
var min = document.getElementById("thePage:theForm:" + bid + ":qMinLabel");
|
var max = document.getElementById("thePage:theForm:" + bid + ":qMaxLabel");
|
|
if (q != undefined && q.value == ""
|
||
|
c != undefined && c.value == ""
|
||
|
min != undefined && min.value == ""
|
||
|
max != undefined && max.value == "") {
|
alert("{!$Label.LABS_SF_EnterAllFields}");
|
return false;
|
}
|
|
controllerSavQuestion();
|
}
|
|
</script>
|
<div id="labs_container">
|
<div id="fade" class="black_overlay"></div>
|
|
<apex:form id="theForm">
|
|
<apex:actionFunction name="controllerSavQuestion" action="{!controllerSavQuestion}" />
|
|
<apex:pageMessages />
|
|
<apex:pageBlock >
|
<div id="navBarBg"></div>
|
|
<apex:outputPanel id="navBar">
|
<apex:commandLink styleclass="btn left" rel="#addQuestion" oncomplete="resetSelect(); return false;" action="{!makeNewQuestionLink}" value="{!$Label.LABS_SF_AddQuestion}" reRender="addQuestion"/>
|
<apex:commandLink id="saveOrder2" action="{!updateOrderList}" value="{!$Label.LABS_SF_SaveOrder}" styleclass="btn left"/>
|
<apex:inputHidden id="newOrderList" value="{!newOrderW}" />
|
<span id="alertOrderUpdated">The survey has been updated.</span>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
|
<div id="addQuestion" class="overlay">
|
<apex:outputPanel id="selectQuestionType" >
|
|
<span class="prompt">{!$Label.LABS_SF_SelectQuestionType}
|
<div id="topPickList">
|
<apex:selectList size="1" value="{!questionType}" id="questionSelect">
|
<apex:selectOptions value="{!questionTypeOptions}" />
|
<apex:actionSupport event="onchange" action="{!setupQuestionFields}" reRender="singleSelect, multiSelect, freeText, rowQuestion, picklist, singleText, scale, mail, phone"/>
|
</apex:selectList>
|
</div>
|
</span>
|
|
</apex:outputPanel>
|
|
<!-----------------------------------------Single Select Question------------------------------------------->
|
<apex:outputPanel id="singleSelect" >
|
<apex:pageBlock rendered="{!showSingleSelect}" id="singleSelectBlock">
|
<apex:outputPanel id="singleSelectForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<span class="prompt">{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/></span>
|
|
<span class="prompt">{!$Label.LABS_SF_PleaseEnterTheList}</span>
|
<apex:inputTextArea cols="40" rows="12" id="qChoices" value="{!qChoices}" title="Answers to question..."/>
|
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('singleSelectBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<!-----------------------------------------Multi Select Question------------------------------------------->
|
<apex:outputPanel id="multiSelect">
|
<apex:pageBlock rendered="{!showMultiSelect}" id="multiSelectBlock">
|
<apex:outputPanel id="multiSelectForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<span class="prompt">{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/></span>
|
|
<span class="prompt">{!$Label.LABS_SF_PleaseEnterTheList}</span>
|
<apex:inputTextArea cols="40" rows="12" id="qChoices" value="{!qChoices}" title="Answers to question..."/>
|
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('multiSelectBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<!-----------------------------------------Free Text Question----------------------------------------------->
|
<apex:outputPanel id="freeText">
|
<apex:pageBlock rendered="{!showFreeText}" id="freeTextBlock">
|
<apex:outputPanel id="freeTextForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<div class="prompt" style="float: none;">
|
{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/>
|
</div>
|
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('freeTextBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<!-----------------------------------------Row Question----------------------------------------------->
|
<apex:outputPanel id="rowQuestion">
|
<apex:pageBlock rendered="{!showRowQuestion}" id="rowQuestionBlock">
|
<apex:outputPanel id="frowQuestionForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<span class="prompt">{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/></span>
|
|
<span class="prompt">{!$Label.LABS_SF_PleaseEnterTheList}</span>
|
<apex:inputTextArea cols="40" rows="12" id="qChoices" value="{!qChoices}" title="Answers to question..."/>
|
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('rowQuestionBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<!-----------------------------------------Picklist Question------------------------------------------->
|
<apex:outputPanel id="picklist" >
|
<apex:pageBlock rendered="{!showPicklist}" id="picklistBlock">
|
<apex:outputPanel id="picklistForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<span class="prompt">{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/></span>
|
|
<span class="prompt">{!$Label.LABS_SF_PleaseEnterTheList}</span>
|
<apex:inputTextArea cols="40" rows="12" id="qChoices" value="{!qChoices}" title="Answers to question..."/>
|
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('picklistBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<!-----------------------------------------Single Text Question----------------------------------------------->
|
<apex:outputPanel id="singleText">
|
<apex:pageBlock rendered="{!showSingleText}" id="singleTextBlock">
|
<apex:outputPanel id="singleTextForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<div class="prompt" style="float: none;">
|
{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/>
|
</div>
|
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('singleTextBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<!-----------------------------------------Scale Question----------------------------------------------->
|
<apex:outputPanel id="scale">
|
<apex:pageBlock rendered="{!showScale}" id="scaleBlock">
|
<apex:outputPanel id="scaleForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<span class="prompt">{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/></span>
|
|
<span class="prompt">{!$Label.LABS_SF_PleaseEnterTheList}</span>
|
<apex:inputTextArea cols="40" rows="12" id="qChoices" value="{!qChoices}" title="Answers to question..."/>
|
|
<span class="prompt">{!$Label.LABS_SF_RequiredDescribe}</span>
|
|
<span class="prompt">
|
<apex:inputText size="20" id="qMinLabel" value="{!qMinLabel}" title="To describe the lowest level"/>
|
|
<apex:inputText size="20" id="qMaxLabel" value="{!qMaxLabel}" title="To describe the highest level"/>
|
</span>
|
<br/>
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('scaleBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<!-----------------------------------------Mail Question----------------------------------------------->
|
<apex:outputPanel id="mail">
|
<apex:pageBlock rendered="{!showMail}" id="mailBlock">
|
<apex:outputPanel id="mailForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<div class="prompt" style="float: none;">
|
{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/>
|
</div>
|
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('mailBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<!-----------------------------------------Phone Question----------------------------------------------->
|
<apex:outputPanel id="phone">
|
<apex:pageBlock rendered="{!showPhone}" id="phoneBlock">
|
<apex:outputPanel id="phoneForm">
|
<span class="prompt">{!$Label.LABS_SF_Question}</span>
|
<apex:inputTextArea cols="30" rows="3" id="qQuestion" value="{!qQuestion}" title="The question you would like asked"/>
|
|
<div class="prompt" style="float: none;">
|
{!$Label.LABS_SF_RequiredQuestion} <apex:inputCheckbox value="{!qRequired}" title="Is an answer for the quesiton required?(default is true)" selected="{!requiredBool}"/>
|
</div>
|
|
<br style="clear:both;" />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
<apex:commandButton onclick="checkRequired('phoneBlock');" rerender="dummy" value="{!$Label.LABS_SF_Save}"/>
|
</apex:outputPanel>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
</div> <!-- End addQuestion -->
|
<!---------------------------------------------------------------------------------------------------------->
|
<apex:pageBlock >
|
<div id="questionList">
|
|
<!-- Single Select Preview -->
|
<apex:outputPanel id="singleSelectPreview">
|
<apex:pageBlock rendered="{!showSingleSelectPreview}">
|
<div class="question">
|
<div class="question_menu">
|
Single Select Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="singleSelectPreviewForm">
|
<tr>
|
<td>
|
<apex:selectRadio layout="pageDirection" >
|
<apex:selectOptions value="{!singleOptions}"/>
|
</apex:selectRadio>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
<!-- Multi Select Preview -->
|
<apex:outputPanel id="multiSelectPreview">
|
<apex:pageBlock rendered="{!showMultiSelectPreview}">
|
<div class="question">
|
|
<div class="question_menu">
|
Multi Select Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="multiSelectPreviewForm">
|
<tr>
|
<td>
|
<apex:selectCheckboxes layout="pageDirection" >
|
<apex:selectOptions value="{!multiOptions}"/>
|
</apex:selectCheckboxes>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
<!-- Free Text Preview -->
|
<apex:outputPanel id="freeTextPreview">
|
<apex:pageBlock rendered="{!showFreeTextPreview}">
|
<div class="question">
|
|
<div class="question_menu">
|
Free Text Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="freeTextPreviewForm">
|
<tr>
|
<td>
|
<apex:inputTextArea cols="50" rows="10"/>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
<!-- Row Question Preview -->
|
<apex:outputPanel id="rowQuestionPreview">
|
<apex:pageBlock rendered="{!showRowQuestionPreview}">
|
<div class="question">
|
|
<div class="question_menu">
|
Row Question Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="rowQuestionForm">
|
<tr>
|
<td>
|
<apex:selectRadio >
|
<apex:selectOptions value="{!rowOptions}"/>
|
</apex:selectRadio>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
<!-- Picklist Preview -->
|
<apex:outputPanel id="picklistPreview">
|
<apex:pageBlock rendered="{!showPicklistPreview}">
|
<div class="question">
|
<div class="question_menu">
|
Picklist Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="picklistPreviewForm">
|
<tr>
|
<td>
|
<apex:selectList size="1" >
|
<apex:selectOptions value="{!pickOptions}"/>
|
</apex:selectList>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
<!-- Single Text Preview -->
|
<apex:outputPanel id="singleTextPreview">
|
<apex:pageBlock rendered="{!showSingleTextPreview}">
|
<div class="question">
|
|
<div class="question_menu">
|
Single Text Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="singleTextPreviewForm">
|
<tr>
|
<td>
|
<apex:inputText size="100"/>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
<!-- Scale Preview -->
|
<apex:outputPanel id="scalePreview">
|
<apex:pageBlock rendered="{!showScalePreview}">
|
<div class="question">
|
|
<div class="question_menu">
|
Scale Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="scaleForm">
|
<tr>
|
<td>
|
<apex:selectRadio >
|
<apex:selectOptions value="{!scaleOptions}"/>
|
</apex:selectRadio>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
<!-- Mail Preview -->
|
<apex:outputPanel id="mailPreview">
|
<apex:pageBlock rendered="{!showMailPreview}">
|
<div class="question">
|
|
<div class="question_menu">
|
Mail Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="mailPreviewForm">
|
<tr>
|
<td>
|
<apex:inputText size="50"/>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
|
<!-- Phone Preview -->
|
<apex:outputPanel id="phonePreview">
|
<apex:pageBlock rendered="{!showPhonePreview}">
|
<div class="question">
|
|
<div class="question_menu">
|
Single Text Preview
|
</div>
|
|
<table>
|
<h1>{!qQuestion}</h1>
|
<apex:outputPanel id="phonePreviewForm">
|
<tr>
|
<td>
|
<apex:inputText size="30"/>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</table>
|
</div>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
<!---------------------------------------------------------------------------------------------------------->
|
<apex:outputPanel id="qListPanel">
|
<div id="justQuestionList">
|
<apex:repeat value="{!aQuestion}" var="q" id="qRepeat">
|
<div id ="{!q.id}" class="question" title="Drag and Drop to Reorder">
|
<apex:outputPanel >
|
<div class="question_menu">
|
<div class="questionNum">
|
{!q.orderNumber}
|
</div>
|
<apex:image value="{!URLFOR($Resource.SurveyForce, 'survey_upDown.png')}" styleClass="right"/>
|
|
<!-- <apex:outputLabel value="{!q.questionType}"/><br /> -->
|
|
<!-- <apex:outputLink value="/apex/CreateQuestion?qId={!q.id}"><font size="1"> Edit</apex:outputLink> -->
|
<apex:commandLink styleclass="btn" action="{!editQuestion}" value="Edit" rel="#addQuestion" reRender="addQuestion, selectQuestionType, rowQuestion, singleSelect, multiSelect, freeText, picklist, singleText, scale, mail, phone">
|
<apex:param name="q" value="{!q.id}" assignTo="{!questionReference}"/>
|
</apex:commandLink>
|
<apex:commandLink styleclass="btn" action="{!deleteRefresh}" onclick="return confirmDelete('{!q.id}')" ><font size="1"> Delete</font>
|
<apex:param name="q" value="{!q.id}" assignTo="{!questionReference}"/>
|
</apex:commandLink>
|
</div>
|
<h1>
|
{!q.Name}
|
<apex:outputPanel rendered="{!q.required}" styleClass="requiredText">
|
({!$Label.LABS_SF_Required})
|
</apex:outputPanel>
|
</h1>
|
<div>
|
<apex:selectRadio layout="pageDirection" rendered="{!q.renderSelectRadio}">
|
<apex:selectOptions value="{!q.singleOptions}"/>
|
</apex:selectRadio>
|
|
<apex:selectCheckboxes layout="pageDirection" rendered="{!q.renderSelectCheckboxes}">
|
<apex:selectOptions value="{!q.multiOptions}"/>
|
</apex:selectCheckboxes>
|
|
<apex:inputTextArea cols="50" rows="10" rendered="{!q.renderFreeText}"/>
|
|
<apex:selectRadio rendered="{!q.renderSelectRow}">
|
<apex:selectOptions value="{!q.rowOptions}"/>
|
</apex:selectRadio>
|
|
<apex:selectList size="1" rendered="{!q.renderPicklist}">
|
<apex:selectOptions value="{!q.pickOptions}"/>
|
</apex:selectList>
|
|
<apex:inputText size="100" rendered="{!q.renderSingleText}"/>
|
|
<apex:outputPanel layout="none" rendered="{!q.renderScale}">
|
<table border="0" cellpadding="5" cellspacing="0">
|
<tr>
|
<td> </td>
|
<apex:repeat value="{!q.scaleOptions}" var="s">
|
<td style="text-align:center;">{!s.label}</td>
|
</apex:repeat>
|
<td> </td>
|
</tr>
|
<tr>
|
<td><apex:outputText value="{!q.minLabel}" /></td>
|
<apex:repeat value="{!q.scaleOptions}" var="s">
|
<td><input type="radio" name="scale{!q.Id}"/></td>
|
</apex:repeat>
|
<td><apex:outputText value="{!q.maxLabel}" /></td>
|
</tr>
|
</table>
|
</apex:outputPanel>
|
|
<apex:inputText size="50" rendered="{!q.renderMail}"/>
|
|
<apex:inputText size="30" rendered="{!q.renderPhone}"/>
|
</div>
|
</apex:outputPanel>
|
</div>
|
</apex:repeat>
|
</div>
|
</apex:outputPanel>
|
</div>
|
|
<div id="surveyMenu" class="overlay">
|
|
|
|
<h3 class="firstHeader"><apex:outputText value="{!$Label.LABS_SF_SurveyURLLink}"/></h3>
|
<h4>{!$Label.LABS_SF_ContactWithCase}:</h4>
|
<apex:outputText value="{!templateURL}"/><apex:outputText escape="true" value="&cId={!Contact.Id}&caId={!Case.id}" />
|
<h4>{!$Label.LABS_SF_JustContact}:</h4>
|
<apex:outputText value="{!templateURL}"/><apex:outputText escape="true" value="&cId={!Contact.Id}&caId=none" />
|
<h4>{!$Label.LABS_SF_Anonymous}:</h4>
|
|
<apex:outputText value="{!templateURL}"/>&cId=none&caId=none
|
<br />
|
<a href="" class="right btn" onClick="$('.close').click(); return false;">{!$Label.LABS_SF_Cancel}</a>
|
|
|
|
</div>
|
|
</apex:pageBlock>
|
</apex:form>
|
</div>
|
|
<!---------------------------------------------------------------------------------------------------------->
|
|
|
|
|
|
|
</apex:page>
|