Commit b11c6225 authored by S-Nathalia's avatar S-Nathalia
Browse files

Retirando possibilidade de um professor tecnico preencher os champos de cursos em que leciona

parent 920213d2
......@@ -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;
}
......
......@@ -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() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment