diff --git a/administrator/components/com_content/models/fields/modal/article.php b/administrator/components/com_content/models/fields/modal/article.php index 8e8c36bc25603..022c237ed9ab2 100644 --- a/administrator/components/com_content/models/fields/modal/article.php +++ b/administrator/components/com_content/models/fields/modal/article.php @@ -59,6 +59,12 @@ protected function getInput() $script[] = ' jQuery("#modalArticle").modal("hide");'; + if ($this->required) + { + $script[] = ' document.formvalidator.validate(document.getElementById("' . $this->id . '_id"));'; + $script[] = ' document.formvalidator.validate(document.getElementById("' . $this->id . '_name"));'; + } + $script[] = ' }'; // Clear button script @@ -173,4 +179,16 @@ protected function getInput() ); return implode("\n", $html); } + + /** + * Method to get the field label markup. + * + * @return string The field label markup. + * + * @since 3.4 + */ + protected function getLabel() + { + return str_replace($this->id, $this->id . '_id', parent::getLabel()); + } }