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)
|
public function calendar_form($action, $calendar, $formfields)
|
||||||
{
|
{
|
||||||
$html = '';
|
$table = new html_table(array('cols' => 2, 'class' => 'propform'));
|
||||||
foreach ($formfields as $field) {
|
|
||||||
$html .= html::div('form-section',
|
foreach ($formfields as $col => $colprop) {
|
||||||
html::label($field['id'], $field['label']) .
|
$label = !empty($colprop['label']) ? $colprop['label'] : $rcmail->gettext("$domain.$col");
|
||||||
$field['value']);
|
|
||||||
|
$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 string The action called this form
|
||||||
* @param array Tasklist properties
|
* @param array Tasklist properties
|
||||||
* @param array List with form fields to be rendered
|
* @param array List with form fields to be rendered
|
||||||
|
*
|
||||||
* @return string HTML content of the form
|
* @return string HTML content of the form
|
||||||
*/
|
*/
|
||||||
public function tasklist_edit_form($action, $list, $formfields)
|
public function tasklist_edit_form($action, $list, $formfields)
|
||||||
{
|
{
|
||||||
$html = '';
|
$table = new html_table(array('cols' => 2, 'class' => 'propform'));
|
||||||
foreach ($formfields as $field) {
|
|
||||||
$html .= html::div('form-section',
|
foreach ($formfields as $col => $colprop) {
|
||||||
html::label($field['id'], $field['label']) .
|
$label = !empty($colprop['label']) ? $colprop['label'] : $rcmail->gettext("$domain.$col");
|
||||||
$field['value']);
|
|
||||||
|
$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