Conjunto 518259e en sipes
- Fecha y hora:
- 07/07/2016 10:20:10 (hace 8 años)
- Branches:
- stable, version-3.0
- Children:
- 5bee648
- Parents:
- 15f3818
- Fichero:
-
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
0.3-modules/proyectos_operativos/proyectos_operativos.module
ra0cf94c r518259e 571 571 function _proyectos_operativos_access_editar($node) { 572 572 global $user; 573 if (module_exists('workflow')) {573 /* if (module_exists('workflow')) { 574 574 $estado_aprobado = variable_get('proyectos_operativos_state_aprobado', NULL); 575 575 $estado_naprobado = variable_get('proyectos_operativos_state_naprobado', NULL); … … 577 577 return FALSE; 578 578 } 579 } 579 }*/ 580 580 if ($node->anhoproyectos_operativos != variable_get('proyectos_operativos_anho_creacion', 0)) { 581 581 return FALSE; … … 980 980 'thousands_sep' => variable_get('proyectos_operativos_number_thousands_sep', '.'), 981 981 ); 982 // $sumas = array(); 982 983 $cantidad++; 983 984 $texto_1_aux = $tipo == 'talento' ? 'talento-humano' : $tipo; … … 1043 1044 foreach($arreglo as $field_id => $field) { 1044 1045 //$field_id1 = 'edit-' . str_replace('_', '-', $field_id . '_' . $i); 1045 $_POST[$field_id . '_' . $i] = str_replace( '.', '', $_POST[$field_id . '_' . $i]);1046 $_POST[$field_id . '_' . $i] = str_replace($format_number['dec_point'], '', $_POST[$field_id . '_' . $i]); 1046 1047 $valor = intval($_POST[$field_id . '_' . $i]) > 0 ? intval($_POST[$field_id . '_' . $i]) : 0; 1047 1048 if ($field_id == 'field_proyecto_beneficiario') { … … 1139 1140 $new_form['cantidad_' . $tipo] = $form[$tipo]['cantidad_' . $tipo]; 1140 1141 unset($new_form['cantidad_' . $tipo]['#suffix']); 1141 unset($new_form['#prefix'], $new_form['#suffix']); // Prevent duplicate wrappers.1142 unset($new_form['#prefix'], $new_form['#suffix']); // Prevent duplicate wrappers. 1142 1143 //unset($new_form['agrega_' . $tipo]); 1143 1144 $output = drupal_render($new_form); 1145 1146 drupal_add_js($sumas, 'setting'); 1147 $output .= drupal_get_js(); 1148 1144 1149 print drupal_to_js(array('data' => $output, 'status' => true)); 1145 1150 exit(); … … 1916 1921 $arreglo['ip']['resultadop'] = array( 1917 1922 'field_proyecto_descripcion_bien' => 'field_proyecto_descripcion_bien', 1918 'field_proyecto_so_cuantificacion' => 'field_proyecto_so_cuantificacion',1923 //'field_proyecto_so_cuantificacion' => 'field_proyecto_so_cuantificacion', 1919 1924 'field_proyecto_unidadm' => 'field_proyecto_unidadm', 1920 1925 'field_proyecto_meta_m' => 'field_proyecto_meta_m', … … 2368 2373 $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : ''; 2369 2374 if ($op == t('Volver a las opciones de campo')) { 2370 unset($_SESSION['proyectos_operativos_mostrar_campos'][$form['#node']->nid]);2371 2375 $form_state['redirect'] = 'proyectosop/' . $form['#node']->nid; 2372 2376 return; … … 2466 2470 } 2467 2471 } 2468 //mostrar por defecto el formulario de busqueda.2469 unset($_SESSION['proyectos_operativos_mostrar_campos'][$node->nid]);2470 2472 } 2471 2473 if (count($views)) { … … 2690 2692 'class' => 'proyectos-operativos-modificar', 2691 2693 ); 2692 if (_proyectos_operativos_edita_datos_ae_access($node_accion)) {2694 /*if (_proyectos_operativos_edita_datos_ae_access($node_accion)) { 2693 2695 $links['proyecto_ae_update'] = array( 2694 2696 'data' => l(t('Modificar las Acciones EspecÃficas'), 'proyectosopedit/' . $proyecto->nid . '/ae'), … … 2696 2698 'class' => 'proyectos-operativos-ae-modificar', 2697 2699 ); 2698 } 2700 }*/ 2699 2701 $links['proyecto_remove'] = array( 2700 2702 'data' => l(t('Eliminar'), 'proyectosop/' . $proyecto->nid . '/remove'), … … 2710 2712 ); 2711 2713 } 2714 /* 2712 2715 if (_proyectos_operativos_ver_datos_wk_access($node_accion)) { 2713 2716 $links['proyecto_ae_view'] = array( … … 2719 2722 'class' => 'proyectos-operativos-finacieros', 2720 2723 ); 2721 } 2724 }*/ 2722 2725 } 2723 2726 … … 3388 3391 'field_proyecto_sector' => 'field_proyecto_sector', 3389 3392 ); 3393 $sumas['beneficiarios'] = array(); 3390 3394 $fields_form_dg_se = array(); 3391 3395 if (is_array($fields) && count($fields)) { … … 3425 3429 } 3426 3430 if (is_array($field_form) && count($field_form)) { 3431 $sumas['beneficiarios']['empleos_generados'] = 'empleos_generados'; 3427 3432 module_load_include('inc', 'content', 'includes/content.node_form'); 3428 3433 foreach ($field_form as $field_id) { … … 3615 3620 $totales = 0; 3616 3621 $total_arreglo = array(); 3617 $sumas['beneficiarios'] = array();3618 3622 $vid = variable_get('proyectos_operativos_extra_bene', 0); 3619 3623 //$terms = taxonomy_get_tree($vid); … … 3689 3693 } 3690 3694 $sumas['beneficiarios']['todosbeneficiarios'] = 'todosbeneficiarios'; 3691 $sumas['beneficiarios']['empleos_generados'] = 'empleos_generados';3692 drupal_add_js($sumas, 'setting');3693 3695 $form['#sumas'] = $sumas; 3694 3696 $form['beneficiario'][$aux . '_' . $aui]['#suffix'] .= '<td align="center"><div class="todosbeneficiarios_total">' . $totales . '</div></td></tr>'; … … 3706 3708 ), 3707 3709 ); 3710 } 3711 if (count($sumas)) { 3712 drupal_add_js($sumas, 'setting'); 3708 3713 } 3709 3714 $field_form = array(); … … 4208 4213 $arreglo = array(); 4209 4214 $arreglo['field_proyecto_descripcion_bien'] = 'field_proyecto_descripcion_bien'; 4210 $arreglo['field_proyecto_so_cuantificacion'] = 'field_proyecto_so_cuantificacion';4215 //$arreglo['field_proyecto_so_cuantificacion'] = 'field_proyecto_so_cuantificacion'; 4211 4216 $arreglo['field_proyecto_unidadm'] = 'field_proyecto_unidadm'; 4212 4217 $personas = variable_get('proyectos_operativos_allow_unidpersona', array()); … … 4321 4326 form_set_error('field_proyecto_meta_fisica', t('La Distribución de la Meta FisÃca del Proyecto debe tener al menos un resultado')); 4322 4327 } 4323 4328 /* 4324 4329 if ($form_state['values']['field_proyecto_so_cuantificacion'][0]['value'] != $suma) { 4325 4330 form_set_error('field_proyecto_so_cuantificacion', t('La cuantificación de la Meta del Proyectos debe ser igual a la Distribución de la Meta FisÃca')); 4326 4331 } 4327 4332 */ 4328 4333 4329 4334 … … 5026 5031 $output .= drupal_render($form['field_proyecto_descripcion_bien']); 5027 5032 $output .= drupal_render($form['field_proyecto_unidadm']); 5028 $output .= drupal_render($form['field_proyecto_so_cuantificacion']);5033 //$output .= drupal_render($form['field_proyecto_so_cuantificacion']); 5029 5034 if (isset($form['field_proyecto_meta_m']) && $form['field_proyecto_meta_f']) { 5030 5035 $output .= '<div id="meta-unidm-pers"><table id="unidm-persona" style="width:400px"><tr><th>' . $form['field_proyecto_meta_m']['#title'] . '</th><th>' . $form['field_proyecto_meta_f']['#title'] . '</th><th>' . t('Total') . '</th></tr><tr>';
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.