Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
15cf9630
Unverified
Commit
15cf9630
authored
2 years ago
by
Yuri Resende
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #811 from yuriresendematias/master
Desabilitando botão de rascunho
parents
21ec8dc1
1bf7470a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/views/evento/formulario/finalizar.blade.php
+1
-1
resources/views/evento/formulario/finalizar.blade.php
resources/views/projeto/editaFormulario/finalizar.blade.php
+2
-2
resources/views/projeto/editaFormulario/finalizar.blade.php
resources/views/projeto/editar.blade.php
+63
-60
resources/views/projeto/editar.blade.php
with
66 additions
and
63 deletions
+66
-63
resources/views/evento/formulario/finalizar.blade.php
View file @
15cf9630
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<div
class=
" d-flex justify-content-between align-items-center"
style=
"margin-top: 15px; margin-bottom:18px"
>
<div
class=
" d-flex justify-content-between align-items-center"
style=
"margin-top: 15px; margin-bottom:18px"
>
<h6
style=
"font-weight: bold"
><span
style=
"color: red; font-weight:bold"
>
*
</span>
Campos obrigatórios
</h6>
<h6
style=
"font-weight: bold"
><span
style=
"color: red; font-weight:bold"
>
*
</span>
Campos obrigatórios
</h6>
<button
id=
"submeterFormProposta"
type=
"submit"
style=
"display: none;"
></button>
<button
id=
"submeterFormProposta"
type=
"submit"
style=
"display: none;"
></button>
<button
type=
"button"
class=
"btn btn-primary "
id=
"idButtonSubmitRascunho"
>
{{ __('Salvar como rascunho') }}
</button>
<!--
<button type="button" class="btn btn-primary " id="idButtonSubmitRascunho" >{{ __('Salvar como rascunho') }}</button>
-->
<button
type=
"submit"
class=
"btn btn-success"
id=
"idButtonSubmitProjeto"
>
{{ __('Submeter projeto') }}
</button>
<button
type=
"submit"
class=
"btn btn-success"
id=
"idButtonSubmitProjeto"
>
{{ __('Submeter projeto') }}
</button>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/projeto/editaFormulario/finalizar.blade.php
View file @
15cf9630
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
<button
id=
"submeterFormProposta"
type=
"submit"
style=
"display: none;"
></button>
<button
id=
"submeterFormProposta"
type=
"submit"
style=
"display: none;"
></button>
<a
href=
"{{ route('proponente.projetosEdital', ['id' => $edital->id])}}"
class=
"btn btn-secondary"
>
Cancelar
</a>
<a
href=
"{{ route('proponente.projetosEdital', ['id' => $edital->id])}}"
class=
"btn btn-secondary"
>
Cancelar
</a>
@if(Auth::user()->tipo != 'administrador')
<!--
@if(Auth::user()->tipo != 'administrador')
<button type="submit" class="btn btn-primary " id="idButtonSubmitRascunho" >{{ __('Salvar como rascunho') }}</button>
<button type="submit" class="btn btn-primary " id="idButtonSubmitRascunho" >{{ __('Salvar como rascunho') }}</button>
@endif
@endif
-->
<button
type=
"submit"
class=
"btn btn-success"
id=
"idButtonSubmitProjeto"
>
{{ __('Submeter projeto') }}
</button>
<button
type=
"submit"
class=
"btn btn-success"
id=
"idButtonSubmitProjeto"
>
{{ __('Submeter projeto') }}
</button>
</div>
</div>
@if($errors->any())
@if($errors->any())
...
...
This diff is collapsed.
Click to expand it.
resources/views/projeto/editar.blade.php
View file @
15cf9630
...
@@ -105,8 +105,9 @@
...
@@ -105,8 +105,9 @@
<
script
>
<
script
>
let
radio_sim
=
document
.
getElementById
(
"radioSim"
);
if
(
document
.
getElementById
(
"radioSim"
)
.
checked
){
if
(
radio_sim
){
if
(
radio_sim
.
checked
){
document
.
getElementById
(
"radioSim"
)
.
checked
=
true
;
document
.
getElementById
(
"radioSim"
)
.
checked
=
true
;
document
.
getElementById
(
"radioNao"
)
.
checked
=
false
;
document
.
getElementById
(
"radioNao"
)
.
checked
=
false
;
document
.
getElementById
(
"displaySim"
)
.
style
.
display
=
"block"
;
document
.
getElementById
(
"displaySim"
)
.
style
.
display
=
"block"
;
...
@@ -119,13 +120,14 @@
...
@@ -119,13 +120,14 @@
document
.
getElementById
(
"displayNao"
)
.
style
.
display
=
"block"
;
document
.
getElementById
(
"displayNao"
)
.
style
.
display
=
"block"
;
document
.
getElementById
(
"idAvisoAutorizacaoEspecial"
)
.
style
.
display
=
"none"
;
document
.
getElementById
(
"idAvisoAutorizacaoEspecial"
)
.
style
.
display
=
"none"
;
}
}
}
let
buttonSubmit
=
document
.
getElementById
(
'idButtonSubmitProjeto'
);
let
buttonSubmit
=
document
.
getElementById
(
'idButtonSubmitProjeto'
);
let
buttonRascunho
=
document
.
getElementById
(
'idButtonSubmitRascunho'
);
let
buttonRascunho
=
document
.
getElementById
(
'idButtonSubmitRascunho'
);
@
if
(
$edital
->
numParticipantes
!=
0
)
@
if
(
$edital
->
numParticipantes
!=
0
)
let
parts
=
document
.
getElementById
(
'participante'
);
let
parts
=
document
.
getElementById
(
'participante'
);
let
partsFirst
=
document
.
getElementById
(
'participanteFirst'
);
//
let partsFirst = document.getElementById('participanteFirst');
const
participante
=
partsFirst
.
firstElementChild
;
//
const participante = partsFirst.firstElementChild;
@
endif
@
endif
let
contador
=
0
;
let
contador
=
0
;
...
@@ -138,6 +140,7 @@
...
@@ -138,6 +140,7 @@
const
input
=
'<input id="input_rascunho" type="hidden" name="rascunho" value="true">'
;
const
input
=
'<input id="input_rascunho" type="hidden" name="rascunho" value="true">'
;
$
(
"#updateProjetoForm"
)
.
append
(
input
);
$
(
"#updateProjetoForm"
)
.
append
(
input
);
})
})
@
if
(
$edital
->
numParticipantes
!=
0
)
@
if
(
$edital
->
numParticipantes
!=
0
)
function
gerarPeriodo
(
e
){
function
gerarPeriodo
(
e
){
var
select
=
e
.
parentElement
.
parentElement
.
nextElementSibling
;
var
select
=
e
.
parentElement
.
parentElement
.
nextElementSibling
;
...
@@ -172,57 +175,57 @@
...
@@ -172,57 +175,57 @@
}
}
};
};
$
(
"input.cpf:text"
)
.
mask
(
"000.000.000-00"
);
//
$("input.cpf:text").mask("000.000.000-00");
$
(
"input.celular:text"
)
.
mask
(
SPMaskBehavior
,
spOptions
);
//
$("input.celular:text").mask(SPMaskBehavior, spOptions);
$
(
"input.cep:text"
)
.
mask
(
"00000-000"
);
//
$("input.cep:text").mask("00000-000");
buttonMais
.
addEventListener
(
"click"
,
(
e
)
=>
{
//
buttonMais.addEventListener("click", (e) => {
if
(
parts
.
children
.
length
>=
"{{
$edital->numParticipantes
}}"
){
//
if(parts.children.length >= "{{ $edital->numParticipantes }}"){
alert
(
'Limite de participante.'
)
//
alert('Limite de participante.')
}
else
{
//
}else{
contador
++
;
//
contador++;
var
cln
=
participante
.
cloneNode
(
true
);
//
var cln = participante.cloneNode(true);
cln
.
setAttribute
(
'style'
,
" "
);
//
cln.setAttribute('style', " ");
var
id
=
cln
.
children
[
2
]
.
firstElementChild
.
id
;
//
var id = cln.children[2].firstElementChild.id;
var
id2
=
cln
.
children
[
0
]
.
firstElementChild
.
id
;
//
var id2 = cln.children[0].firstElementChild.id;
cln
.
children
[
2
]
.
firstElementChild
.
setAttribute
(
'id'
,
id
+
contador
);
//
cln.children[2].firstElementChild.setAttribute('id', id + contador);
cln
.
children
[
0
]
.
firstElementChild
.
setAttribute
(
'href'
,
"#collapseParticipante"
+
contador
);
//
cln.children[0].firstElementChild.setAttribute('href', "#collapseParticipante" + contador);
cln
.
children
[
0
]
.
firstElementChild
.
setAttribute
(
'id'
,
id2
+
contador
);
//
cln.children[0].firstElementChild.setAttribute('id', id2 + contador);
for
(
i
=
0
;
i
<
cln
.
children
.
length
;
i
++
)
{
//
for (i = 0; i < cln.children.length; i++) {
for
(
let
index
=
0
;
index
<
cln
.
children
[
i
]
.
querySelectorAll
(
'input'
)
.
length
;
index
++
)
{
//
for (let index = 0; index < cln.children[i].querySelectorAll('input').length; index++) {
let
input
=
cln
.
children
[
i
]
.
querySelectorAll
(
'input'
)[
index
];
//
let input = cln.children[i].querySelectorAll('input')[index];
let
name
=
input
.
getAttributeNode
(
"name"
)
.
value
;
//
let name = input.getAttributeNode("name").value;
name
=
name
.
replace
(
"[]"
,
""
);
//
name = name.replace("[]", "");
input
.
getAttributeNode
(
"name"
)
.
value
=
name
+
'['
+
contador
+
']'
;
//
input.getAttributeNode("name").value = name + '['+ contador +']';
let
select
=
cln
.
children
[
i
]
.
querySelectorAll
(
'select'
)[
index
];
//
let select = cln.children[i].querySelectorAll('select')[index];
if
(
select
){
//
if(select){
let
selectName
=
select
.
getAttributeNode
(
"name"
)
.
value
;
//
let selectName = select.getAttributeNode("name").value;
selectName
=
selectName
.
replace
(
"["
,
""
);
//
selectName = selectName.replace("[", "");
selectName
=
selectName
.
replace
(
"]"
,
""
);
//
selectName = selectName.replace("]", "");
select
.
getAttributeNode
(
"name"
)
.
value
=
selectName
+
'['
+
contador
+
']'
;
//
select.getAttributeNode("name").value = selectName + '['+ contador +']';
}
//
}
}
//
}
}
//
}
var
SPMaskBehavior
=
function
(
val
)
{
//
var SPMaskBehavior = function (val) {
return
val
.
replace
(
/
\
D
/
g
,
''
)
.
length
===
11
?
'(00) 00000-0000'
:
'(00) 0000-00009'
;
//
return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009';
},
//
},
spOptions
=
{
//
spOptions = {
onKeyPress
:
function
(
val
,
e
,
field
,
options
)
{
//
onKeyPress: function(val, e, field, options) {
field
.
mask
(
SPMaskBehavior
.
apply
({},
arguments
),
options
);
//
field.mask(SPMaskBehavior.apply({}, arguments), options);
}
//
}
};
//
};
parts
.
appendChild
(
cln
);
//
parts.appendChild(cln);
$
(
"input.cpf:text"
)
.
val
(
""
)
.
mask
(
"000.000.000-00"
);
//
$("input.cpf:text").val("").mask("000.000.000-00");
$
(
"input.celular:text"
)
.
val
(
""
)
.
mask
(
SPMaskBehavior
,
spOptions
);
//
$("input.celular:text").val("").mask(SPMaskBehavior, spOptions);
$
(
"input.cep:text"
)
.
val
(
""
)
.
mask
(
"00000-000"
);
//
$("input.cep:text").val("").mask("00000-000");
}
//
}
});
//
});
function
marcar
(
id
){
function
marcar
(
id
){
let
nome
=
document
.
getElementById
(
"nome"
+
id
);
let
nome
=
document
.
getElementById
(
"nome"
+
id
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment