コード例 #1
0
ファイル: summernote.php プロジェクト: LinuxJedi/arastta
 protected function getFormFields($action)
 {
     $action = str_replace('amp;', '', $action);
     $option_text = array('yes' => $this->language->get('text_enabled'), 'no' => $this->language->get('text_disabled'));
     $status['value'] = $this->config->get('summernote_status', 1);
     $status['labelclass'] = 'radio-inline';
     $sort_order['value'] = $this->config->get('summernote_sort_order');
     $sort_order['placeholder'] = $this->language->get('entry_sort_order');
     $height['value'] = $this->config->get('summernote_height', 300);
     $height['placeholder'] = $this->language->get('entry_height');
     $tool_style['value'] = $this->config->get('summernote_tool_style', 1);
     $tool_style['labelclass'] = 'radio-inline';
     $tool_font_bold['value'] = $this->config->get('summernote_tool_font_bold', 1);
     $tool_font_bold['labelclass'] = 'radio-inline';
     $tool_font_italic['value'] = $this->config->get('summernote_tool_font_italic', 1);
     $tool_font_italic['labelclass'] = 'radio-inline';
     $tool_font_underline['value'] = $this->config->get('summernote_tool_font_underline', 1);
     $tool_font_underline['labelclass'] = 'radio-inline';
     $tool_font_clear['value'] = $this->config->get('summernote_tool_font_clear', 1);
     $tool_font_clear['labelclass'] = 'radio-inline';
     $tool_fontname['value'] = $this->config->get('summernote_tool_fontname', 1);
     $tool_fontname['labelclass'] = 'radio-inline';
     $tool_fontsize['value'] = $this->config->get('summernote_tool_fontsize', 1);
     $tool_fontsize['labelclass'] = 'radio-inline';
     $tool_color['value'] = $this->config->get('summernote_tool_color', 1);
     $tool_color['labelclass'] = 'radio-inline';
     $tool_para_ol['value'] = $this->config->get('summernote_tool_para_ol', 1);
     $tool_para_ol['labelclass'] = 'radio-inline';
     $tool_para_ul['value'] = $this->config->get('summernote_tool_para_ul', 1);
     $tool_para_ul['labelclass'] = 'radio-inline';
     $tool_para_paragraph['value'] = $this->config->get('summernote_tool_para_paragraph', 1);
     $tool_para_paragraph['labelclass'] = 'radio-inline';
     $tool_height['value'] = $this->config->get('summernote_tool_height', 1);
     $tool_height['labelclass'] = 'radio-inline';
     $tool_table['value'] = $this->config->get('summernote_tool_table', 1);
     $tool_table['labelclass'] = 'radio-inline';
     $tool_insert_link['value'] = $this->config->get('summernote_tool_insert_link', 1);
     $tool_insert_link['labelclass'] = 'radio-inline';
     $tool_insert_picture['value'] = $this->config->get('summernote_tool_insert_picture', 1);
     $tool_insert_picture['labelclass'] = 'radio-inline';
     $tool_insert_hr['value'] = $this->config->get('summernote_tool_insert_hr', 1);
     $tool_insert_hr['labelclass'] = 'radio-inline';
     $tool_view_fullscreen['value'] = $this->config->get('summernote_tool_view_fullscreen', 1);
     $tool_view_fullscreen['labelclass'] = 'radio-inline';
     $tool_view_codeview['value'] = $this->config->get('summernote_tool_view_codeview', 1);
     $tool_view_codeview['labelclass'] = 'radio-inline';
     $tool_help['value'] = $this->config->get('summernote_tool_help', 1);
     $tool_help['labelclass'] = 'radio-inline';
     $form = new AForm('form-summernote', $action);
     $form->addElement(new Arastta\Component\Form\Element\HTML('<ul class="nav nav-tabs">'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<li class="active"><a href="#tab-general" data-toggle="tab">' . $this->language->get('tab_general') . '</a></li>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<li><a href="#tab-advanced" data-toggle="tab">' . $this->language->get('tab_advanced') . '</a></li>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('</ul>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<div class="tab-content">'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<div class="tab-pane active" id="tab-general">'));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_status'), 'summernote_status', $status, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\Textbox($this->language->get('entry_height'), 'summernote_height', $height));
     $form->addElement(new Arastta\Component\Form\Element\Textbox($this->language->get('entry_sort_order'), 'summernote_sort_order', $sort_order));
     $form->addElement(new Arastta\Component\Form\Element\HTML('</div>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<div class="tab-pane" id="tab-advanced">'));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_style'), 'summernote_tool_style', $tool_style, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_font_bold'), 'summernote_tool_font_bold', $tool_font_bold, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_font_italic'), 'summernote_tool_font_italic', $tool_font_italic, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_font_underline'), 'summernote_tool_font_underline', $tool_font_underline, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_font_clear'), 'summernote_tool_font_clear', $tool_font_clear, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_fontname'), 'summernote_tool_fontname', $tool_fontname, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_fontsize'), 'summernote_tool_fontsize', $tool_fontsize, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_color'), 'summernote_tool_color', $tool_color, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_para_ol'), 'summernote_tool_para_ol', $tool_para_ol, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_para_ul'), 'summernote_tool_para_ul', $tool_para_ul, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_para_paragraph'), 'summernote_tool_para_paragraph', $tool_para_paragraph, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_height'), 'summernote_tool_height', $tool_height, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_table'), 'summernote_tool_table', $tool_table, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_insert_link'), 'summernote_tool_insert_link', $tool_insert_link, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_insert_picture'), 'summernote_tool_insert_picture', $tool_insert_picture, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_insert_hr'), 'summernote_tool_insert_hr', $tool_insert_hr, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_view_fullscreen'), 'summernote_tool_view_fullscreen', $tool_view_fullscreen, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_view_codeview'), 'summernote_tool_view_codeview', $tool_view_codeview, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_tool_help'), 'summernote_tool_help', $tool_help, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\HTML('</div>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('</div>'));
     return $form->render(true);
 }
コード例 #2
0
ファイル: tinymce.php プロジェクト: LinuxJedi/arastta
 protected function getFormFields($action)
 {
     $action = str_replace('amp;', '', $action);
     $option_text = array('yes' => $this->language->get('text_enabled'), 'no' => $this->language->get('text_disabled'));
     $status['value'] = $this->config->get('tinymce_status', 1);
     $status['labelclass'] = 'radio-inline';
     $sort_order['value'] = $this->config->get('tinymce_sort_order');
     $sort_order['placeholder'] = $this->language->get('entry_sort_order');
     $height['value'] = $this->config->get('tinymce_height', 300);
     $height['placeholder'] = $this->language->get('entry_height');
     $menu_edit_undo['value'] = $this->config->get('tinymce_menu_edit_undo', 1);
     $menu_edit_undo['labelclass'] = 'radio-inline';
     $menu_edit_redo['value'] = $this->config->get('tinymce_menu_edit_redo', 1);
     $menu_edit_redo['labelclass'] = 'radio-inline';
     $menu_format_bold['value'] = $this->config->get('tinymce_menu_format_bold', 1);
     $menu_format_bold['labelclass'] = 'radio-inline';
     $menu_format_italic['value'] = $this->config->get('tinymce_menu_format_italic', 1);
     $menu_format_italic['labelclass'] = 'radio-inline';
     $menu_view_alignleft['value'] = $this->config->get('tinymce_menu_view_alignleft', 1);
     $menu_view_alignleft['labelclass'] = 'radio-inline';
     $menu_view_aligncenter['value'] = $this->config->get('tinymce_menu_view_aligncenter', 1);
     $menu_view_aligncenter['labelclass'] = 'radio-inline';
     $menu_view_alignright['value'] = $this->config->get('tinymce_menu_view_alignright', 1);
     $menu_view_alignright['labelclass'] = 'radio-inline';
     $menu_view_alignjustify['value'] = $this->config->get('tinymce_menu_view_alignjustify', 1);
     $menu_view_alignjustify['labelclass'] = 'radio-inline';
     $menu_file_bullist['value'] = $this->config->get('tinymce_menu_file_bullist', 1);
     $menu_file_bullist['labelclass'] = 'radio-inline';
     $menu_file_numlist['value'] = $this->config->get('tinymce_menu_file_numlist', 1);
     $menu_file_numlist['labelclass'] = 'radio-inline';
     $menu_file_outdent['value'] = $this->config->get('tinymce_menu_file_outdent', 1);
     $menu_file_outdent['labelclass'] = 'radio-inline';
     $menu_file_indent['value'] = $this->config->get('tinymce_menu_file_indent', 1);
     $menu_file_indent['labelclass'] = 'radio-inline';
     $menu_insert_link['value'] = $this->config->get('tinymce_menu_insert_link', 1);
     $menu_insert_link['labelclass'] = 'radio-inline';
     $menu_insert_image['value'] = $this->config->get('tinymce_menu_insert_image', 1);
     $menu_insert_image['labelclass'] = 'radio-inline';
     $menu_tools_imagetools['value'] = $this->config->get('tinymce_menu_tools_imagetools', 1);
     $menu_tools_imagetools['labelclass'] = 'radio-inline';
     $form = new AForm('form-tinymce', $action);
     $form->addElement(new Arastta\Component\Form\Element\HTML('<ul class="nav nav-tabs">'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<li class="active"><a href="#tab-general" data-toggle="tab">' . $this->language->get('tab_general') . '</a></li>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<li><a href="#tab-advanced" data-toggle="tab">' . $this->language->get('tab_advanced') . '</a></li>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('</ul>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<div class="tab-content">'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<div class="tab-pane active" id="tab-general">'));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_status'), 'tinymce_status', $status, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\Textbox($this->language->get('entry_height'), 'tinymce_height', $height));
     $form->addElement(new Arastta\Component\Form\Element\Textbox($this->language->get('entry_sort_order'), 'tinymce_sort_order', $sort_order));
     $form->addElement(new Arastta\Component\Form\Element\HTML('</div>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<div class="tab-pane" id="tab-advanced">'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('<legend>' . $this->language->get('text_tool') . '</legend>'));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_edit_undo'), 'tinymce_menu_edit_undo', $menu_edit_undo, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_edit_redo'), 'tinymce_menu_edit_redo', $menu_edit_redo, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_format_bold'), 'tinymce_menu_format_bold', $menu_format_bold, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_format_italic'), 'tinymce_menu_format_italic', $menu_format_italic, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_view_alignleft'), 'tinymce_menu_view_alignleft', $menu_view_alignleft, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_view_aligncenter'), 'tinymce_menu_view_aligncenter', $menu_view_aligncenter, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_view_alignright'), 'tinymce_menu_view_alignright', $menu_view_alignright, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_view_alignjustify'), 'tinymce_menu_view_alignjustify', $menu_view_alignjustify, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_file_bullist'), 'tinymce_menu_file_bullist', $menu_file_bullist, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_file_numlist'), 'tinymce_menu_file_numlist', $menu_file_numlist, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_file_outdent'), 'tinymce_menu_file_outdent', $menu_file_outdent, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_file_indent'), 'tinymce_menu_file_indent', $menu_file_indent, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_insert_link'), 'tinymce_menu_insert_link', $menu_insert_link, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_insert_image'), 'tinymce_menu_insert_image', $menu_insert_image, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\YesNo($this->language->get('entry_menu_tools_imagetools'), 'tinymce_menu_tools_imagetools', $menu_tools_imagetools, $option_text));
     $form->addElement(new Arastta\Component\Form\Element\HTML('</div>'));
     $form->addElement(new Arastta\Component\Form\Element\HTML('</div>'));
     return $form->render(true);
 }