t('Seleccione'), '1' => t('January'), '2' => t('February'), '3' => t('March'), '4' => t('April'), '5' => t('May'), '6' => t('June'), '7' => t('July'), '8' => t('August'), '9' => t('September'), '10' => t('Octuber'), '11' => t('November'), '12' => t('December'), ); $current_year = date("Y"); if (!variable_get('acciones_centralizadas_anho_creacion', 0)) { $years[0] = t('Seleccione'); } for($i = $current_year - 10; $i <= $current_year; $i++) { $years[$i] = $i; } $form = array(); $form['days'] = array( '#type' => 'fieldset', '#title' => t('Fechas'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['days']['acciones_centralizadas_anho_creacion'] = array( '#title' => t('Gestionar acción centralizada para el año'), '#type' => 'select', '#default_value' => variable_get('acciones_centralizadas_anho_creacion', 0), '#options' => $years, ); $form['days']['seguimiento'] = array( '#type' => 'fieldset', '#title' => t('Seguimiento'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['days']['seguimiento']['acciones_centralizadas_mes_seguimiento'] = array( '#title' => t('Habilitar seguimiento para el mes'), '#type' => 'select', '#default_value' => variable_get('acciones_centralizadas_mes_seguimiento', 0), '#options' => $ftypes, ); $form['days']['seguimiento']['acciones_centralizadas_anho_seguimiento'] = array( '#title' => t('Habilitar seguimiento para el año'), '#type' => 'select', '#default_value' => variable_get('acciones_centralizadas_anho_seguimiento', 0), '#options' => $years, ); $form['format_number'] = array( '#type' => 'fieldset', '#title' => t('Formato Númerico'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['format_number']['acciones_centralizadas_number_demostracion'] = array( '#value' => '' . t('Convertir número @numero en @numero_conversion', array('@numero' => '4123123.23', '@numero_conversion' => number_format(4123123.23, variable_get('proyectos_operativos_number_decimals', 0), variable_get('proyectos_operativos_number_dec_point', ','), variable_get('proyectos_operativos_number_thousands_sep', '.')))) . '', '#weight' => -10, ); $form['format_number']['acciones_centralizadas_number_decimals'] = array( '#type' => 'textfield', '#title' => t('Cantidad de Decimales.'), '#required' => TRUE, '#weight' => -9, '#default_value' => variable_get('acciones_centralizadas_number_decimals', 0), ); $form['format_number']['acciones_centralizadas_number_dec_point'] = array( '#type' => 'textfield', '#title' => t('Separador Decimal.'), '#required' => TRUE, '#weight' => -9, '#default_value' => variable_get('acciones_centralizadas_number_dec_point', ','), ); $form['format_number']['acciones_centralizadas_number_thousands_sep'] = array( '#type' => 'textfield', '#title' => t('Separador de Miles.'), '#required' => TRUE, '#weight' => -9, '#default_value' => variable_get('acciones_centralizadas_number_thousands_sep', '.'), ); $form['visual'] = array( '#type' => 'fieldset', '#title' => t('Visualización'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); //estado critico $form['visual']['critico'] = array( '#type' => 'fieldset', '#title' => t('Estado critico'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['visual']['critico']['acciones_centralizadas_color_critica'] = array( '#title' => t('Color de fondo'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_color_critica', '#fd0002'), '#required' => TRUE, '#size' => 10, ); $form['visual']['critico']['acciones_centralizadas_colort_critica'] = array( '#title' => t('Color de fuente'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_colort_critica', '#FFFFFF'), '#required' => TRUE, '#size' => 10, ); $form['visual']['critico']['acciones_centralizadas_texto_critica'] = array( '#title' => t('Texto a mostrar'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_texto_critica', 'Zona crítica'), '#required' => TRUE, ); // estado discreta $form['visual']['discreta'] = array( '#type' => 'fieldset', '#title' => t('Estado discreto'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['visual']['discreta']['acciones_centralizadas_color_discreta'] = array( '#title' => t('Color de fondo'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_color_discreta', '#cc6733'), '#required' => TRUE, '#size' => 10, ); $form['visual']['discreta']['acciones_centralizadas_colort_discreta'] = array( '#title' => t('Color de fuente'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_colort_discreta', '#FFFFFF'), '#required' => TRUE, '#size' => 10, ); $form['visual']['discreta']['acciones_centralizadas_texto_discreta'] = array( '#title' => t('Texto a mostrar'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_texto_discreta', 'Zona discreta'), '#required' => TRUE, ); // estado moderada $form['visual']['moderada'] = array( '#type' => 'fieldset', '#title' => t('Estado moderado'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['visual']['moderada']['acciones_centralizadas_color_moderada'] = array( '#title' => t('Color de fondo'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_color_moderada', '#fdff00'), '#required' => TRUE, '#size' => 10, ); $form['visual']['moderada']['acciones_centralizadas_colort_moderada'] = array( '#title' => t('Color de fuente'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_colort_moderada', '#000000'), '#required' => TRUE, '#size' => 10, ); $form['visual']['moderada']['acciones_centralizadas_texto_moderada'] = array( '#title' => t('Texto a mostrar'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_texto_moderada', 'Zona moderada'), '#required' => TRUE, ); // estado optima $form['visual']['optima'] = array( '#type' => 'fieldset', '#title' => t('Estado Optimo'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['visual']['optima']['acciones_centralizadas_color_optima'] = array( '#title' => t('Color de fondo'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_color_optima', '#20ff21'), '#required' => TRUE, '#size' => 10, ); $form['visual']['optima']['acciones_centralizadas_colort_optima'] = array( '#title' => t('Color de fuente'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_colort_optima', '#000000'), '#required' => TRUE, '#size' => 10, ); $form['visual']['optima']['acciones_centralizadas_texto_optima'] = array( '#title' => t('Texto a mostrar'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_texto_optima', 'Zona optima'), '#required' => TRUE, ); // estado sejecucion $form['visual']['sejecucion'] = array( '#type' => 'fieldset', '#title' => t('Estado Sobre ejecución'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['visual']['sejecucion']['acciones_centralizadas_color_sejecucion'] = array( '#title' => t('Color de fondo'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_color_sejecucion', '#9966cd'), '#required' => TRUE, '#size' => 10, ); $form['visual']['sejecucion']['acciones_centralizadas_colort_sejecucion'] = array( '#title' => t('Color de fuente'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_colort_sejecucion', '#000000'), '#required' => TRUE, '#size' => 10, ); $form['visual']['sejecucion']['acciones_centralizadas_texto_sejecucion'] = array( '#title' => t('Texto a mostrar'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_texto_sejecucion', 'Sobre ejecución'), '#required' => TRUE, ); // estado sejecucion $form['visual']['default'] = array( '#type' => 'fieldset', '#title' => t('Estado sin planificación'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['visual']['default']['acciones_centralizadas_color_default'] = array( '#title' => t('Color de fondo'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_color_default', '#633303'), '#required' => TRUE, '#size' => 10, ); $form['visual']['default']['acciones_centralizadas_colort_default'] = array( '#title' => t('Color de fuente'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_colort_default', '#FFFFFF'), '#required' => TRUE, '#size' => 10, ); $form['visual']['default']['acciones_centralizadas_texto_default'] = array( '#title' => t('Texto a mostrar'), '#type' => 'textfield', '#default_value' => variable_get('acciones_centralizadas_texto_default', 'No hay planificación'), '#required' => TRUE, ); if (module_exists('workflow')) { $wid = workflow_get_workflow_for_type('accion_centralizada'); if ($wid){ $states = workflow_get_states($wid); $rids = user_roles(); $rids['-1'] = t('author'); if (count($states)) { $form['workflow'] = array( '#type' => 'fieldset', '#title' => t('Workflow'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); foreach ($states as $sid => $state) { $form['workflow']['acciones_centralizadas_state_m_' . $sid] = array( '#type' => 'checkboxes', '#options' => $rids, '#default_value' => variable_get('acciones_centralizadas_state_m_' . $sid, array()), '#title' => t('Roles que pueden editar las AC'), '#multiple' => TRUE, '#prefix' => '
' . t('State: @state', array('@state' => $state)) . '
', ); $form['workflow']['acciones_centralizadas_state_r_' . $sid] = array( '#type' => 'checkboxes', '#options' => $rids, '#default_value' => variable_get('acciones_centralizadas_state_r_' . $sid, array()), '#title' => t('Roles que pueden reformular las AC'), '#multiple' => TRUE, '#prefix' => "", ); $form['workflow']['acciones_centralizadas_state_s_' . $sid] = array( '#type' => 'checkboxes', '#options' => $rids, '#default_value' => variable_get('acciones_centralizadas_state_s_' . $sid, array()), '#title' => t('Roles que pueden Seguimiento las AC'), '#multiple' => TRUE, '#prefix' => "", '#suffix' => "
", ); } $form['estados'] = array( '#type' => 'fieldset', '#title' => t('Seguimiento'), '#collapsible' => TRUE, '#collapsed' => FALSE, ); $form['seguimiento']['acciones_centralizadas_state_aprobado'] = array( '#type' => 'select', '#title' => t('Estado aprobado'), '#default_value' => variable_get('acciones_centralizadas_state_aprobado', NULL), '#options' => $states, '#prefix' => '
', ); $form['seguimiento']['acciones_centralizadas_state_naprobado'] = array( '#type' => 'select', '#title' => t('Estado no aprobado'), '#default_value' => variable_get('acciones_centralizadas_state_naprobado', NULL), '#options' => $states, '#prefix' => "", '#suffix' => "
", ); } } } return system_settings_form($form); }