Commit 070bd56d authored by metzlerd's avatar metzlerd
Browse files

Fixed notice.

Added indentation formatter. 
parent a79cad4c
......@@ -203,7 +203,7 @@ function forena_settings_validate($form, &$form_state) {
if (!file_exists($path) || !is_writable($path)) {
form_set_error('forena_report_repos', 'Report Directory must be writable by the web user');
}
if ($values['forena_query_data_path']) {
if (isset($values['forena_query_data_path'])) {
$path = $values['forena_query_data_path'];
if ($path != $values['forena_last_query_data_path']) {
if (!file_exists($path)) {
......
......@@ -21,6 +21,7 @@ class FrxControls {
'number' => 'Number',
'drupal_translation' => 'Translatable Text',
'template' => 'Field is a forena template',
'indentation' => 'Indentation',
);
return $formats;
}
......@@ -112,7 +113,7 @@ class FrxControls {
return $value;
}
public function number($value, $format_str, $data='') {
public function number($value, $format_str, $teng) {
// Determine number nubmer formatter from the string.
$chars = str_replace(array('9', '0', '$'), '', $format_str);
if (strlen($chars) > 1) {
......@@ -160,6 +161,14 @@ class FrxControls {
}
return $value;
}
public function indentation($value, $format_str, $teng='') {
if ($value) {
$vars = array('size' => $value);
$value = theme_indentation($vars);
}
return $value;
}
}
......@@ -57,6 +57,11 @@
data used for translations (e.g. watchdog table).
&nbsp;Normally you can leave this blank. &nbsp;</td>
</tr>
<tr>
<td>indentation</td>
<td>Use the field to generate indentation using drupal's theme_indentation function.
The size of the indenation is expected to be in the value of the field.</td>
</tr>
<tr>
<td>iso_date</td>
<td>ISO standard dates are of the form, YYYY-MM-DD
......
......@@ -26,7 +26,6 @@
however, will be available in all reports.&#xA0;</p>
<p>To implement a formatter in control or plugin class requires
the implementation of two methods.</p>
<p>&#xA0;</p>
<h3>Formatter Methods</h3>
<p>Formatter methods should take a value and a format string
parameter, and should return the formatted value. The following
......@@ -42,7 +41,7 @@
formats registration function that returns an associative array that
lists the function names and their appropriate user label. Forena
uses its own registration mechanisms for advertising its
controls.&#xA0; The following can be used as a reference
controls. The following can be used as a reference
implementation for this method.</p>
<pre>
//date formats
......
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