Skip to content

Commit

Permalink
Merge pull request #6889 from Erftralle/client-validation-menu-type-s…
Browse files Browse the repository at this point in the history
…ingle-news-feed

[imp]Client side validation for menu type single news feed
  • Loading branch information
wilsonge committed May 5, 2015
2 parents 8d86c05 + a59daf7 commit e3b1287
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ protected function getInput()

$script[] = ' jQuery("#modalNewsfeed").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
Expand Down Expand Up @@ -182,4 +188,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());
}
}

0 comments on commit e3b1287

Please sign in to comment.