| @@ 318-330 (lines=13) @@ | ||
| 315 | return $string; |
|
| 316 | } |
|
| 317 | ||
| 318 | public function codemirror_widget(FormView $view, array $data) |
|
| 319 | { |
|
| 320 | //we set required to false, because codemirror doesn't play well with html5 validation.. |
|
| 321 | $string = '<textarea ' . $this->renderer->block($view, 'widget_attributes', array('required' => false)) . '>'; |
|
| 322 | $string .= $data['value'] . '</textarea>'; |
|
| 323 | if (!empty($data['codemirror_snippet'])) |
|
| 324 | { |
|
| 325 | $snippet = str_replace('{$id}', $data['id'], $data['codemirror_snippet']); |
|
| 326 | $snippet = str_replace('{$read_only}', 'false', $snippet); |
|
| 327 | $string .= $this->jsinit($snippet); |
|
| 328 | } |
|
| 329 | return $string; |
|
| 330 | } |
|
| 331 | ||
| 332 | public function jsdate_widget(FormView $view, array $data) |
|
| 333 | { |
|
| @@ 123-134 (lines=12) @@ | ||
| 120 | return ''; |
|
| 121 | } |
|
| 122 | ||
| 123 | public function codemirror_widget(FormView $view, array $data) |
|
| 124 | { |
|
| 125 | $string = '<textarea ' . $this->renderer->block($view, 'widget_attributes') . '>'; |
|
| 126 | $string .= $data['value'] . '</textarea>'; |
|
| 127 | if (!empty($data['codemirror_snippet'])) |
|
| 128 | { |
|
| 129 | $snippet = str_replace('{$id}', $data['id'], $data['codemirror_snippet']); |
|
| 130 | $snippet = str_replace('{$read_only}', 'true', $snippet); |
|
| 131 | $string .= $this->jsinit($snippet); |
|
| 132 | } |
|
| 133 | return $string; |
|
| 134 | } |
|
| 135 | ||
| 136 | public function tinymce_widget(FormView $view, array $data) |
|
| 137 | { |
|