Fix calendar/tasklist edit form in Elastic when using database driver
This commit is contained in:
parent
b97a138033
commit
9bacdbc0d4
2 changed files with 17 additions and 12 deletions
|
@ -592,14 +592,16 @@ abstract class calendar_driver
|
|||
*/
|
||||
public function calendar_form($action, $calendar, $formfields)
|
||||
{
|
||||
$html = '';
|
||||
foreach ($formfields as $field) {
|
||||
$html .= html::div('form-section',
|
||||
html::label($field['id'], $field['label']) .
|
||||
$field['value']);
|
||||
$table = new html_table(array('cols' => 2, 'class' => 'propform'));
|
||||
|
||||
foreach ($formfields as $col => $colprop) {
|
||||
$label = !empty($colprop['label']) ? $colprop['label'] : $rcmail->gettext("$domain.$col");
|
||||
|
||||
$table->add('title', html::label($colprop['id'], rcube::Q($label)));
|
||||
$table->add(null, $colprop['value']);
|
||||
}
|
||||
|
||||
return $html;
|
||||
return $table->show();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -423,18 +423,21 @@ abstract class tasklist_driver
|
|||
* @param string The action called this form
|
||||
* @param array Tasklist properties
|
||||
* @param array List with form fields to be rendered
|
||||
*
|
||||
* @return string HTML content of the form
|
||||
*/
|
||||
public function tasklist_edit_form($action, $list, $formfields)
|
||||
{
|
||||
$html = '';
|
||||
foreach ($formfields as $field) {
|
||||
$html .= html::div('form-section',
|
||||
html::label($field['id'], $field['label']) .
|
||||
$field['value']);
|
||||
$table = new html_table(array('cols' => 2, 'class' => 'propform'));
|
||||
|
||||
foreach ($formfields as $col => $colprop) {
|
||||
$label = !empty($colprop['label']) ? $colprop['label'] : $rcmail->gettext("$domain.$col");
|
||||
|
||||
$table->add('title', html::label($colprop['id'], rcube::Q($label)));
|
||||
$table->add(null, $colprop['value']);
|
||||
}
|
||||
|
||||
return $html;
|
||||
return $table->show();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue