@@ -371,12 +372,20 @@ class ContentLock implements ContentLockInterface {
if ($this->verbose() && !$quiet) {
if ($translation_lock) {
- $this->messenger->addStatus($this->t('This content translation is now locked against simultaneous editing. This content translation will remain locked if you navigate away from this page without saving or unlocking it.'));
+ $message = 'This content translation is now locked against simultaneous editing.';
+ if (!$js_lock) {
+ $message .= ' This content translation will remain locked if you navigate away from this page without saving or unlocking it.';
+ }
}
else {
- $this->messenger->addStatus($this->t('This content is now locked against simultaneous editing. This content will remain locked if you navigate away from this page without saving or unlocking it.'));
+ $message = 'This content is now locked against simultaneous editing.';
+ if (!$js_lock) {
+ $message .= ' This content will remain locked if you navigate away from this page without saving or unlocking it.';
@@ -424,11 +433,18 @@ class ContentLock implements ContentLockInterface {
// Locked by current user.
if ($this->verbose() && !$quiet) {
if ($translation_lock) {
- $this->messenger->addStatus($this->t('This content translation is now locked by you against simultaneous editing. This content translation will remain locked if you navigate away from this page without saving or unlocking it.'));
+ $message = 'This content translation is now locked by you against simultaneous editing.';
+ if (!$js_lock) {
+ $message .= ' This content translation will remain locked if you navigate away from this page without saving or unlocking it.';
+ }
}
else {
- $this->messenger->addStatus($this->t('This content is now locked by you against simultaneous editing. This content will remain locked if you navigate away from this page without saving or unlocking it.'));
+ $message = 'This content is now locked by you against simultaneous editing.';
+ if (!$js_lock) {
+ $message .= ' This content will remain locked if you navigate away from this page without saving or unlocking it.';
- '#description' => $this->t('Activating this options activates the lock when the user is on the form. This helps if modules interacting with form without a user interacting with the form, like the prefetch_cache module.'),
+ '#title' => $this->t('Lock and release form using JS.'),
+ '#description' => $this->t('Activating this options activates the lock when the user is on the form. This helps if modules interacting with form without a user interacting with the form, like the prefetch_cache module. The form is automatically released when navigating away from the page.'),
];
if (!empty($definition->getHandlerClasses()['form'])) {