From 69bf162d344866dc2e4115b7c5e32755c05c85fc Mon Sep 17 00:00:00 2001 From: Lucas Schmoeller da Silva Date: Thu, 8 Aug 2013 14:17:31 -0300 Subject: [PATCH] #13 Na página de cadastro de pessoa física, fazer o campo naturalidade ser obrigatório somente para pais --- ieducar/intranet/atendidos_cad.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ieducar/intranet/atendidos_cad.php b/ieducar/intranet/atendidos_cad.php index 3f3f6a4..7052dd0 100755 --- a/ieducar/intranet/atendidos_cad.php +++ b/ieducar/intranet/atendidos_cad.php @@ -171,6 +171,7 @@ class indice extends clsCadastro // ao cadastrar pessoa do pai ou mãe apartir do cadastro de outra pessoa, // é enviado o tipo de cadastro (pai ou mae). $parentType = isset($_REQUEST['parent_type']) ? $_REQUEST['parent_type'] : ''; + $naturalidadeObrigatoria = ($parentType == '' ? true : false); // sexo @@ -574,7 +575,8 @@ class indice extends clsCadastro // naturalidade - $options = array('label' => 'Naturalidade', 'required' => true); + //$options = array('label' => 'Naturalidade', 'required' => true); + $options = array('label' => 'Naturalidade', 'required' => $naturalidadeObrigatoria); $helperOptions = array('objectName' => 'naturalidade', 'hiddenInputOptions' => array('options' => array('value' => $this->naturalidade_id))); -- libgit2 0.21.2