using new historylog custom field stuff

This commit is contained in:
Ralf Becker 2011-04-20 06:22:29 +00:00
parent d7a6328c12
commit 0aac7e43a9
2 changed files with 7 additions and 27 deletions

View File

@ -110,15 +110,7 @@ class calendar_tracking extends bo_tracking
*/ */
public function __construct() public function __construct()
{ {
parent::__construct(); // calling the constructor of the extended class parent::__construct('calendar'); // adds custom fields
$custom = config::get_customfields('calendar', true);
if(is_array($custom)) {
foreach($custom as $name => $settings) {
$this->field2history['#'.$name] = '#'.$name;
$this->field2label['#'.$name] = $settings['label'];
}
}
} }
/** /**

View File

@ -2163,18 +2163,6 @@ function replace_eTemplate_onsubmit()
foreach($tracking->field2label as $field => $label) { foreach($tracking->field2label as $field => $label) {
$sel_options[$status][$field] = lang($label); $sel_options[$status][$field] = lang($label);
} }
// Get custom field options // custom fields are now "understood" directly by historylog widget
$custom = config::get_customfields('calendar', true);
if(is_array($custom)) {
foreach($custom as $name => $settings) {
if(!is_array($settings['values'])) {
$content['history']['status-widgets']['#'.$name] = $settings['type'];
} elseif($settings['values']['@']) {
$content['history']['status-widgets']['#'.$name] = customfields_widget::_get_options_from_file($settings['values']['@']);
} else {
$content['history']['status-widgets']['#'.$name] = $settings['values'];
}
}
}
} }
} }