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
a97eab2f
Commit
a97eab2f
authored
Aug 05, 2022
by
unknown
Browse files
Adicionada verificação de escolha(sim ou nao) na autorização especial
parent
b548e6f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Requests/StoreTrabalho.php
View file @
a97eab2f
...
@@ -27,6 +27,7 @@ class StoreTrabalho extends FormRequest
...
@@ -27,6 +27,7 @@ class StoreTrabalho extends FormRequest
public
function
rules
()
public
function
rules
()
{
{
//dd($this->all());
$evento
=
Evento
::
find
(
$this
->
editalId
);
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
=
[];
$rules
=
[];
if
(
$this
->
has
(
'marcado'
)){
if
(
$this
->
has
(
'marcado'
)){
...
@@ -75,8 +76,8 @@ class StoreTrabalho extends FormRequest
...
@@ -75,8 +76,8 @@ class StoreTrabalho extends FormRequest
$rules
[
'anexoPlanilhaPontuacao'
]
=
[
'required'
];
$rules
[
'anexoPlanilhaPontuacao'
]
=
[
'required'
];
$rules
[
'anexoLattesCoordenador'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoLattesCoordenador'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoGrupoPesquisa'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoGrupoPesquisa'
]
=
[
'required'
,
'mimes:pdf'
];
$rules
[
'anexoAutorizacaoComiteEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
justificativaAutorizacaoEtica
==
null
)];
$rules
[
'anexoAutorizacaoComiteEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
autorizacaoFlag
==
'sim'
)];
$rules
[
'justificativaAutorizacaoEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
a
nexoA
utorizacao
ComiteEtica
==
null
)];
$rules
[
'justificativaAutorizacaoEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
autorizacao
Flag
==
'nao'
)];
$rules
[
'pontuacaoPlanilha'
]
=
[
'required'
,
'string'
];
$rules
[
'pontuacaoPlanilha'
]
=
[
'required'
,
'string'
];
$rules
[
'linkGrupoPesquisa'
]
=
[
'required'
,
'string'
];
$rules
[
'linkGrupoPesquisa'
]
=
[
'required'
,
'string'
];
}
}
...
...
app/Http/Requests/UpdateTrabalho.php
View file @
a97eab2f
...
@@ -75,8 +75,10 @@ class UpdateTrabalho extends FormRequest
...
@@ -75,8 +75,10 @@ class UpdateTrabalho extends FormRequest
$rules
[
'anexoPlanilhaPontuacao'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoPlanilhaPontuacao
==
null
)];
$rules
[
'anexoPlanilhaPontuacao'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoPlanilhaPontuacao
==
null
)];
$rules
[
'anexoLattesCoordenador'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoLattesCoordenador
==
null
),
'mimes:pdf'
];
$rules
[
'anexoLattesCoordenador'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoLattesCoordenador
==
null
),
'mimes:pdf'
];
$rules
[
'anexoGrupoPesquisa'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoGrupoPesquisa
==
null
),
'mimes:pdf'
];
$rules
[
'anexoGrupoPesquisa'
]
=
[
Rule
::
requiredIf
(
$projeto
->
anexoGrupoPesquisa
==
null
),
'mimes:pdf'
];
$rules
[
'anexoAutorizacaoComiteEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
justificativaAutorizacaoEtica
==
null
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
)];
// anexoAutorizacaoComiteEtica = SIM
$rules
[
'justificativaAutorizacaoEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
anexoAutorizacaoComiteEtica
==
null
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
)];
$rules
[
'anexoAutorizacaoComiteEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
autorizacaoFlag
==
'sim'
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
)];
// justificativaAutorizacaoEtica = NAO
$rules
[
'justificativaAutorizacaoEtica'
]
=
[
Rule
::
requiredIf
(
$this
->
autorizacaoFlag
==
'nao'
&&
$projeto
->
justificativaAutorizacaoEtica
==
null
)];
$rules
[
'pontuacaoPlanilha'
]
=
[
'required'
,
'string'
];
$rules
[
'pontuacaoPlanilha'
]
=
[
'required'
,
'string'
];
$rules
[
'linkGrupoPesquisa'
]
=
[
'required'
,
'string'
];
$rules
[
'linkGrupoPesquisa'
]
=
[
'required'
,
'string'
];
}
}
...
...
resources/views/evento/formulario/anexos.blade.php
View file @
a97eab2f
...
@@ -86,13 +86,18 @@
...
@@ -86,13 +86,18 @@
<div
class=
"form-group col-md-6"
>
<div
class=
"form-group col-md-6"
>
<label
for=
"botao"
class=
"col-form-label font-tam @error('botao') is-invalid @enderror"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"Se possuir, coloque todas em único arquivo pdf."
style=
"font-weight: bold"
>
{{ __('Possui autorizações especiais?') }}
<span
style=
"color: red; font-weight:bold"
>
*
</span></label>
<label
for=
"botao"
class=
"col-form-label font-tam @error('botao') is-invalid @enderror"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"Se possuir, coloque todas em único arquivo pdf."
style=
"font-weight: bold"
>
{{ __('Possui autorizações especiais?') }}
<span
style=
"color: red; font-weight:bold"
>
*
</span></label>
<input
type=
"radio"
checked
id=
"radioSim"
onchange=
"displayAutorizacoesEspeciais('sim')"
>
<input
type=
"radio"
id=
"radioSim"
name=
"autorizacaoFlag"
onchange=
"displayAutorizacoesEspeciaisDois('sim')"
checked
value=
"sim"
>
<label
for=
"radioSim"
style=
"margin-right: 5px"
>
Sim
</label>
<label
for=
"radioSim"
style=
"margin-right: 5px"
>
Sim
</label>
<input
type=
"radio"
id=
"radioNao"
onchange=
"displayAutorizacoesEspeciais('nao')"
>
<input
type=
"radio"
id=
"radioNao"
name=
"autorizacaoFlag"
onchange=
"displayAutorizacoesEspeciaisDois('nao')"
value=
"nao"
>
<label
for=
"radioNao"
style=
"margin-right: 5px"
>
Não
</label><br>
<label
for=
"radioNao"
style=
"margin-right: 5px"
>
Não
</label><br>
<span
id=
"idAvisoAutorizacaoEspecial"
class=
"invalid-feedback"
role=
"alert"
style=
"overflow: visible; display:none"
>
<span
id=
"idAvisoAutorizacaoEspecial"
class=
"invalid-feedback"
role=
"alert"
style=
"overflow: visible; display:none"
>
<strong>
Selecione a autorização e envie o arquivo!
</strong>
<strong>
Selecione a autorização e envie o arquivo!
</strong>
</span>
</span>
<div
class=
"form-group"
id=
"displaySim"
style=
"display: block; margin-top:-1rem"
>
<div
class=
"form-group"
id=
"displaySim"
style=
"display: block; margin-top:-1rem"
>
<label
for=
"nomeTrabalho"
class=
"col-form-label font-tam"
style=
"font-weight: bold;font-size: 13px"
>
{{ __('Sim, declaro que necessito de autorizações especiais') }}
</label>
<label
for=
"nomeTrabalho"
class=
"col-form-label font-tam"
style=
"font-weight: bold;font-size: 13px"
>
{{ __('Sim, declaro que necessito de autorizações especiais') }}
</label>
...
@@ -130,4 +135,32 @@
...
@@ -130,4 +135,32 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<script>
//console.log("{{old('autorizacaoFlag')}}");
if
(
"
{{old('autorizacaoFlag')}}
"
==
"
sim
"
){
$
(
'
#radioSim
'
).
click
()
}
if
(
"
{{old('autorizacaoFlag')}}
"
==
"
nao
"
){
$
(
'
#radioNao
'
).
click
()
}
function
displayAutorizacoesEspeciaisDois
(
valor
){
if
(
valor
==
"
sim
"
){
document
.
getElementById
(
"
radioSim
"
).
checked
=
true
;
document
.
getElementById
(
"
radioNao
"
).
checked
=
false
;
document
.
getElementById
(
"
displaySim
"
).
style
.
display
=
"
block
"
;
document
.
getElementById
(
"
displayNao
"
).
style
.
display
=
"
none
"
;
document
.
getElementById
(
"
idAvisoAutorizacaoEspecial
"
).
style
.
display
=
"
none
"
;
}
else
if
(
valor
==
"
nao
"
){
document
.
getElementById
(
"
radioSim
"
).
checked
=
false
;
document
.
getElementById
(
"
radioNao
"
).
checked
=
true
;
document
.
getElementById
(
"
displaySim
"
).
style
.
display
=
"
none
"
;
document
.
getElementById
(
"
displayNao
"
).
style
.
display
=
"
block
"
;
document
.
getElementById
(
"
idAvisoAutorizacaoEspecial
"
).
style
.
display
=
"
none
"
;
}
}
</script>
\ No newline at end of file
resources/views/projeto/editaFormulario/anexos.blade.php
View file @
a97eab2f
...
@@ -118,9 +118,9 @@
...
@@ -118,9 +118,9 @@
<div
class=
"form-group col-md-6"
>
<div
class=
"form-group col-md-6"
>
<label
for=
"botao"
class=
"col-form-label font-tam @error('botao') is-invalid @enderror"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"Se possuir, coloque todas em único arquivo pdf."
style=
"font-weight: bold"
>
{{ __('Possui autorizações especiais?') }}
<span
style=
"color: red; font-weight:bold"
>
*
</span></label>
<label
for=
"botao"
class=
"col-form-label font-tam @error('botao') is-invalid @enderror"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"Se possuir, coloque todas em único arquivo pdf."
style=
"font-weight: bold"
>
{{ __('Possui autorizações especiais?') }}
<span
style=
"color: red; font-weight:bold"
>
*
</span></label>
<input
type=
"radio"
@
if
($
projeto-
>
anexoAutorizacaoComiteEtica != null) checked @endif id="radioSim" onchange="displayAutorizacoesEspeciais('sim')">
<input
type=
"radio"
@
if
($
projeto-
>
anexoAutorizacaoComiteEtica != null) checked @endif id="radioSim" onchange="displayAutorizacoesEspeciais('sim')"
name="autorizacaoFlag" value="sim"
>
<label
for=
"radioSim"
style=
"margin-right: 5px"
>
Sim
</label>
<label
for=
"radioSim"
style=
"margin-right: 5px"
>
Sim
</label>
<input
type=
"radio"
@
if
($
projeto-
>
anexoAutorizacaoComiteEtica == null) checked @endif id="radioNao" onchange="displayAutorizacoesEspeciais('nao')">
<input
type=
"radio"
@
if
($
projeto-
>
anexoAutorizacaoComiteEtica == null) checked @endif id="radioNao" onchange="displayAutorizacoesEspeciais('nao')"
name="autorizacaoFlag" value="nao"
>
<label
for=
"radioNao"
style=
"margin-right: 5px"
>
Não
</label><br>
<label
for=
"radioNao"
style=
"margin-right: 5px"
>
Não
</label><br>
<span
id=
"idAvisoAutorizacaoEspecial"
class=
"invalid-feedback"
role=
"alert"
style=
"overflow: visible; display:none"
>
<span
id=
"idAvisoAutorizacaoEspecial"
class=
"invalid-feedback"
role=
"alert"
style=
"overflow: visible; display:none"
>
<strong>
Selecione a autorização e envie o arquivo!
</strong>
<strong>
Selecione a autorização e envie o arquivo!
</strong>
...
@@ -179,4 +179,15 @@
...
@@ -179,4 +179,15 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<script
type=
"text/javascript"
src=
"http://code.jquery.com/jquery-1.7.2.min.js%22%3E"
></script>
<script>
if
(
"
{{old('autorizacaoFlag')}}
"
==
"
sim
"
){
$
(
'
#radioSim
'
).
click
();
}
if
(
"
{{old('autorizacaoFlag')}}
"
==
"
nao
"
){
$
(
'
#radioNao
'
).
click
();
}
</script>
\ No newline at end of file
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