=1950;$i--){ $anio_promocion[$i] = $i; } $path = drupal_get_path('module', 'telematica'); $obTbUsuario = new TBusuario(); $options = $obTbUsuario->frowRoles(); $vinculaciones = $obTbUsuario->frowVinculaciones(); //NIvel de formacion $obTBnivel_formacion = new TBnivel_formacion(); $rowsNivelFormacion = $obTBnivel_formacion->frowsListaValores(); $departamentos = $obTbUsuario->frowDepartamentos(); $form['#action'] = url('telematica/usuario_regist'); $form['#attributes'] = array('enctype' => "multipart/form-data",'name'=>'crear-usuario-form', 'onSubmit'=>"checkOnSubmit('crear-usuario-form', rules);return false;"); $form['nombres'] = array( '#type' => 'textfield', '#required' => TRUE, '#prefix'=>'* Datos obligatorios
', '#title' => t('Nombres'), ); $form['apellidos'] = array ( '#type' => 'textfield', '#required' => TRUE, '#title' => t('Apellidos') ); $form['cedula'] = array ( '#type' => 'textfield', '#required' => TRUE, '#title' => t('Cédula') ); $form['telefono'] = array ( '#type' => 'textfield', '#title' => t('Teléfono') ); $form['fax'] = array ( '#type' => 'textfield', '#title' => t('Fax') ); $form['oficina'] = array ( '#type' => 'textfield', '#title' => t('Oficina') ); $form['universidad'] = array ( '#type' => 'textfield', '#title' => t('Universidad') ); $form['url_universidad'] = array ( '#type' => 'textfield', '#title' => t('Url Universidad') ); $form['direcciones'] = array ( '#type' => 'textarea', '#title' => t('Direcciones') ); $form['nivel_formacion'] = array ( '#type' => 'select', '#options' => $rowsNivelFormacion, '#title'=> t('Nivel de formación') ); $form['fecha_graduacion'] = array ( '#type' => 'date', '#title' => t('Fecha de graduación'), '#required' => false, '#description' => t('Fecha de grado del último programa cursado')); $form['descr_perfil_profesional'] = array ( '#type' => 'textarea', '#title'=> t('Descripción del título profesional') ); $form['estudios_realizados'] = array ( '#type' => 'textarea', '#title'=> t('Estudios realizados')); $form['areas_interes'] = array ( '#type' => 'textarea', '#title'=> t('Áreas de interes') ); $form['experiencia_laboral'] = array ( '#type' => 'textarea', '#title'=>t('Experiencia laboral') ); $form['otras_actividades'] = array ( '#type' => 'textarea', '#title'=>t('Otras actividades') ); $form['url_cv'] = array ( '#type' => 'textfield', '#title'=>t('URL hoja de vida'), '#description' => t('Enlace a la página personal o al CvLAC')); /*$form['promocion'] = array ( '#type' => 'select', '#options' => $anio_promocion, '#title'=>t('Año Promocion') );*/ $form['url_foto_usuario'] = array ( '#type' => 'file', '#title'=> t('Foto'), '#description' => t('La imagen se redimensionará a 120px de ancho')); $form['rol'] = array ( '#type' => 'select', '#options' => $options, '#title'=> t('Perfil') ); $form['vinculaciones_id'] = array ( '#type' => 'select', '#options' => $vinculaciones, '#title'=> t('Tipo de vinculación'), '#description' => t('Vínculo laboral con la Universidad del Cauca')); $form['tel_departamento_id'] = array ( '#type' => 'select', '#options' => $departamentos, '#title'=> t('Departamento')); $form['username'] = array ( '#type' => 'textfield', '#required' => TRUE, '#title'=> t('Nombre de usuario') ); $form['email'] = array ( '#type' => 'textfield', '#required' => TRUE, '#title'=> t('Email') ); $form['password'] = array ( '#type' => 'password', '#required' => TRUE, '#title'=> t('Contraseña') ); $form['password2'] = array ( '#type' => 'password', '#required' => TRUE, '#title'=> t('Repetir contraseña') ); $form['alertType'] = array ( '#type' => 'hidden', '#id' => 'alertType', '#value'=>'inline'); $form['status'] = array( '#type' => 'markup', '#value' => "

", ); $form['submit'] = array ( '#type' => 'submit', '#value' => t('Registrar')); return $form; }; function crear_usuario_form_validate($form, &$form_state) { form_set_error('email', 'Enter a year between 1900 and 2000.'); } function crear_usuario_form_submit($form, &$form_state) { drupal_set_message(t('resultado del formulario')); }