Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
66dd5d33
Commit
66dd5d33
authored
3 years ago
by
Guilherme Silva
Browse files
Options
Download
Email Patches
Plain Diff
Permitindo criação avaliador selecionando seu tipo
parent
6ec36cc3
master
carl-branch
dependabot/composer/dompdf/dompdf-1.2.2
dependabot/composer/guzzlehttp/guzzle-6.5.8
dependabot/composer/guzzlehttp/psr7-1.8.5
dependabot/composer/symfony/http-kernel-4.4.50
dependabot/npm_and_yarn/decode-uri-component-0.2.2
dependabot/npm_and_yarn/express-4.18.2
dependabot/npm_and_yarn/json5-and-json5-2.2.3
dependabot/npm_and_yarn/loader-utils-and-webpack-cli-1.4.2
dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
dependabot/npm_and_yarn/qs-and-express-6.11.0
excluir_projeto_submetido
updates_mar
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Http/Controllers/AdministradorController.php
+1
-0
app/Http/Controllers/AdministradorController.php
resources/views/administrador/novo_user.blade.php
+27
-2
resources/views/administrador/novo_user.blade.php
with
28 additions
and
2 deletions
+28
-2
app/Http/Controllers/AdministradorController.php
View file @
66dd5d33
...
...
@@ -182,6 +182,7 @@ class AdministradorController extends Controller
case
"avaliador"
:
$avaliador
=
new
Avaliador
();
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
tipo
=
$request
->
tipoAvaliador
;
$avaliador
->
save
();
break
;
case
"proponente"
:
...
...
This diff is collapsed.
Click to expand it.
resources/views/administrador/novo_user.blade.php
View file @
66dd5d33
...
...
@@ -64,7 +64,7 @@
</
div
>
<
div
class
=
"col-md-4"
>
<
label
for
=
"tipo"
class
=
"col-form-label"
>
{{
__
(
'Tipo*'
)
}}
</
label
>
<
select
name
=
"tipo"
id
=
"tipo"
onchange
=
"mudar()"
class
=
"form-control"
>
<
select
name
=
"tipo"
id
=
"tipo"
onchange
=
"mudar()
; avaliadorCheck();
"
class
=
"form-control"
>
@
if
(
auth
()
->
user
()
->
tipo
==
'administrador'
)
<
option
@
if
(
old
(
'tipo'
)
==
"administradorResponsavel"
)
required
@
endif
value
=
"administradorResponsavel"
>
Administrador
responsável
</
option
>
@
endif
...
...
@@ -73,7 +73,16 @@
<
option
@
if
(
old
(
'tipo'
)
==
"proponente"
)
required
@
endif
value
=
"proponente"
>
Proponente
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
"participante"
)
required
@
endif
value
=
"participante"
>
Discente
</
option
>
</
select
>
</
div
>
</
div
>
<
div
>
<
label
id
=
"labTipoAvaliador"
style
=
"display: none"
for
=
"tipoAvaliador"
class
=
"col-form-label"
>
{{
__
(
'Avaliador*'
)
}}
</
label
>
<
select
id
=
"tipoAvaliador"
style
=
"display: none"
name
=
"tipoAvaliador"
class
=
"form-control"
>
<
option
@
if
(
old
(
'tipo'
)
==
"Externo"
)
@
endif
value
=
"Externo"
>
Externo
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
"Interno"
)
@
endif
value
=
"Interno"
>
Interno
</
option
>
</
select
>
</
div
>
<
div
class
=
"col-md-2"
>
<
label
for
=
"celular"
class
=
"col-form-label"
>
{{
__
(
'Celular*'
)
}}
</
label
>
<
input
id
=
"celular"
type
=
"text"
class
=
"form-control @error('celular') is-invalid @enderror"
name
=
"celular"
value
=
"{{ old('celular') }}"
required
autocomplete
=
"celular"
autofocus
>
...
...
@@ -357,6 +366,22 @@
instituicao
.
parentElement
.
style
.
display
=
'none'
;
}
}
function
avaliadorCheck
()
{
var
tipoUser
=
document
.
getElementById
(
'tipo'
);
var
tipoAval
=
document
.
getElementById
(
"tipoAvaliador"
);
var
labAval
=
document
.
getElementById
(
"labTipoAvaliador"
)
if
(
tipo
.
value
==
"avaliador"
)
{
tipoAval
.
style
.
display
=
""
;
labAval
.
style
.
display
=
""
;
tipo
.
parentElement
.
className
=
'col-md-2'
}
else
{
tipo
.
parentElement
.
className
=
'col-md-4'
labAval
.
parentElement
.
className
=
''
tipoAval
.
parentElement
.
className
=
''
tipoAval
.
style
.
display
=
"none"
;
labAval
.
style
.
display
=
"none"
;
}
}
window
.
onload
=
showInstituicao
();
</
script
>
@
endsection
\ No newline at end of file
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
Menu
Projects
Groups
Snippets
Help