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
"vscode:/vscode.git/clone" did not exist on "a5dff63b45f0231dab4fb1e310f2eb580e68cdbd"
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
Show 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,10 +86,15 @@
...
@@ -86,10 +86,15 @@
<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>
...
@@ -131,3 +136,31 @@
...
@@ -131,3 +136,31 @@
</div>
</div>
</div>
</div>
</div>
</div>
<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>
...
@@ -180,3 +180,14 @@
...
@@ -180,3 +180,14 @@
</div>
</div>
</div>
</div>
</div>
</div>
<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