public function index() { $data = $this->getData(); $this->title = t('widget_notes'); $this->content = H::textarea('notes', $data, 'id="note" rows="10" placeholder="' . t('notes_placeholder') . '"'); $this->wrap_body = false; $this->style = '#note{display:block;border:none;width:100%;max-width:100%;padding:5px 8px;}'; $this->script = "\n\t\t\$(document).on('change','#note',function(){\n\t\t\t\$.ajax({url:'?route=dashboard/save', data:{widget:'notes', data:\$(this).val()}})\n\t\t})\n\t\t"; return $this->render(); }