/**
  * This is construct base of the class.
  *
  * A public constructor; initializes the variable $instanceDataBase.
  *
  */
 public function __construct($instanceDataBase)
 {
     parent::__construct($instanceDataBase);
     MaritalStatus::setDataOperationBusiness($instanceDataBase);
     MaritalStatus::getBusiness();
     MaritalStatus::getDescriptionBusiness();
 }
Example #2
0
 public function actionEditmoreinfo($user_id)
 {
     $user_more_info = UserInfoAR::model()->findByPk($user_id);
     $this->assign('user_more', $user_more_info);
     $maritalStatus = MaritalStatus::model()->findAll();
     // 'MaritalStatus', 'marital_status_id'),
     $hometown = Hometown::model()->findAll();
     // 'Province', 'hometown_id'),
     $nation = Nation::model()->findAll();
     // 'Nation', 'nation_id'),
     $bodyType = BodyType::model()->findAll();
     // 'BodyType', 'body_type_id'),
     $education = Education::model()->findAll();
     // 'Education', 'education_id'),
     $school = School::model()->findAll();
     // 'School', 'school_id'),
     $province = Province::model()->findAll();
     // 'Province', 'province_id'),
     $job = Job::model()->findAll();
     // '$maritalSta,
     $this->assign('maritalStatus', $maritalStatus);
     $this->assign('hometown', $hometown);
     $this->assign('nation', $nation);
     $this->assign('bodyType', $bodyType);
     $this->assign('education', $education);
     $this->assign('school', $school);
     $this->assign('province', $province);
     $this->assign('job', $job);
 }
 /**
  *   Función responsable de obtener el listado de estados civiles 
  *   disponibles para el país actual.
  *
  *   @return array, lista de estados civiles encontrados.
  */
 public function getMaritalStatusList($countryId = '')
 {
     if (empty($countryId)) {
         $countryId = Config::get('constants.APP.COUNTRY_CODES.CO');
     }
     $maritalStatusList = MaritalStatus::where('countryId', $countryId)->orderBy(Config::get('constants.MARITAL_STATUS.ATTRS.MARITAL_STATUS_ID'))->get();
     return $maritalStatusList;
 }
 public function run()
 {
     DB::table('marital_status')->truncate();
     /**
      *	Estados civiles para Colombia ("countryId" => 53)
      */
     $maritalStatusList = [["countryId" => 53, "name" => 'Soltero/a'], ["countryId" => 53, "name" => 'Casado/a'], ["countryId" => 53, "name" => 'Viudo/a'], ["countryId" => 53, "name" => 'Divorciado/a'], ["countryId" => 53, "name" => 'Unión libre'], ["countryId" => 53, "name" => 'Otro']];
     foreach ($maritalStatusList as $maritalStatus) {
         MaritalStatus::create($maritalStatus);
     }
 }
Example #5
0
 /**
  * @return array with filters for templated ListGrid widget
  */
 public static function getUsersFiltersForListGrid()
 {
     return array('id' => '', 'first_name' => '', 'email' => '', 'sex' => self::getSexOptions(), 'marital_id' => MaritalStatus::getOptions('Сімейни стан'), 'is_banned' => self::getBannedOptions());
 }
Example #6
0
?>
    <?php 
echo FormDecorator::textField($model, 'last_name', array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>
    <?php 
echo FormDecorator::textField($model, 'email', array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>
    <?php 
echo FormDecorator::textField($model, 'password', array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>

    <?php 
echo FormDecorator::dropDownList($model, 'sex', User::getSexOptions(), array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>
    <?php 
echo FormDecorator::dropDownList($model, 'marital_id', MaritalStatus::getOptions(), array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>

    <?php 
echo FormDecorator::textField($model, 'country', array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>
    <?php 
echo FormDecorator::textField($model, 'city', array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>
    <?php 
echo FormDecorator::textField($model, 'languages', array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>
    <?php 
echo FormDecorator::textField($model, 'contacts', array('onclick' => 'backendController.removeErrorHighlighting( this )'));
?>
    <?php 
                }
            }});

    });
</script>
<?php 
$action = 'LIST';
if (isset($_POST['ACTION'])) {
    $action = $_POST['ACTION'];
} else {
    if (isset($_GET['ACTION'])) {
        $action = $_GET['ACTION'];
    }
}
$user = new User($registry[$nameDataBase]);
$catalog = new MaritalStatus($registry[$nameDataBase]);
// Simplificar la ruta de propiedades
$v_label = $property["pages"]["person/marital_status_admin"];
$v_label_list = $property["pages"]["general_list"];
// Simplificar el ruteo de edicion/visualizacion
$v_route_edit_preview = 'index.php?page=person/marital_status';
// Simplificar el ruteo de insert
$v_route_insert = '?page=person/marital_status';
// Simplificar el ruteo de lista
$v_route_list = 'index.php?page=person/marital_status_admin';
switch ($action) {
    case 'INSERT':
        $transaction = new Transaction($registry[$nameDataBase]);
        MaritalStatus::setDataOperationBusiness($registry[$nameDataBase]);
        $idTransaction = $transaction->insertTransaction(array(MaritalStatus::$business, MaritalStatus::$insert, MaritalStatus::$descriptionBusiness));
        $data = array($_POST['NAME']);
                              <td>TRABAJA EN:</td>
                              <td>
                               <?php 
$trabaja_en_madre = $action == 'EDIT' ? $data_madre['works'] : '';
if ($action == 'EDIT' || $action == 'INSERT') {
    Forms::printInput('TEXT', 'trabaja_en_madre', $trabaja_en_madre, 'mini', array());
} elseif ($action == 'PREVIEW') {
    echo $data_madre['works'];
}
?>
                              </td>
                            </tr>
                            <tr>
                              <td>ESTADO CIVIL: </td>
                              <td>  <?php 
$object = new MaritalStatus($db);
$catalogo = $object->getListMaritalStatus();
?>
                                  <select name="MARITAL_STATUS_MADRE">
                                      <option value="0">SELECCIONE UNA OPCION</option>
                                      <?php 
$marital_status = '';
if ($action == 'EDIT' || $action == 'PREVIEW') {
    $marital_status = $data_madre['marital_status'];
}
foreach ($catalogo as $item) {
    ?>
                                      
                                      <option value="<?php 
    echo $item['id'];
    ?>
$v_label = $property["pages"]["person/marital_status"];
// Decidir en funcion a la accion
$title_1 = $v_label["NEW_TITLE"];
// INSERT
$action = 'INSERT';
if (isset($_GET['EDIT'])) {
    $action = 'EDIT';
    $title_1 = $v_label["EDIT_TITLE"];
    $elementAction = $_GET['EDIT'];
} elseif (isset($_GET['PREVIEW'])) {
    $action = 'PREVIEW';
    $title_1 = $v_label["PREVIEW_TITLE"];
    $elementAction = $_GET['PREVIEW'];
}
if ($action != 'INSERT') {
    $element = new MaritalStatus($registry[$nameDataBase]);
    $list = $element->getListMaritalStatus($elementAction);
    $data = $list[0];
}
// simplificar acceso a etiquetas de formulario
$v_label_gral_form = $property["pages"]["general_form"];
?>




<div class="grid_10">
    <div class="box round first">
        <h2><?php 
echo $title_1;
?>
 public function actionSettings()
 {
     $this->pageTitle .= ' - Туристичні знайомства - Налаштування';
     $this->breadcrumbs = array('Головна' => $this->createUrl('site/index'), 'Туристичні знайомства' => $this->createUrl('index'), 'Налаштування');
     $this->render('settings', array('changePasswordForm' => new ChangePasswordForm(), 'changePasswordAction' => $this->createUrl('ChangePasswordHandler'), 'userModel' => Yii::app()->user->getModel(), 'updateProfileAction' => $this->createUrl('UpdateProfileHandler'), 'maritalStatuses' => MaritalStatus::getOptions('Ваш сімейний стан'), 'sexOptions' => User::getSexOptions()));
 }