Commit 2165306e authored by xjm's avatar xjm

Issue #1862250 by amanire, Ivan Zugec, joates, yoroy, joshi.rohit100,...

Issue #1862250 by amanire, Ivan Zugec, joates, yoroy, joshi.rohit100, acabouet, rpayanm: The "Trim length" format description is confusing/not clear to Drupal newcomers
parent 5abc88d8
......@@ -47,9 +47,11 @@ public static function defaultSettings() {
*/
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['trim_length'] = array(
'#title' => t('Trim length'),
'#title' => t('Trimmed limit'),
'#type' => 'number',
'#field_suffix' => t('characters'),
'#default_value' => $this->getSetting('trim_length'),
'#description' => t('If the summary is not set, the trimmed %label field will end at the last full sentence before this character limit.', array('%label' => $this->fieldDefinition->getLabel())),
'#min' => 1,
'#required' => TRUE,
);
......@@ -61,7 +63,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) {
*/
public function settingsSummary() {
$summary = array();
$summary[] = t('Trim length: @trim_length', array('@trim_length' => $this->getSetting('trim_length')));
$summary[] = t('Trimmed limit: @trim_length characters', array('@trim_length' => $this->getSetting('trim_length')));
return $summary;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment