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
b11c6225
Commit
b11c6225
authored
Nov 21, 2022
by
S-Nathalia
Browse files
Retirando possibilidade de um professor tecnico preencher os champos de cursos em que leciona
parent
920213d2
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/Auth/RegisterController.php
View file @
b11c6225
...
...
@@ -137,8 +137,10 @@ class RegisterController extends Controller
$proponente
->
linkLattes
=
$data
[
'linkLattes'
];
$user
->
proponentes
()
->
save
(
$proponente
);
if
(
$proponente
->
titulacaoMaxima
==
'Técnico'
){
$proponente
->
cursos
()
->
sync
(
$data
[
'curso'
]);
}
}
return
$user
;
}
...
...
resources/views/auth/register.blade.php
View file @
b11c6225
...
...
@@ -125,7 +125,7 @@
</
div
>
<
div
style
=
"display:none"
id
=
"cursos"
class
=
"col-md-12 mb-2"
>
<
label
for
=
"curso"
class
=
"col-form-label"
>
{{
__
(
'Cursos'
)
}}
<
span
style
=
"color: red; font-weight:bold;"
>*</
span
></
label
>
<
label
for
=
"curso"
class
=
"col-form-label"
>
{{
__
(
'Cursos
que leciona
'
)
}}
<
span
style
=
"color: red; font-weight:bold;"
>*</
span
></
label
>
<
br
>
<
div
class
=
"row col-md-12"
>
@
foreach
(
$cursos
as
$curso
)
...
...
@@ -155,9 +155,9 @@
<
div
class
=
"col-md-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"titulacaoMaxima"
class
=
"col-form-label"
>
{{
__
(
'Titulação Máxima'
)
}}
<
span
style
=
"color: red; font-weight:bold;"
>*</
span
></
label
>
<
select
id
=
"titulacaoMaxima"
class
=
"form-control @error('titulacaoMaxima') is-invalid @enderror"
name
=
"titulacaoMaxima"
value
=
"{{ old('titulacaoMaxima') }}"
autocomplete
=
"nome"
>
<
select
id
=
"titulacaoMaxima"
class
=
"form-control @error('titulacaoMaxima') is-invalid @enderror"
name
=
"titulacaoMaxima"
value
=
"{{ old('titulacaoMaxima') }}"
autocomplete
=
"nome"
,
onchange
=
"curso()"
>
<
option
value
=
""
disabled
selected
hidden
>--
Titulação
--</
option
>
<
option
@
if
(
old
(
'titulacaoMaxima'
)
==
'Doutorado'
)
selected
@
endif
value
=
"Doutorado"
>
Doutorado
</
option
>
<
option
@
if
(
old
(
'titulacaoMaxima'
)
==
'Doutorado'
)
selected
@
endif
value
=
"
Doutorado"
>
Doutorado
</
option
>
<
option
@
if
(
old
(
'titulacaoMaxima'
)
==
'Mestrado'
)
selected
@
endif
value
=
"Mestrado"
>
Mestrado
</
option
>
<
option
@
if
(
old
(
'titulacaoMaxima'
)
==
'Especialização'
)
selected
@
endif
value
=
"Especialização"
>
Especialização
</
option
>
<
option
@
if
(
old
(
'titulacaoMaxima'
)
==
'Graduação'
)
selected
@
endif
value
=
"Graduação"
>
Graduação
</
option
>
...
...
@@ -303,8 +303,8 @@
</
div
>
</
div
>
</
div
>
</
div
>
</
form
>
</
div
>
</
form
>
</
div
>
@
endsection
...
...
@@ -328,7 +328,6 @@
var
divProponente
=
document
.
getElementById
(
'proponente'
);
var
comboBoxCargo
=
document
.
getElementById
(
'cargo'
);
var
comboBoxVinculo
=
document
.
getElementById
(
'vinculo'
);
let
cursos
=
document
.
getElementById
(
'cursos'
);
if
(
comboBoxCargo
.
value
===
"Estudante"
&&
comboBoxVinculo
.
value
!==
"Pós-doutorando"
)
{
divProponente
.
style
.
display
=
"none"
;
...
...
@@ -337,12 +336,16 @@
divProponente
.
style
.
display
=
"block"
;
}
if
(
comboBoxCargo
.
value
===
"Professor"
)
{
outroVinculo
();
}
function
curso
()
{
let
cursos
=
document
.
getElementById
(
'cursos'
);
if
(
titulacaoMaxima
.
value
!==
"Técnico"
)
{
cursos
.
style
.
display
=
"block"
;
}
else
{
cursos
.
style
.
display
=
"none"
;
}
outroVinculo
();
}
function
outroVinculo
()
{
...
...
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