Skip to content
Snippets Groups Projects
Commit f67612c0 authored by dd_diablo's avatar dd_diablo Committed by Artem Sylchuk
Browse files

Issue #3204985 by dd_diablo, v.koval, dlevchik, artem_sylchuk: Where to...

Issue #3204985 by dd_diablo, v.koval, dlevchik, artem_sylchuk: Where to configure the text format of the message field?
parent 6c810d09
No related branches found
No related tags found
1 merge request!83Issue #3204985: Show input formats.
......@@ -2,7 +2,6 @@ enable_notifications: true
notify_by_default: true
notify_when_using: 'no'
number_of_seconds_considered_away: 120
hide_form_filter_tips: false
hide_recipient_field_when_prefilled: false
create_message_label: 'Create Private Message'
save_message_label: 'Send'
......
......@@ -14,9 +14,6 @@ private_message.settings:
number_of_seconds_considered_away:
type: integer
label: 'The number of seconds after a user has accessed a thread, after which they should be considered as not viewing the thread anymore'
hide_form_filter_tips:
type: boolean
label: 'Whether or not to hide the filter tips on the message form'
hide_recipient_field_when_prefilled:
type: boolean
label: 'Whether or not to hide the recipient field when a recipient is passed through the URL'
......
......@@ -416,4 +416,14 @@ function private_message_update_8013() {
$update_manager = \Drupal::entityDefinitionUpdateManager();
$update_manager->installFieldStorageDefinition('subject', 'private_message_thread', 'private_message_thread', $storage_definition);
}
\ No newline at end of file
}
/**
* Show input formats functionality.
*/
function private_message_update_8014() {
$config = \Drupal::configFactory()
->getEditable('private_message.settings');
$rows = $config->getRawData();
unset($rows["hide_form_filter_tips"]);
$config->setData($rows)->save();
}
......@@ -135,13 +135,6 @@ class ConfigForm extends ConfigFormBase {
],
];
$form['pm_core']['hide_form_filter_tips'] = [
'#type' => 'checkbox',
'#title' => $this->t('Hide filter tips'),
'#description' => $this->t('If this box is checked, the text formats description on the private message form will be removed'),
'#default_value' => (int) $config->get('hide_form_filter_tips'),
];
$form['pm_core']['hide_recipient_field_when_prefilled'] = [
'#type' => 'checkbox',
'#title' => $this->t('Hide recipient field when recipient is in the URL'),
......@@ -279,7 +272,6 @@ class ConfigForm extends ConfigFormBase {
->set('notify_by_default', (bool) $formState->getValue('notify_by_default'))
->set('notify_when_using', (string) $formState->getValue('notify_when_using'))
->set('number_of_seconds_considered_away', (int) $formState->getValue('number_of_seconds_considered_away'))
->set('hide_form_filter_tips', (bool) $formState->getValue('hide_form_filter_tips'))
->set('hide_recipient_field_when_prefilled', (bool) $formState->getValue('hide_recipient_field_when_prefilled'))
->set('create_message_label', $formState->getValue('create_message_label'))
->set('save_message_label', $formState->getValue('save_message_label'))
......
......@@ -306,10 +306,6 @@ class PrivateMessageForm extends ContentEntityForm {
$form['#validate'][] = '::validateBannedMembers';
if ($this->config->get('hide_form_filter_tips')) {
$form['#after_build'][] = '::afterBuild';
}
if ($save_label = $this->config->get('save_message_label')) {
$form['actions']['submit']['#value'] = $save_label;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment