Commit 6a2a2805 authored by greggles's avatar greggles

Issue #1211596 by JohnAlbin: Save/Preview buttons appear below node body during comment preview

parent f7b5a4de
#edit-notify-type-1-wrapper, #edit-notify-type-2-wrapper {
float: right;
}
#edit-notify-type-1-wrapper {
margin-left: 0em;
margin-right: 2em;
}
#edit-notify-type-2-wrapper {
margin-left: 0em;
margin-right: 1em;
}
\ No newline at end of file
#edit-notify-type .form-item-notify-type {
margin-left: 0;
margin-right: 1.5em;
}
#edit-notify-type-1-wrapper, #edit-notify-type-2-wrapper {
float: left; /* LTR */
#edit-notify-type .form-item-notify-type {
display: inline;
}
#edit-notify-type-1-wrapper {
margin-left: 2em; /* LTR */
}
#comment-notify .form-radios {
overflow: hidden;
height: 100%;
}
#edit-notify-type-2-wrapper {
margin-left: 1em; /* LTR */
margin-left: 1.5em;
}
......@@ -108,31 +108,27 @@ function comment_notify_form_comment_form_alter(&$form, &$form_state, $form_id)
// If you want to hide this on your site see http://drupal.org/node/322482
$form['notify_settings'] = array(
'#prefix' => '<div class="clear-block">',
'#suffix' => '</div>',
'#weight' => 0,
'#weight' => 0,
);
$form['notify_settings']['notify'] = array(
'#type' => 'checkbox',
'#title' => t('Notify me when new comments are posted'),
'#default_value' => (bool) $preference,
'#type' => 'checkbox',
'#title' => t('Notify me when new comments are posted'),
'#default_value' => (bool) $preference,
);
if (count($available_options) > 1) {
$form['notify_settings']['notify_type'] = array(
'#type' => 'radios',
'#options' => $available_options,
'#default_value' => $preference,
);
}
else {
$form['notify_settings']['notify_type'] = array(
'#type' => 'hidden',
'#value' => key($available_options),
);
$form['notify_settings']['notify_type'] = array(
'#type' => 'radios',
'#options' => $available_options,
'#default_value' => $preference,
);
if (count($available_options) == 1) {
$form['notify_settings']['notify_type']['#type'] = 'hidden';
$form['notify_settings']['notify_type']['#value'] = key($available_options);
}
$form['notify_settings']['notify_type']['#default_value'] = $preference;
// Otherwise, the submit buttons will jump below the node preview.
$form['actions']['#weight'] = 19;
// If this is an existing comment we set the default value based on their selection last time.
if ($form['cid']['#value'] != '') {
......
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