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
e2fb03cf
Commit
e2fb03cf
authored
Jul 01, 2021
by
Gabriel-31415
Browse files
ajuste no formulario, anexos do comite e justificativa
parent
9eeb2fac
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/Http/Requests/UpdateTrabalho.php
View file @
e2fb03cf
...
...
@@ -43,10 +43,10 @@ class UpdateTrabalho extends FormRequest
'anexoLattesCoordenador'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoLattesCoordenador
==
null
)],
'mimes:pdf'
],
'anexoGrupoPesquisa'
=>
[[
Rule
::
requiredIf
(
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoGrupoPesquisa
==
null
)],
'mimes:pdf'
],
'anexoAutorizacaoComiteEtica'
=>
[
Rule
::
requiredIf
((
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
)
)
Rule
::
requiredIf
((
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
justificativaAutorizacaoEtica
==
null
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
)
)
],
'justificativaAutorizacaoEtica'
=>
[
Rule
::
requiredIf
((
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
))
Rule
::
requiredIf
((
!
$this
->
has
(
'rascunho'
)
&&
$projeto
->
anexoAutorizacaoComiteEtica
==
null
&&
$projeto
->
justificativaAutorizacaoEtica
==
null
))
],
];
...
...
@@ -91,4 +91,14 @@ class UpdateTrabalho extends FormRequest
return
$rules
;
}
}
public
function
messages
()
{
return
[
'titulo.required'
=>
'O :attribute é obrigatório'
,
'justificativaAutorizacaoEtica.required'
=>
'O campo justificativa Autorizacao Etica é obrigatório'
,
'anexoAutorizacaoComiteEtica.required'
=>
'O campo anexoAutorizacao Comite Etica é obrigatório'
,
];
}
}
config/database.php
View file @
e2fb03cf
<?php
use
Illuminate\Support\Str
;
$DATABASE_URL
=
parse_url
(
'postgres://shldedzeknxkxv:2b9d0bcbdc7bd07dcbc4db2716e1af333788b38234d527435607a3fd1353f52b@ec2-54-227-246-76.compute-1.amazonaws.com:5432/d87d2lg0us76su'
);
//
$DATABASE_URL=parse_url('postgres://shldedzeknxkxv:2b9d0bcbdc7bd07dcbc4db2716e1af333788b38234d527435607a3fd1353f52b@ec2-54-227-246-76.compute-1.amazonaws.com:5432/d87d2lg0us76su');
return
[
/*
...
...
@@ -63,34 +63,34 @@ return [
])
:
[],
],
// 'pgsql' => [
// 'driver' => 'pgsql',
// 'url' => env('DATABASE_URL'),
// 'host' => env('DB_HOST', '127.0.0.1'),
// 'port' => env('DB_PORT', '5432'),
// 'database' => env('DB_DATABASE', 'forge'),
// 'username' => env('DB_USERNAME', 'forge'),
// 'password' => env('DB_PASSWORD', ''),
// 'charset' => 'utf8',
// 'prefix' => '',
// 'prefix_indexes' => true,
// 'schema' => 'public',
// 'sslmode' => 'prefer',
// ],
'pgsql'
=>
array
(
'driver'
=>
'pgsql'
,
'host'
=>
$DATABASE_URL
[
'host'
],
'port'
=>
$DATABASE_URL
[
'port'
],
'database'
=>
ltrim
(
$DATABASE_URL
[
'path'
],
"/"
),
'username'
=>
$DATABASE_URL
[
'user'
],
'password'
=>
$DATABASE_URL
[
'pass'
],
'charset'
=>
'utf8'
,
'prefix'
=>
''
,
'pgsql'
=>
[
'driver'
=>
'pgsql'
,
'url'
=>
env
(
'DATABASE_URL'
),
'host'
=>
env
(
'DB_HOST'
,
'127.0.0.1'
),
'port'
=>
env
(
'DB_PORT'
,
'5432'
),
'database'
=>
env
(
'DB_DATABASE'
,
'forge'
),
'username'
=>
env
(
'DB_USERNAME'
,
'forge'
),
'password'
=>
env
(
'DB_PASSWORD'
,
''
),
'charset'
=>
'utf8'
,
'prefix'
=>
''
,
'prefix_indexes'
=>
true
,
'schema'
=>
'public'
,
'sslmode'
=>
'prefer'
,
),
'schema'
=>
'public'
,
'sslmode'
=>
'prefer'
,
],
// 'pgsql' => array(
// 'driver' => 'pgsql',
// 'host' => $DATABASE_URL['host'],
// 'port' => $DATABASE_URL['port'],
// 'database' => ltrim($DATABASE_URL['path'], "/"),
// 'username' => $DATABASE_URL['user'],
// 'password' => $DATABASE_URL['pass'],
// 'charset' => 'utf8',
// 'prefix' => '',
// 'prefix_indexes' => true,
// 'schema' => 'public',
// 'sslmode' => 'prefer',
// ),
'sqlsrv'
=>
[
'driver'
=>
'sqlsrv'
,
...
...
database/migrations/2021_07_01_123506_alter_table_eventos.php
0 → 100644
View file @
e2fb03cf
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AlterTableEventos
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
boolean
(
'consu'
)
->
default
(
false
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
(
'consu'
);
});
}
}
resources/views/projeto/editaFormulario/anexos.blade.php
View file @
e2fb03cf
...
...
@@ -140,15 +140,15 @@
<div
class=
"form-group col-md-6"
>
<label
for=
"botao"
class=
"col-form-label @error('botao') is-invalid @enderror"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"Se possuir, coloque todas em único arquivo pdf."
style=
"margin-right: 15px;"
>
{{ __('Possui autorizações especiais?') }}
<span
style=
"color: red; font-weight:bold"
>
*
</span></label>
<input
type=
"radio"
checked
id=
"radioSim"
name=
"sim"
onchange=
"displayAutorizacoesEspeciais('sim')"
>
<input
type=
"radio"
id=
"radioSim"
@
if
($
projeto-
>
anexoAutorizacaoComiteEtica) checked @endif
name="sim" onchange="displayAutorizacoesEspeciais('sim')">
<label
for=
"radioSim"
style=
"margin-right: 5px"
>
Sim
</label>
<input
type=
"radio"
id=
"radioNao"
name=
"nao"
onchange=
"displayAutorizacoesEspeciais('nao')"
>
<input
type=
"radio"
id=
"radioNao"
@
if
($
projeto-
>
justificativaAutorizacaoEtica) checked @endif
name="nao" onchange="displayAutorizacoesEspeciais('nao')">
<label
for=
"radioNao"
style=
"margin-right: 5px"
>
Não
</label><br>
<span
id=
"idAvisoAutorizacaoEspecial"
class=
"invalid-feedback"
role=
"alert"
style=
"overflow: visible; display:none"
>
<strong>
Selecione a autorização e envie o arquivo!
</strong>
</span>
<div
class=
"form-group"
id=
"displaySim"
style=
"display: block; margin-top:-1rem"
>
<div
class=
"form-group"
id=
"displaySim"
@
if
($
projeto-
>
anexoAutorizacaoComiteEtica) style="display: block; margin-top:-1rem" @else style="display: none; margin-top:-1rem" @endif
>
@component('componentes.input', ['label' => 'Sim, declaro que necessito de autorizações especiais (.pdf)'])
<input
type=
"file"
class=
"input-group-text"
name=
"anexoAutorizacaoComiteEtica"
accept=
".pdf"
/>
<div
class=
"row justify-content-center"
>
...
...
@@ -173,7 +173,7 @@
@endcomponent
</div>
<div
class=
"form-group"
id=
"displayNao"
style=
"display: none; margin-top:-1rem"
>
<div
class=
"form-group"
id=
"displayNao"
@
if
($
projeto-
>
justificativaAutorizacaoEtica) style="display: block; margin-top:-1rem" @else
style="display: none; margin-top:-1rem"
@endif
>
@component('componentes.input', ['label' => 'Declaração de que não necessito de autorização especiais (.pdf)'])
<input
type=
"file"
class=
"input-group-text"
name=
"justificativaAutorizacaoEtica"
accept=
".pdf"
/>
@if($projeto->justificativaAutorizacaoEtica || $projeto->anexoAutorizacaoComiteEtica )
...
...
resources/views/projeto/editar.blade.php
View file @
e2fb03cf
...
...
@@ -106,6 +106,19 @@
<
script
>
if
(
document
.
getElementById
(
"radioSim"
)
.
checked
){
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
{
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"
;
}
let
buttonSubmit
=
document
.
getElementById
(
'idButtonSubmitProjeto'
);
let
buttonRascunho
=
document
.
getElementById
(
'idButtonSubmitRascunho'
);
...
...
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