Skip to content

Bug 1188 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ wiki/wiki-jar/Test de base/
/process-manager/process-manager-ejb/src/main/resources/META-INF/MANIFEST.MF
/process-manager/process-manager-war/src/main/webapp/META-INF
/project-manager/project-manager-ejb/src/main/resources/META-INF/MANIFEST.MF
/project-manager/project-manager-war/src/main/webapp/META-INF
/project-manager/project-manager-war/src/main/webapp/META-INF
/survey/survey-config/.project
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ survey.radio = Bouton radio
survey.checkbox = Case � cocher
survey.list = Liste d\u00e9roulante

survey.confirmUpdateSurvey = Attention, modifier cette enqu\u00eate supprimera toutes les r\u00e9ponses d\u00e9j\u00e0 enregistr\u00e9e, Etes-vous s\u00fbr de vouloir modifier
survey.confirmUpdateSurvey = Attention, modifier cette enqu\u00eate supprimera toutes les r\u00e9ponses d\u00e9j\u00e0 enregistr\u00e9es. Etes-vous s\u00fbr de vouloir modifier
survey.confirmUpdatePoll = Attention, modifier ce sondage supprimera tous les votes d\u00e9j\u00e0 enregistr\u00e9s. Etes-vous s\u00fbr de vouloir modifier
survey.surveyAnonymous = Enqu\u00eate anonyme
survey.pollAnonymous = Vote anonyme
survey.choice = Vue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ survey.list = Dropdown-Liste
survey.results =

survey.confirmUpdateSurvey = Warning! Modifying this survey will delete all recorded answers! Do you really want to update the survey?
survey.confirmUpdatePoll = Warning! Modifying this poll will delete all recorded votes! Do you really want to update the poll
survey.surveyAnonymous = Anonymous survey
survey.pollAnonymous = Anonymous vote
survey.choice = look view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ survey.radio = Radio button
survey.checkbox = Checkbox
survey.list = Dropdown list

survey.confirmUpdateSurvey = Warning! Modifying this survey will delete all recorded answers! Do you really want to update the survey?
survey.confirmUpdateSurvey = Warning! Modifying this survey will delete all recorded answers! Do you really want to update the survey
survey.confirmUpdatePoll = Warning! Modifying this poll will delete all recorded votes! Do you really want to update the poll
survey.surveyAnonymous = Anonymous survey
survey.pollAnonymous = Anonymous vote
survey.choice = look view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ survey.radio = Bouton radio
survey.checkbox = Case � cocher
survey.list = Liste d\u00e9roulante

survey.confirmUpdateSurvey = Attention, modifier cette enqu\u00eate supprimera toutes les r\u00e9ponses d\u00e9j\u00e0 enregistr\u00e9e, Etes-vous s\u00fbr de vouloir modifier
survey.confirmUpdateSurvey = Attention, modifier cette enqu\u00eate supprimera toutes les r\u00e9ponses d\u00e9j\u00e0 enregistr\u00e9es. Etes-vous s\u00fbr de vouloir modifier
survey.confirmUpdatePoll = Attention, modifier ce sondage supprimera tous les votes d\u00e9j\u00e0 enregistr\u00e9s. Etes-vous s\u00fbr de vouloir modifier
survey.surveyAnonymous = Enqu\u00eate anonyme
survey.pollAnonymous = Vote anonyme
survey.choice = Vue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ public class SurveyContentManager implements ContentInterface {
* @return a List of SilverContent
*/
public List getSilverContentById(List<Integer> ids, String peasId, String userId, List<String> userRoles) {
if (getContentManager() == null)
if (getContentManager() == null) {
return new ArrayList<SilverContentInterface>();
}

return getHeaders(makePKArray(ids, peasId));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response)

// Cookie Validity
int cookieDuration = 3650;
if (request.getParameter("duration") != null)
cookieDuration = new Integer(request.getParameter("duration")).intValue();
if (request.getParameter("duration") != null) {
cookieDuration = Integer.parseInt(request.getParameter("duration"));
}

String componentId = request.getParameter("cid");
String surveyId = request.getParameter("sid");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ $(document).ready(function(){
<%-- //TODO add the operation Pane only if there is no question (depends on vote or survey) --%>
<view:operationPane>
<c:if test="${!isPolling}">
<view:operation altText="<%=resources.getString("QuestionAdd")%>" icon="icons/questionAdd.gif" action="javaScript:addQuestion();"></view:operation>
<fmt:message var="addQuestionLabel" key="QuestionAdd"/>
<view:operation altText="${addQuestionLabel}" icon="icons/questionAdd.gif" action="javaScript:addQuestion();"></view:operation>
</c:if>
</view:operationPane>
<fmt:message var="extraInfoBB" key="SurveyUpdate"/>
Expand Down
4 changes: 4 additions & 0 deletions survey/survey-war/src/main/webapp/survey/jsp/surveyList.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
<fmt:setLocale value="${sessionScope['SilverSessionController'].favoriteLanguage}" />
<view:setBundle bundle="${requestScope.resources.multilangBundle}" />

<c:set var="isPolling" value="${requestScope['PollingStationMode']}" />
<fmt:message var="surveyConfirmUpdateLabel" key="survey.confirmUpdateSurvey" />
<c:if test="${isPolling}">
<fmt:message var="surveyConfirmUpdateLabel" key="survey.confirmUpdatePoll"/>
</c:if>

<%!String lockSrc = "";
String unlockSrc = "";
Expand Down
44 changes: 25 additions & 19 deletions survey/survey-war/src/main/webapp/survey/jsp/surveyUpdate.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ function isCorrectForm() {
<%

out.println(frame.printBefore());
out.println(board.printBefore());
%>

<view:board>

<center>
<form name="surveyForm" action="surveyUpdate.jsp" method="post">
Expand Down Expand Up @@ -301,7 +300,27 @@ function isCorrectForm() {
<input type="text" class="dateToPick" name="endDate" size="14" value="<%=endDate%>" maxlength="<%=DBUtil.getDateFieldLength()%>"/>
</td>
</tr>
<tr>
<%
String anonymousCheck = "";
if (anonymous) {
anonymousCheck = "checked";
}

//Mode anonyme -> force les enquetes a etre toutes anonymes
String anonymousDisabled = "";
if(surveyScc.isAnonymousModeEnabled()) {
anonymousDisabled = "disabled";
}

String anonymousLabel = resources.getString("survey.surveyAnonymous");
String displayVote = "";
if (surveyScc.isPollingStationMode()) {
anonymousLabel = resources.getString("survey.pollAnonymous");
displayVote="display:none;";
}

%>
<tr style="<%=displayVote%>">
<td class="txtlibform"><%=resources.getString("SurveyCreationNbQuestionPerPage")%>
:</td>
<td>
Expand All @@ -310,20 +329,7 @@ function isCorrectForm() {
</td>
</tr>
<tr>
<%
String anonymousCheck = "";
if (anonymous)
{
anonymousCheck = "checked";
}

//Mode anonyme -> force les enquetes a etre toutes anonymes
String anonymousDisabled = "";
if(surveyScc.isAnonymousModeEnabled()) {
anonymousDisabled = "disabled";
}
%>
<td class="txtlibform"><%=resources.getString("survey.surveyAnonymous")%> :</td>
<td class="txtlibform"><%=anonymousLabel%> :</td>
<td>
<input type="checkbox" name="anonymous" value="true" <%=anonymousCheck%> <%=anonymousDisabled%>>
<input type="hidden" name="anonymousString" value="<%=anonymousString%>">
Expand All @@ -343,14 +349,14 @@ function isCorrectForm() {
</table>
</form>
</center>
</view:board>
<%
out.println(board.printAfter());
out.println(frame.printMiddle());
Button validateButton = (Button) gef.getFormButton(resources.getString("GML.validate"), "javascript:onClick=sendData()", false);
ButtonPane buttonPane = gef.getButtonPane();
buttonPane.addButton(validateButton);
buttonPane.setHorizontalPosition();
out.println("<BR><center>"+buttonPane.print()+"</center>");
out.println("<br/><center>"+buttonPane.print()+"</center>");
out.println(frame.printAfter());
out.println(window.printAfter());
%>
Expand Down