Skip to content

Commit

Permalink
Issue backdrop#764: Comment status form minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
quicksketch committed Dec 30, 2015
1 parent 9341db1 commit 678e2ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/modules/comment/comment.module
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
'#default_value' => $node_type->settings['comment_default'],
'#options' => array(
COMMENT_NODE_OPEN => t('Open comments'),
COMMENT_NODE_CLOSED => t('Close comments'),
COMMENT_NODE_CLOSED => t('Closed comments'),
),
);
$form['comment']['comment_per_page'] = array(
Expand Down
4 changes: 2 additions & 2 deletions core/modules/comment/js/comment.admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Backdrop.behaviors.commentFieldsetSummaries = {
var $context = $(context);
$context.find('fieldset.comment-node-settings-form').backdropSetSummary(function () {
var vals = [];
var status = $context.find('.form-item-comment input:checked').next('label').text();
var status = $context.find('.form-item-comment input:checked').next('label').text().replace(/^\s+|\s+$/g, '');
vals.push(Backdrop.checkPlain(status));
if ($.trim(status) != 'Open') {
if ($context.find(".form-item-comment-hidden input:checked").length) {
Expand All @@ -25,7 +25,7 @@ Backdrop.behaviors.commentFieldsetSummaries = {
var vals = [];

// Default comment setting.
vals.push($context.find(".form-item-comment-default input:checked").parent().find('label').text());
vals.push($context.find(".form-item-comment-default input:checked").parent().find('label').text().replace(/^\s+|\s+$/g, ''));

// Comments per page.
var number = parseInt($context.find(".form-item-comment-per-page select option:selected").val());
Expand Down

0 comments on commit 678e2ef

Please sign in to comment.