Commit ff70d88de75e1db8f517400e97bfae5c113b31f9
1 parent
3f5a175a
Exists in
master
#37 Removendo obrigatoriedade de campos de horários no cadastro escola-serie
Showing
3 changed files
with
27 additions
and
5 deletions
Show diff stats
ieducar/intranet/educar_escola_serie_cad.php
@@ -203,14 +203,14 @@ class indice extends clsCadastro | @@ -203,14 +203,14 @@ class indice extends clsCadastro | ||
203 | $this->hora_fim_intervalo = substr($this->hora_fim_intervalo, 0, 5); | 203 | $this->hora_fim_intervalo = substr($this->hora_fim_intervalo, 0, 5); |
204 | 204 | ||
205 | // hora | 205 | // hora |
206 | - $this->campoHora('hora_inicial', 'Hora Inicial', $this->hora_inicial, TRUE); | ||
207 | - $this->campoHora('hora_final', 'Hora Final', $this->hora_final, TRUE); | 206 | + $this->campoHora('hora_inicial', 'Hora Inicial', $this->hora_inicial, FALSE); |
207 | + $this->campoHora('hora_final', 'Hora Final', $this->hora_final, FALSE); | ||
208 | 208 | ||
209 | $this->campoHora('hora_inicio_intervalo', 'Hora Início Intervalo', | 209 | $this->campoHora('hora_inicio_intervalo', 'Hora Início Intervalo', |
210 | - $this->hora_inicio_intervalo, TRUE); | 210 | + $this->hora_inicio_intervalo, FALSE); |
211 | 211 | ||
212 | $this->campoHora('hora_fim_intervalo', 'Hora Fim Intervalo', | 212 | $this->campoHora('hora_fim_intervalo', 'Hora Fim Intervalo', |
213 | - $this->hora_fim_intervalo, TRUE); | 213 | + $this->hora_fim_intervalo, FALSE); |
214 | 214 | ||
215 | $this->campoCheck("bloquear_enturmacao_sem_vagas", "Bloquear enturmação após atingir limite de vagas", $this->bloquear_enturmacao_sem_vagas); | 215 | $this->campoCheck("bloquear_enturmacao_sem_vagas", "Bloquear enturmação após atingir limite de vagas", $this->bloquear_enturmacao_sem_vagas); |
216 | 216 |
ieducar/intranet/include/pmieducar/clsPmieducarEscolaSerie.inc.php
@@ -274,7 +274,7 @@ class clsPmieducarEscolaSerie | @@ -274,7 +274,7 @@ class clsPmieducarEscolaSerie | ||
274 | */ | 274 | */ |
275 | function cadastra() | 275 | function cadastra() |
276 | { | 276 | { |
277 | - if( is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_serie ) && is_numeric( $this->ref_usuario_cad ) && ( $this->hora_inicial ) && ( $this->hora_final ) && ( $this->hora_inicio_intervalo ) && ( $this->hora_fim_intervalo ) ) | 277 | + if( is_numeric( $this->ref_cod_escola ) && is_numeric( $this->ref_cod_serie ) && is_numeric( $this->ref_usuario_cad ) ) |
278 | { | 278 | { |
279 | $db = new clsBanco(); | 279 | $db = new clsBanco(); |
280 | 280 |
ieducar/misc/database/deltas/portabilis/54_retira_obrigatoriedade_de_campos_hora_em_escola_serie.sql
0 → 100644
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | + -- // | ||
2 | + | ||
3 | + -- | ||
4 | + -- Altera campos 'hora_inicial', 'hora_final', 'hora_inicio_intervalo', 'hora_fim_intervalo' para NULL | ||
5 | + -- | ||
6 | + -- @author Lucas Schmoeller da Silva <lucas@portabilis.com.br> | ||
7 | + -- @license @@license@@ | ||
8 | + -- @version $Id$ | ||
9 | + | ||
10 | + ALTER TABLE pmieducar.escola_serie ALTER COLUMN hora_inicial drop not null; | ||
11 | + ALTER TABLE pmieducar.escola_serie ALTER COLUMN hora_final drop not null; | ||
12 | + ALTER TABLE pmieducar.escola_serie ALTER COLUMN hora_inicio_intervalo drop not null; | ||
13 | + ALTER TABLE pmieducar.escola_serie ALTER COLUMN hora_fim_intervalo drop not null; | ||
14 | + | ||
15 | + -- //@UNDO | ||
16 | + | ||
17 | + ALTER TABLE pmieducar.escola_serie ALTER COLUMN hora_inicial set not null; | ||
18 | + ALTER TABLE pmieducar.escola_serie ALTER COLUMN hora_final set not null; | ||
19 | + ALTER TABLE pmieducar.escola_serie ALTER COLUMN hora_inicio_intervalo set not null; | ||
20 | + ALTER TABLE pmieducar.escola_serie ALTER COLUMN hora_fim_intervalo set not null; | ||
21 | + | ||
22 | + -- // | ||
0 | \ No newline at end of file | 23 | \ No newline at end of file |