NovoUsuario.html
7.69 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html lang="pt" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protocolo MP - Cadastro Novo Usuário</title>
<link rel="stylesheet" type="text/css" th:href="@{/layout/stylesheets/vendors.min.css}" />
<link rel="stylesheet" type="text/css" th:href="@{/layout/stylesheets/dipla.min.css}" />
<link rel="stylesheet" type="text/css" th:href="@{/layout/stylesheets/application.css}" />
<link rel="stylesheet" type="text/css" th:href="@{/layout/stylesheets/estilo-governo.css}" />
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="aw-layout-simple-page">
<!-- HTML da Barra do governo /-->
<th:block th:replace="layout/fragments/barra-governo"></th:block>
<!-- HTML do Cabeçcalho do governo /-->
<th:block th:replace="layout/fragments/cabecalho-governo"></th:block>
<div class="aw-layout-simple-page__container">
<form th:action="@{/usuarios/auto-cadastro}" method="POST" th:object="${usuario}" class="uppercase" autocomplete="off">
<protocolo:message />
<div class="aw-simple-panel">
<!--<img alt="dipla" th:src="@{/images/brasao-brasil.png}" width="80px" height="80px" />-->
<div class="aw-simple-panel__message">
<h2>Cadastro de Novo Usuário</h2>
</div>
<div th:if="${not #strings.isEmpty(mensagem)}">
<p>Um e-mail foi encaminhado para a validação de usuário.</p>
<p>Verifique as informações repassadas para obter o acesso.</p>
</div>
<div class="aw-simple-panel__box" th:if="${#strings.isEmpty(mensagem)}">
<div class="row">
<div class="form-group col-sm-12 bw-required" brewer:classforerror="nome">
<input type="text" class="form-control nome" id="nome" th:field="*{nome}" size="50" autofocus="autofocus" placeholder="Nome" />
</div>
</div>
<div class="row">
<div class="form-group col-sm-12 nome" brewer:classforerror="nome">
<input type="text" class="form-control nome" id="nome_social" th:field="*{nome_social}" size="50" autofocus="autofocus" placeholder="Nome Social" />
</div>
</div>
<div class="row">
<div class="form-group col-sm-12 bw-required" brewer:classforerror="telefone">
<input type="text" class="form-control js-phone-number" id="telefone" placeholder="Telefone" th:field="*{telefone}" />
</div>
</div>
<div class="row">
<div class="form-group col-sm-12 bw-required" brewer:classforerror="email">
<input type="text" class="form-control email" id="email" th:field="*{email}" placeholder="E-Mail" maxlength="50" />
</div>
</div>
<div class="row">
<div class="form-group col-sm-12 bw-required" brewer:classforerror="senha">
<input id="senha" type="password" class="form-control" placeholder="Senha" th:field="*{senha}" />
</div>
</div>
<div class="row">
<div class="form-group col-sm-12 bw-required" brewer:classforerror="senha-confirmacao">
<input id="senha-confirmacao" type="password" class="form-control" placeholder="Confirmação da Senha" th:field="*{confirmacaoSenha}"/>
</div>
</div>
<div class="row">
<input type="hidden" name="grupos" th:value="2">
</div>
<div class="row justify-content-md-center">
<div th:if="${erroCaptch}">
<div class="aw-simple-panel__message is-error" th:text="${erroCaptchMsg}"></div>
</div>
<div align="center" class=" form-group g-recaptcha col" th:attr="data-sitekey=${@captchaService.getReCaptchaSite()}" ></div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-lg aw-btn-full-width">SALVAR</button>
</div>
</div>
<div class="aw-simple-panel__message">
<table class="table table-hover">
<tbody>
<tr class="js-cliente-pesquisa-rapida">
<td>
<a th:href="@{/login}">
<span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span> VOLTAR
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</div>
<!-- Rodape dinamico do governo federal /-->
<div id="footer-brasil" class="footer-governo"></div>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script th:src="@{/layout/vendors/jquery/jquery.js}"></script>
<script th:src="@{/layout/javascripts/vendors.min.js}"></script>
<script th:src="@{/javascripts/vendors/jquery.mask.min.js}"></script>
<script th:src="@{/layout/javascripts/dipla.js}"></script>
<script th:src="@{/layout/javascripts/usuario.esqueci-senha.js}"></script>
<!-- JS da Barra do governo /-->
<script defer="defer" src="//barra.brasil.gov.br/barra.js" type="text/javascript"></script>
</body>
</html>
<script type="application/javascript">
$( document ).ready(function() {
$('.nome').keyup(function(){
$(this).val($(this).val().toUpperCase());
});
$('.email').keyup(function(){
$(this).val($(this).val().toLowerCase());
});
});
register(event){
event.preventDefault();
var formData= $('form').serialize();
$.post(serverContext + "user/registration", formData, function(data){
if(data.message == "success") {
}
})
.fail(function(data) {
grecaptcha.reset();
if(data.responseJSON.error == "InvalidReCaptcha"){
$("#captchaError").show().html(data.responseJSON.message);
}
}
}
</script>