Skip to content

Commit

Permalink
Adicionado campo para nome social do professor (#137)
Browse files Browse the repository at this point in the history
* Add attribute Label for civil_name

* Add input for social name

* Add migration com os comandos sql para o nome social do professor

* Adicionado nova tag versão e as modificações na BOARD_MSG

* Add título para o tooltip do nome social e civil

* Add variableData par Civil Name e Social Name

* Add property para Nova coluna na tabela 'instructor_identification':

* add ao help os títulos do professor

* Format InstructorIdentification
  • Loading branch information
nathanipti authored Jan 13, 2023
1 parent 91084eb commit 638f4de
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 11 deletions.
5 changes: 4 additions & 1 deletion app/messages/pt_br/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@
//Student Declaration
'Student Declaration' => 'Declaração do Aluno',



//InstructorIdentification
'Nis' => 'Nº de Identificação Social (NIS)',
'Birthday Date' => 'Data de Nascimento',
Expand All @@ -582,7 +584,8 @@
'Filiation 2' => 'Nome Completo do Pai',
'Nationality' => 'Nacionalidade',
'Edcenso Nation Fk' => 'País de origem',
'Full name' => 'Nome completo',
'Social Name' => 'Nome Social',
'Civil Name' => 'Nome Civil',
'Full mothers name' => 'Nome completo da mãe',
'Full fathers name' => 'Nome completo do pai',
'Deficiency' => 'Deficiência',
Expand Down
2 changes: 2 additions & 0 deletions app/messages/pt_br/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

//Ajuda profesor
'Email' => 'exemplo@email.com.br',
'Instructor Full Civil Name' => 'Informe o nome civil completo do professor ',
'Instructor Full Social Name' => 'Informe o nome social completo do professor',

//Ajuda Aluno
'Student Full Name' => 'Informe o nome completo do aluno.',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

-- Cria a coluna `civil_name` na tabela `instructor_identification`
ALTER TABLE `instructor_identification` ADD `civil_name` VARCHAR(100) NOT NULL AFTER `name`;

--Copia todos os dados da coluna `nome` para a coluna `civil_name`
UPDATE `instructor_identification` SET `civil_name` = `name`

10 changes: 6 additions & 4 deletions app/models/InstructorIdentification.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @property string $inep_id
* @property integer $id
* @property string $name
* @property string $civil_name
* @property string $email
* @property string $nis
* @property string $birthday_date
Expand Down Expand Up @@ -89,18 +90,18 @@ public function rules()
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('school_inep_id_fk, name, birthday_date, sex, color_race, nationality, edcenso_nation_fk, deficiency, filiation', 'required'),
array('school_inep_id_fk, name, civil_name, birthday_date, sex, color_race, nationality, edcenso_nation_fk, deficiency, filiation', 'required'),
array('sex, color_race, filiation, nationality, edcenso_nation_fk, edcenso_uf_fk, edcenso_city_fk, deficiency, deficiency_type_blindness, deficiency_type_low_vision, deficiency_type_deafness, deficiency_type_disability_hearing, deficiency_type_deafblindness, deficiency_type_phisical_disability, deficiency_type_intelectual_disability, deficiency_type_multiple_disabilities, deficiency_type_autism, deficiency_type_gifted, users_fk', 'numerical', 'integerOnly'=>true),
array('register_type', 'length', 'max'=>2),
array('school_inep_id_fk', 'length', 'max'=>8),
array('inep_id', 'length', 'max'=>12),
array('name, email, filiation_1, filiation_2', 'length', 'max'=>100),
array('name, civil_name, email, filiation_1, filiation_2', 'length', 'max'=>100),
array('nis', 'length', 'max'=>11),
array('birthday_date', 'length', 'max'=>10),
array('hash', 'length', 'max'=>40),
// The following rule is used by search().
// @todo Please remove those attributes that should not be searched.
array('register_type, school_inep_id_fk, inep_id, id, name, email, nis, birthday_date, sex, color_race, filiation, filiation_1, filiation_2, nationality, edcenso_nation_fk, edcenso_uf_fk, edcenso_city_fk, deficiency, deficiency_type_blindness, deficiency_type_low_vision, deficiency_type_deafness, deficiency_type_disability_hearing, deficiency_type_deafblindness, deficiency_type_phisical_disability, deficiency_type_intelectual_disability, deficiency_type_multiple_disabilities, hash, users_fk', 'safe', 'on'=>'search'),
array('register_type, school_inep_id_fk, inep_id, id, name, civil_name, email, nis, birthday_date, sex, color_race, filiation, filiation_1, filiation_2, nationality, edcenso_nation_fk, edcenso_uf_fk, edcenso_city_fk, deficiency, deficiency_type_blindness, deficiency_type_low_vision, deficiency_type_deafness, deficiency_type_disability_hearing, deficiency_type_deafblindness, deficiency_type_phisical_disability, deficiency_type_intelectual_disability, deficiency_type_multiple_disabilities, hash, users_fk', 'safe', 'on'=>'search'),
);
}

Expand Down Expand Up @@ -130,7 +131,8 @@ public function attributeLabels() {
'school_inep_id_fk' => Yii::t('default', 'School Inep Id Fk'),
'inep_id' => Yii::t('default', 'Inep'),
'id' => Yii::t('default', 'ID'),
'name' => Yii::t('default', 'Name'),
'name' => Yii::t('default', 'Nome social'),
'civil_name' => Yii::t('default', 'Nome civil'),
'email' => Yii::t('default', 'Email'),
'nis' => Yii::t('default', 'Nis'),
'birthday_date' => Yii::t('default', 'Birthday Date'),
Expand Down
9 changes: 4 additions & 5 deletions config.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php
defined('YII_DEBUG') or define('YII_DEBUG', false);
define("TAG_VERSION", '2.13.0'.'('.Yii::getVersion().')');
defined('YII_DEBUG') or define('YII_DEBUG', true);
define("TAG_VERSION", '2.14.1'.'('.Yii::getVersion().')');
define("BOARD_MSG", '
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>20/06/2022: TAG Versão 2.12.4:</strong>
<strong>14/11/2022: TAG Versão 2.14.1:</strong>
<br>
<ul>
<li>Correção de Bugs</li>
<li>Adaptação de Campos Para o EducaCenso 2022 (Exportação) - v.5</li>
<li>Adicionado "Nome social" no formulário de cadastro de professor</li>
</ul>
<strong>08/03/2022 - 18/06/2022: TAG Versões Anteriores:</strong>
<br>
Expand Down
13 changes: 12 additions & 1 deletion themes/default/views/instructor/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,22 @@ class='btn btn-icon btn-primary next glyphicons circle_arrow_right'><?php echo Y
<?php echo $form->textField($modelInstructorIdentification, 'name', array('size' => 60, 'maxlength' => 100)); ?>
<span class="btn-action single glyphicons circle_question_mark"
data-toggle="tooltip" data-placement="top"
data-original-title="<?php echo Yii::t('help', 'Full Name'); ?>"><i></i></span>
data-original-title="<?php echo Yii::t('help', 'Instructor Full Social Name'); ?>"><i></i></span>
<?php echo $form->error($modelInstructorIdentification, 'name'); ?>
</div>
</div>

<div class="control-group">
<?php echo $form->labelEx($modelInstructorIdentification, 'civil_name', array('class' => 'control-label')); ?>
<div class="controls">
<?php echo $form->textField($modelInstructorIdentification, 'civil_name', array('size' => 60, 'maxlength' => 100)); ?>
<span class="btn-action single glyphicons circle_question_mark"
data-toggle="tooltip" data-placement="top"
data-original-title="<?php echo Yii::t('help', 'Instructor Full Civil Name'); ?>"><i></i></span>
<?php echo $form->error($modelInstructorIdentification, 'civil_name'); ?>
</div>
</div>

<div class="control-group">
<?php echo $form->labelEx($modelInstructorDocumentsAndAddress, 'cpf', array('class' => 'control-label required')); ?>
<div class="controls">
Expand Down

0 comments on commit 638f4de

Please # to comment.