-
Notifications
You must be signed in to change notification settings - Fork 381
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
Conversation
Related to: backdrop/backdrop-issues#3613 |
core/modules/node/node.pages.inc
Outdated
@@ -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>'), |
There was a problem hiding this comment.
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:
'#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>', |
5c9e9be
to
b4e98cd
Compare
core/modules/node/node.pages.inc
Outdated
// @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">', |
There was a problem hiding this comment.
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".
core/modules/node/node.pages.inc
Outdated
'#default_value' => $node->promote, | ||
'#access' => $node_type->settings['promote_enabled'], | ||
'#attributes' => array( | ||
'aria-labelledby' => array('promote-stiky-label'), |
There was a problem hiding this comment.
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".
core/modules/node/node.pages.inc
Outdated
'#default_value' => $node->sticky, | ||
'#access' => $node_type->settings['sticky_enabled'], | ||
'#attributes' => array( | ||
'aria-labelledby' => array('promote-stiky-label'), |
There was a problem hiding this comment.
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".
Tugboat has finished building a preview for this pull request! Website: https://pr3742-msvm6wxmn5etfyeuev9ihqlreq2v0yl6.tugboat.qa/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏼
Thank you! Merged into 1.x for 1.21.0. |
Takes prior work by others and removes the "Additional" wrapper
Fixes backdrop/backdrop-issues#3122
Alternative to #3613