Commit 7beb617db550cc7c95815a59041895a8e2749e7e
Exists in
master
Merge branch 'master' of https://softwarepublico.gov.br:443/gitlab/relatoriocirc…
…unstanciado/relatoriocircunstanciado.git
Showing
4 changed files
with
27 additions
and
5 deletions
Show diff stats
WebContent/WEB-INF/jsp/index/formulario.jsp
... | ... | @@ -384,9 +384,9 @@ |
384 | 384 | <input type="hidden" name="${amostra.nomeCampo }" value="${amostra.urlAmostraSiteQuestionario}" /> |
385 | 385 | <label for="ases_${amostra.nomeCampo}"> ${amostra.urlAmostraSiteQuestionario}</label> <br /> <br /> |
386 | 386 | <label for="ases_${amostra.nomeCampo}">Nota ASES:(999,99) </label> |
387 | - <input type="number" size="10"step="0.01" maxlength="6" id="ases_${amostra.nomeCampo}" name="ases_${amostra.nomeCampo}" value="${amostra.notaAses}" max="100" min="0" required /> | |
387 | + <input type="number" size="10"step="0.01" maxlength="6" id="ases_${amostra.nomeCampo}" name="ases_${amostra.nomeCampo}" value="${amostra.notaAses}" max="100" min="0" oninvalid="this.setCustomValidity('Somente valor entre 0 e 100')" required /> | |
388 | 388 | <label for="accessMonitor_${amostra.nomeCampo}">Nota AccessMonitor:(99,99) </label> |
389 | - <input type="number" size="10" step="0.01" maxlength="5" id="accessMonitor_${amostra.nomeCampo}" name="accessMonitor_${amostra.nomeCampo}" value="${amostra.notaAccess}" max="10" min="0" required/> | |
389 | + <input type="number" size="10" step="0.01" maxlength="5" id="accessMonitor_${amostra.nomeCampo}" name="accessMonitor_${amostra.nomeCampo}" value="${amostra.notaAccess}" max="10" min="0" oninvalid="this.setCustomValidity('Somente valor entre 0 e 10')" required/> | |
390 | 390 | <br/><br/> |
391 | 391 | <hr> |
392 | 392 | </c:forEach> | ... | ... |
src/br/com/controller/QuestionarioController.java
... | ... | @@ -66,8 +66,9 @@ public class QuestionarioController { |
66 | 66 | |
67 | 67 | if (autorizacaoGeracaoHashDao.verificarAutorizacaoGeracaoHash(path, autorizacao)) { |
68 | 68 | String[] codigo = emailDestinoOrgao.split("@"); |
69 | - String codigoHash = | |
70 | - codigo[0] | |
69 | + String codigoHash = ""; | |
70 | + | |
71 | + codigoHash = codigo[0] | |
71 | 72 | + DateUtil.dataHoraAtual().toString().replace("/", "").replace(" ", "") |
72 | 73 | .replace(":", ""); |
73 | 74 | ... | ... |
src/br/com/controller/formularioOrgaoController.java
... | ... | @@ -42,6 +42,12 @@ public class formularioOrgaoController { |
42 | 42 | this.path = this.application.getRealPath("") + "/WEB-INF/conexao.properties"; |
43 | 43 | } |
44 | 44 | |
45 | + @Path("/logout") | |
46 | + public void lofout() | |
47 | + { | |
48 | + VRaptorRequestHolder.currentRequest().getServletContext() | |
49 | + .setAttribute("usuarioLogado", true); | |
50 | + } | |
45 | 51 | |
46 | 52 | @Path("/formularioOrgao") |
47 | 53 | public void formularioOrgao(String valorHash) { |
... | ... | @@ -62,6 +68,10 @@ public class formularioOrgaoController { |
62 | 68 | |
63 | 69 | |
64 | 70 | if (questionario.getDtInicioQuestionario() != null && !valorHash.equalsIgnoreCase("")) { |
71 | + | |
72 | + VRaptorRequestHolder.currentRequest().getServletContext() | |
73 | + .setAttribute("usuarioLogado", true); | |
74 | + | |
65 | 75 | |
66 | 76 | VRaptorRequestHolder.currentRequest().getServletContext() |
67 | 77 | .setAttribute("valorHash", valorHash); | ... | ... |
src/br/com/controller/loginController.java
... | ... | @@ -2,11 +2,22 @@ package br.com.controller; |
2 | 2 | |
3 | 3 | import br.com.caelum.vraptor.Path; |
4 | 4 | import br.com.caelum.vraptor.Resource; |
5 | +import br.com.caelum.vraptor.Result; | |
6 | +import br.com.caelum.vraptor.ioc.spring.VRaptorRequestHolder; | |
5 | 7 | |
6 | 8 | @Resource |
7 | 9 | public class loginController { |
10 | + | |
11 | + private Result result; | |
12 | + | |
13 | + public loginController(Result result) { | |
14 | + this.result = result; | |
15 | + | |
16 | + } | |
17 | + | |
8 | 18 | @Path("/") |
9 | 19 | public void login(){ |
10 | - | |
20 | + VRaptorRequestHolder.currentRequest().getServletContext() | |
21 | + .setAttribute("usuarioLogado", false); | |
11 | 22 | } |
12 | 23 | } | ... | ... |