Commit aacff085 authored by metzlerd's avatar metzlerd
Browse files

Starting on fixes for parameters.

parent 01ee6ef2
......@@ -247,7 +247,6 @@ function forena_settings_submit($form, &$form_state) {
function forena_settings_sync_submit($form, &$form_state) {
forena_sync_reports($form_state['values']['sync_overwrite']);
drupal_set_message(t('Report cache cleared'));
}
function forena_format_form($formid, $form_state, $report_name) {
......
......@@ -499,6 +499,14 @@ function forena_report_delete_confirm_submit($form, &$form_state) {
$form_state['redirect'] = array("reports/$report_name/edit", array('query' => $parms));
}
/**
* Form field translation editor.
* @param unknown $form
* @param unknown $form_state
* @param unknown $report_name
* @param unknown $id
* @return multitype:string multitype:string Ambigous <The, string, A, Optional>
*/
function forena_report_field_form($form, &$form_state, $report_name, $id) {
$r = Frx::Editor($report_name);
......@@ -615,6 +623,60 @@ function forena_report_field_form_submit($form, &$form_state) {
}
function forena_report_parameters_Form($form, &$form_state, $report_name) {
$r = Frx::Editor($report_name);
$parameters = $r->frxReport->parametersArray();
$form_state['storage']['parameters'] = $parameters;
$links = array();
$links[] = array('href' => $r->report_link . '/edit/params/add', 'title' => 'Add Parameter' );
$form['add_link'] = array(
'#type' => 'markup',
'#markup' => theme('links',
array(
'links' => $links,
'attributes' => array('class' => 'action-links'),
)
)
);
foreach ($parameters as $parameter) {
$ctl = array();
$ctl['id'] = array(
'#markup' => check_plain($id),
);
$ctl['label'] = array(
'#type' => 'textfield',
'#size' => 30,
);
$ctl['default'] = array(
'#type' => 'textfield',
'#size' => 30,
);
$ctl['weight'] = array(
'#type' => 'weight',
);
}
$form['update'] = array(
'#type' => 'submit',
'#value' => t('Update'),
);
$form['cancel'] = array(
'#type' => 'submit',
'#value' => t('Cancel'),
'#submit' => array('forena_update_cancel'),
);
}
function theme_forena_report_parameters_form($variables) {
return $output;
}
......
......@@ -25,7 +25,7 @@
to see the possibilities for inter-connecting reports</p>
</div>
<div frx:block="sampledb/users_by_state" id="forena-1">
<svg id="state-chart" frx:block="sampledb/users_by_state"
<svg id="state-chart"
frx:renderer="FrxSVGGraph" frx:type="bargraph"
frx:xpath="*[total&gt;10000]"
frx:color="{color}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment