From 277f16dba79a536e7e9999f7cce6d4edee940a8f Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Thu, 27 Jun 2019 13:53:01 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#866 --- wire/modules/Fieldtype/FieldtypeComments/CommentForm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wire/modules/Fieldtype/FieldtypeComments/CommentForm.php b/wire/modules/Fieldtype/FieldtypeComments/CommentForm.php index 91b8ebdb..edc0badf 100644 --- a/wire/modules/Fieldtype/FieldtypeComments/CommentForm.php +++ b/wire/modules/Fieldtype/FieldtypeComments/CommentForm.php @@ -167,7 +167,11 @@ class CommentForm extends Wire implements CommentFormInterface { $this->options['headline'] = "<$h3>" . $this->_('Post Comment') . ""; // Form headline $this->options['successMessage'] = "

" . $this->_('Thank you, your submission has been saved.') . "

"; $this->options['pendingMessage'] = "

" . $this->_('Your comment has been submitted and will appear once approved by the moderator.') . "

"; - $this->options['errorMessage'] = "

" . $this->_('Your submission was not saved due to one or more errors. Please check that you have completed all fields before submitting again.') . "

"; + $this->options['errorMessage'] = "

" . $this->_('Your submission was not saved due to one or more errors. Please check that you have completed all fields before submitting again.') . "

"; + + if(substr($this->wire('input')->url(), -1) != '/') { + $this->options['attrs']['action'] = $page->url; + } // default labels $this->options['labels']['cite'] = $this->_('Your Name');