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
8bdc7fb8
Unverified
Commit
8bdc7fb8
authored
Nov 30, 2022
by
Guilherme Silva de Souza
Committed by
GitHub
Nov 30, 2022
Browse files
Merge pull request #683 from S-Nathalia/master
Retirando possibilidade de professores tecnicos escolherem cursos que lecionam
parents
69dcbf71
efb6d9ce
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/Auth/RegisterController.php
View file @
8bdc7fb8
...
...
@@ -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 @
8bdc7fb8
...
...
@@ -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
()
{
...
...
resources/views/user/perfilUser.blade.php
View file @
8bdc7fb8
...
...
@@ -92,14 +92,15 @@
@
enderror
</
div
>
</
div
>
@
if
(
Auth
()
->
user
()
->
tipo
==
'proponente
'
)
@
if
(
isset
(
$proponente
)
&&
$proponente
->
titulacaoMaxima
!=
'Técnico
'
)
<
div
class
=
"col-md-12 mb-2"
>
<
label
for
=
"curso"
class
=
"col-form-label"
>
{{
__
(
'Cursos*:'
)
}}
</
label
>
<
label
for
=
"curso"
class
=
"col-form-label"
>
{{
__
(
'Cursos
em que leciona
*:'
)
}}
</
label
>
<
br
>
<
div
class
=
"row col-md-12"
>
@
foreach
(
$cursos
as
$curso
)
<
div
class
=
"col-sm-6"
>
<
input
type
=
"checkbox"
name
=
"curso[]"
id
=
"curso
{
{$curso->id}
}
"
value
=
"
{
{$curso->id}
}
"
@
if
((
empty
(
old
(
'curso'
))
&&
$proponente
->
cursos
->
contains
(
$curso
->
id
))
||
(
!
empty
(
old
(
'curso'
))
&&
in_array
(
$curso
->
id
,
old
(
'curso'
))))
checked
@
endif
>
<
input
type
=
"checkbox"
name
=
"curso[]"
id
=
"curso
{
{$curso->id}
}
"
value
=
"
{
{$curso->id}
}
"
@
if
((
empty
(
old
(
'curso'
))
&&
$proponente
->
cursos
->
contains
(
$curso
->
id
))
||
(
!
empty
(
old
(
'curso'
))
&&
in_array
(
$curso
->
id
,
old
(
'curso'
))))
checked
@
endif
>
<
label
class
=
"form-check-label"
for
=
"curso
{
{$curso->id}
}
"
>
{{
$curso
->
nome
}}
</
label
>
...
...
@@ -233,7 +234,7 @@
<
div
class
=
"col-md-6"
>
<
div
class
=
"form-group"
>
<
label
for
=
"titulacaoMaxima"
class
=
"col-form-label"
>
{{
__
(
'Titulação Máxima*'
)
}}
</
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
>
@
isset
(
$proponente
)
<
option
@
if
(
$proponente
->
titulacaoMaxima
==
'Doutorado'
)
selected
@
endif
value
=
"Doutorado"
>
Doutorado
</
option
>
...
...
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