Skip to content
Snippets Groups Projects
Verified Commit 482d7992 authored by Jess's avatar Jess
Browse files

Issue #3364773 by roshnichordiya, Chris Matthews, thakurnishant_06, quietone,...

Issue #3364773 by roshnichordiya, Chris Matthews, thakurnishant_06, quietone, xjm, yoroy: Make help text consistent on entity bundle forms (Content/Comment/Media/Block)
parent 7f06eb5e
No related branches found
No related tags found
14 merge requests!11628Update file MediaLibraryWidget.php,!7564Revert "Issue #3364773 by roshnichordiya, Chris Matthews, thakurnishant_06,...,!5752Issue #3275828 by joachim, quietone, bradjones1, Berdir: document the reason...,!5627Issue #3261805: Field not saved when change of 0 on string start,!5427Issue #3338518: send credentials in ajax if configured in CORS settings.,!5395Issue #3387916 by fjgarlin, Spokje: Each GitLab job exposes user email,!5217Issue #3386607 by alexpott: Improve spell checking in commit-code-check.sh,!5064Issue #3379522 by finnsky, Gauravvvv, kostyashupenko, smustgrave, Chi: Revert...,!5040SDC ComponentElement: Transform slots scalar values to #plain_text instead of throwing an exception,!4958Issue #3392147: Whitelist IP for a Ban module.,!4894Issue #3280279: Add API to allow sites to opt in to upload SVG images in CKEditor 5,!3106Issue #3017548: "Filtered HTML" text format does not support manual teaser break (<!--break-->),!925Issue #2339235: Remove taxonomy hard dependency on node module,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links
Pipeline #25300 canceled
......@@ -35,7 +35,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#title' => $this->t('Label'),
'#maxlength' => 255,
'#default_value' => $block_type->label(),
'#description' => $this->t("Provide a label for this block type to help identify it in the administration pages."),
'#description' => $this->t("The human-readable name for this block type, displayed on the <em>Block types</em> page."),
'#required' => TRUE,
];
$form['id'] = [
......@@ -44,13 +44,14 @@ public function form(array $form, FormStateInterface $form_state) {
'#machine_name' => [
'exists' => '\Drupal\block_content\Entity\BlockContentType::load',
],
'#description' => $this->t("Unique machine-readable name: lowercase letters, numbers, and underscores only."),
'#maxlength' => EntityTypeInterface::BUNDLE_MAX_LENGTH,
];
$form['description'] = [
'#type' => 'textarea',
'#default_value' => $block_type->getDescription(),
'#description' => $this->t('Enter a description for this block type.'),
'#description' => $this->t('Displays on the <em>Block types</em> page.'),
'#title' => $this->t('Description'),
];
......
......@@ -3,8 +3,8 @@
namespace Drupal\comment;
use Drupal\Core\Entity\EntityForm;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\language\Entity\ContentLanguageSettings;
......@@ -79,6 +79,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#title' => $this->t('Label'),
'#maxlength' => 255,
'#default_value' => $comment_type->label(),
'#description' => $this->t('The human-readable name for this comment type, displayed on the <em>Comment types</em> page.'),
'#required' => TRUE,
];
$form['id'] = [
......@@ -87,6 +88,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#machine_name' => [
'exists' => '\Drupal\comment\Entity\CommentType::load',
],
'#description' => $this->t('Unique machine-readable name: lowercase letters, numbers, and underscores only.'),
'#maxlength' => EntityTypeInterface::BUNDLE_MAX_LENGTH,
'#disabled' => !$comment_type->isNew(),
];
......@@ -94,7 +96,7 @@ public function form(array $form, FormStateInterface $form_state) {
$form['description'] = [
'#type' => 'textarea',
'#default_value' => $comment_type->getDescription(),
'#description' => $this->t('Describe this comment type. The text will be displayed on the <em>Comment types</em> administration overview page.'),
'#description' => $this->t('Displays on the <em>Comment types</em> page.'),
'#title' => $this->t('Description'),
];
......
......@@ -97,7 +97,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#title' => $this->t('Name'),
'#type' => 'textfield',
'#default_value' => $this->entity->label(),
'#description' => $this->t('The human-readable name of this media type.'),
'#description' => $this->t('The human-readable name for this media type, displayed on the <em>Media types</em> page.'),
'#required' => TRUE,
'#size' => 30,
];
......@@ -110,14 +110,14 @@ public function form(array $form, FormStateInterface $form_state) {
'#machine_name' => [
'exists' => [MediaType::class, 'load'],
],
'#description' => $this->t('A unique machine-readable name for this media type.'),
'#description' => $this->t('Unique machine-readable name: lowercase letters, numbers, and underscores only.'),
];
$form['description'] = [
'#title' => $this->t('Description'),
'#type' => 'textarea',
'#default_value' => $this->entity->getDescription(),
'#description' => $this->t('Describe this media type. The text will be displayed on the <em>Add new media</em> page.'),
'#description' => $this->t('Displays on the <em>Media types</em> page.'),
];
$plugins = $this->sourceManager->getDefinitions();
......
......@@ -69,7 +69,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#title' => $this->t('Name'),
'#type' => 'textfield',
'#default_value' => $type->label(),
'#description' => $this->t('The human-readable name of this content type. This text will be displayed as part of the list on the <em>Add content</em> page. This name must be unique.'),
'#description' => $this->t('The human-readable name for this content type, displayed on the <em>Content types</em> page.'),
'#required' => TRUE,
'#size' => 30,
];
......@@ -83,7 +83,7 @@ public function form(array $form, FormStateInterface $form_state) {
'exists' => ['Drupal\node\Entity\NodeType', 'load'],
'source' => ['name'],
],
'#description' => $this->t('A unique machine-readable name for this content type. It must only contain lowercase letters, numbers, and underscores. This name will be used for constructing the URL of the %node-add page.', [
'#description' => $this->t('Unique machine-readable name: lowercase letters, numbers, and underscores only.', [
'%node-add' => $this->t('Add content'),
]),
];
......@@ -92,7 +92,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#title' => $this->t('Description'),
'#type' => 'textarea',
'#default_value' => $type->getDescription(),
'#description' => $this->t('This text will be displayed on the <em>Add new content</em> page.'),
'#description' => $this->t('Displays on the <em>Content types</em> page.'),
];
$form['additional_settings'] = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment