Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 3122: Revised - Separate help text for publishing options #3742

Merged
merged 14 commits into from
Jan 2, 2022

Conversation

stpaultim
Copy link
Member

Takes prior work by others and removes the "Additional" wrapper

Fixes backdrop/backdrop-issues#3122

Alternative to #3613

@backdrop-ci
Copy link
Collaborator

Related to: backdrop/backdrop-issues#3613

@@ -382,16 +385,21 @@ function node_form($form, &$form_state, Node $node) {
$form['options']['status'][NODE_SCHEDULED]['#access'] = FALSE;
}

$form['options']['additional'] = array(
'#type' => 'markup',
'#markup' => $node->nid ? t('<label>Additional options</label>') : t('<label>Additional actions</label>'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be avoiding adding HTML tags in translatable strings. The <label> tag can be added to the element using #prefix/#suffix, like so:

Suggested change
'#markup' => $node->nid ? t('<label>Additional options</label>') : t('<label>Additional actions</label>'),
'#prefix' => '<label>',
'#markup' => $node->nid ? t('Additional options') : t('Additional actions'),
'#suffix' => '</label>',

// @todo candidate for conversion to '#type' => 'html_tag'.
// See: https://github.com/backdrop/backdrop-issues/issues/5223
'#type' => 'markup',
'#prefix' => '<label id="promote-stiky-label">',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "sticky", not "stiky".

'#default_value' => $node->promote,
'#access' => $node_type->settings['promote_enabled'],
'#attributes' => array(
'aria-labelledby' => array('promote-stiky-label'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: "sticky", not "stiky".

'#default_value' => $node->sticky,
'#access' => $node_type->settings['sticky_enabled'],
'#attributes' => array(
'aria-labelledby' => array('promote-stiky-label'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more: "sticky", not "stiky".

@dragonbot
Copy link
Collaborator

Tugboat has finished building a preview for this pull request!

Website: https://pr3742-msvm6wxmn5etfyeuev9ihqlreq2v0yl6.tugboat.qa/
Username: admin
Password: e779e447a52f

Copy link
Member

@klonos klonos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

@quicksketch quicksketch merged commit 3c5925a into backdrop:1.x Jan 2, 2022
@quicksketch
Copy link
Member

Thank you! Merged into 1.x for 1.21.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UX] Separate help text for publishing options
7 participants