Commit 2597a0ee authored by jcnventura's avatar jcnventura

Use own panel in node type edit form, instead of workflow and comment panels.

parent c021eaef
......@@ -222,13 +222,20 @@ function print_help($path, $arg) {
function print_form_alter(&$form, $form_state, $form_id) {
// Add the node-type settings option to activate the printer-friendly version link
if ($form_id == 'node_type_form') {
$form['workflow']['print_display'] = array(
$form['print'] = array(
'#type' => 'fieldset',
'#title' => t('Printer-friendly pages'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['print']['print_display'] = array(
'#type' => 'checkbox',
'#title' => t('Show printer-friendly version link'),
'#default_value' => variable_get('print_display_'. $form['#node_type']->type, 1),
'#description' => t('Displays the link to a printer-friendly version of the content. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/print' ))),
);
$form['comment']['print_display_comment'] = array(
$form['print']['print_display_comment'] = array(
'#type' => 'checkbox',
'#title' => t('Show printer-friendly version link in individual comments'),
'#default_value' => variable_get('print_display_comment_'. $form['#node_type']->type, 0),
......
......@@ -154,13 +154,13 @@ function print_mail_help($path, $arg) {
function print_mail_form_alter(&$form, $form_state, $form_id) {
// Add the node-type settings option to activate the mail version link
if ($form_id == 'node_type_form') {
$form['workflow']['print_mail_display'] = array(
$form['print']['print_mail_display'] = array(
'#type' => 'checkbox',
'#title' => t('Show send by e-mail link'),
'#default_value' => variable_get('print_mail_display_'. $form['#node_type']->type, 1),
'#description' => t('Displays a link to send the content by e-mail. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/print' ))),
);
$form['comment']['print_mail_display_comment'] = array(
$form['print']['print_mail_display_comment'] = array(
'#type' => 'checkbox',
'#title' => t('Show send by e-mail link in individual comments'),
'#default_value' => variable_get('print_mail_display_comment_'. $form['#node_type']->type, 0),
......
......@@ -151,13 +151,13 @@ function print_pdf_help($path, $arg) {
function print_pdf_form_alter(&$form, $form_state, $form_id) {
// Add the node-type settings option to activate the PDF version link
if ($form_id == 'node_type_form') {
$form['workflow']['print_pdf_display'] = array(
$form['print']['print_pdf_display'] = array(
'#type' => 'checkbox',
'#title' => t('Show PDF version link'),
'#default_value' => variable_get('print_pdf_display_'. $form['#node_type']->type, 1),
'#description' => t('Displays the link to a PDF version of the content. Further configuration is available on the !settings.', array('!settings' => l(t('settings page'), 'admin/settings/print' ))),
);
$form['comment']['print_pdf_display_comment'] = array(
$form['print']['print_pdf_display_comment'] = array(
'#type' => 'checkbox',
'#title' => t('Show PDF version link in individual comments'),
'#default_value' => variable_get('print_pdf_display_comment_'. $form['#node_type']->type, 0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment