/**
  * @param FORM_RENDERER $renderer
  * @access private
  */
 protected function _draw_buttons($renderer)
 {
     $buttons[] = $renderer->javascript_button_as_html('Grant All', 'grant_all_permissions (this.form)', '{icons}buttons/select');
     $buttons[] = $renderer->javascript_button_as_html('Grant None', 'grant_no_permissions (this.form)', '{icons}buttons/close');
     $buttons[] = $renderer->submit_button_as_html();
     $renderer->draw_buttons_in_row($buttons);
 }
 /**
  * @param FORM_RENDERER $renderer
  * @access private
  */
 protected function _draw_attachment_selector($renderer)
 {
     $attachments = $this->_attachments();
     if (sizeof($attachments)) {
         $props = $renderer->make_list_properties();
         $props->css_class = 'small';
         foreach ($attachments as $att) {
             $props->add_item($att->title_as_plain_text(), $att->file_name);
         }
         $attachment_control = $renderer->drop_down_as_html('attachments', $props);
         $props = $renderer->make_list_properties();
         $props->add_item('None', 'none');
         $props->add_item('Left', 'left');
         $props->add_item('Left (alone)', 'left-column');
         $props->add_item('Center', 'center');
         $props->add_item('Right', 'right');
         $props->add_item('Right (alone)', 'right-column');
         $props->css_class = 'small';
         $alignments = $renderer->drop_down_as_html('alignments', $props);
         $props = $renderer->make_list_properties();
         $props->add_item('Thumbnail', 'thumbnail');
         $props->add_item('25%', '25');
         $props->add_item('50%', '50');
         $props->add_item('75%', '75');
         $props->add_item('Full-size', '100');
         $props->css_class = 'small';
         $sizes = $renderer->drop_down_as_html('sizes', $props);
         $props = $renderer->make_list_properties();
         $props->add_item('No text', 'none');
         $props->add_item('Caption', 'caption');
         $props->add_item('Tooltip', 'tooltip');
         $props->add_item('Both', 'both');
         $props->css_class = 'small';
         $caption_modes = $renderer->drop_down_as_html('caption_modes', $props);
         $renderer->start_row('Attachments');
         echo $attachment_control;
         echo $alignments;
         echo $sizes;
         echo $caption_modes;
         echo $renderer->javascript_button_as_html('Add', 'on_insert_attachment ()');
         $renderer->finish_row();
     }
 }