| | |
| | | |
| | | if (!empty($_POST['_insert'])) { |
| | | $name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST)); |
| | | $text = trim(rcube_utils::get_input_value('_text', rcube_utils::INPUT_POST)); |
| | | $text = trim(rcube_utils::get_input_value('_text', rcube_utils::INPUT_POST, true)); |
| | | |
| | | if (!empty($name) && !empty($text)) { |
| | | $dupes = 0; |
| | |
| | | |
| | | $out = $RCMAIL->table_output($attrib, $plugin['list'], $plugin['cols'], 'key'); |
| | | |
| | | $readonly_responses = array(); |
| | | foreach ($plugin['list'] as $item) { |
| | | if (!empty($item['static'])) { |
| | | $readonly_responses[] = $item['key']; |
| | | } |
| | | } |
| | | |
| | | // set client env |
| | | $OUTPUT->add_gui_object('responseslist', $attrib['id']); |
| | | $OUTPUT->set_env('readonly_responses', array_values(array_map(function($rec){ return $rec['key']; }, |
| | | array_filter($plugin['list'], function($item){ return !empty($item['static']); })))); |
| | | $OUTPUT->set_env('readonly_responses', $readonly_responses); |
| | | |
| | | return $out; |
| | | } |