File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,18 @@ $('input[type=radio][name=removidoVoltou]').change(function () {
7
7
} ) ;
8
8
9
9
10
+ // Função para limpar os campos do formulário
11
+ function limparCampos ( ) {
12
+ $ ( '#nome' ) . val ( '' ) ;
13
+ $ ( '#data' ) . val ( '' ) ;
14
+ $ ( '#equipamento' ) . val ( '' ) ;
15
+ $ ( "#inicio" ) . val ( '' ) ,
16
+ $ ( "#final" ) . val ( '' ) ,
17
+ $ ( "#estoqueUtilizado" ) . val ( '' ) ,
18
+ $ ( "[name=removidoVoltou]" ) . val ( '' ) ,
19
+ $ ( "[name=motivoRemocao]" ) . val ( '' ) ;
20
+ }
21
+
10
22
$ ( document ) . ready ( function ( ) {
11
23
$ ( "#botaoEnviar" ) . on ( "click" , function ( ) {
12
24
// Adicionar animação de carregamento ao botão
@@ -42,6 +54,8 @@ $(document).ready(function () {
42
54
// Exibir modal de sucesso
43
55
$ ( "#modalSucesso" ) . modal ( 'show' ) ;
44
56
57
+ limparCampos ( ) ;
58
+
45
59
// Ocultar modal de sucesso após 3 segundos
46
60
setTimeout ( function ( ) {
47
61
$ ( "#modalSucesso" ) . modal ( 'hide' ) ;
Original file line number Diff line number Diff line change 4
4
< meta charset ="UTF-8 ">
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1, shrink-to-fit=no ">
6
6
< link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css ">
7
+
8
+ < style >
9
+ body {
10
+ background : linear-gradient (135deg , # 3498db, # 9b59b6 );
11
+ }
12
+
13
+ .form-container {
14
+ background-color : # ffffff ;
15
+ border-radius : 20px ;
16
+ padding : 40px ;
17
+ box-shadow : 0 0 20px rgba (0 , 0 , 0 , 0.1 );
18
+ }
19
+ </ style >
20
+
7
21
< title > Formulário de Estoque</ title >
8
22
</ head >
9
23
< body >
10
24
11
- < div class ="container mt-5 ">
25
+ < div class ="container mt-5 form-container ">
12
26
< form method ="post " action ="/processar_formulario ">
13
27
< div class ="form-group ">
14
28
< label for ="nome "> Nome:</ label >
You can’t perform that action at this time.
0 commit comments