Permalink
Browse files

Add readonly support to textarea

  • Loading branch information...
flack committed Dec 4, 2018
1 parent 07f35f5 commit 84a733a3c1e901816d42b5559c1cb82aca29a6c1
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/midcom/datamanager/template/form.php
@@ -547,6 +547,11 @@ public function delete_widget(FormView $view, array $data)
public function textarea_widget(FormView $view, array $data)
{
if (!empty($data['attr']['readonly'])) {
$view->vars['output_mode'] = 'nl2br';
$string = $this->get_view_renderer()->text_widget($view, $data);
return $string . $this->renderer->block($view, 'form_widget_simple', ['type' => "hidden"]);
}
$view->vars['attr'] = [
'class' => 'longtext',
'cols' => 50

0 comments on commit 84a733a

Please sign in to comment.