Fixed comment preview functionality

The preview function was hidden for comments. The button has been restored and styles fixed to support this feature.

(DBOINCP-76)
This commit is contained in:
Tristan Olive 2013-11-27 14:56:43 -05:00
parent 24f7250c2b
commit c76b3741ea
3 changed files with 25 additions and 3 deletions

View File

@ -177,9 +177,6 @@ function boinccore_form_alter(&$form, $form_state, $form_id) {
'#weight' => 1010,
);
// Preview is ugly, unset until it works
unset($form['preview']);
// Remove redundant name field
unset($form['_author']);

View File

@ -289,6 +289,26 @@ div.node-type-forum.not-first-page {
.preview .comment /* Preview of the comment before submitting new or updated comment */ {
/* background-color: #ffffea; */ /* Drupal core uses a #ffffea background */
border: none;
margin-top: 24px;
padding-top: 0;
}
.preview h2 {
border-bottom: 1px dotted #aaa;
margin-bottom: 24px;
padding-bottom: 12px;
}
#comment-form .preview + .user {
height: auto;
}
#comment-form .comment .user {
border: none;
}
div.preview + .comment {
padding-top: 24px;
margin-top: 24px;
}
/* Comment form */

View File

@ -77,6 +77,7 @@
print '<div class="ignore-user-content">';
}
?>
<div class="user">
<?php
$account = user_load(array('uid' => $comment->uid));
@ -166,3 +167,7 @@
</div>
</div> <!-- /.comment-body -->
</div> <!-- /.comment -->
<?php if ($status == 'comment-preview'): ?>
<h2 class="title"><?php print t('Revise or post comment'); ?></h2>
<?php endif; ?>