mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Check to see if use_ajax_commenting is set before including the ajax javascript
This commit is contained in:
parent
6a0323415b
commit
967c6ed78d
@ -97,9 +97,11 @@ class CommentsExtension extends DataExtension {
|
||||
* @see docs/en/Extending
|
||||
*/
|
||||
public function CommentsForm() {
|
||||
if (Commenting::has_commenting($this->owner->ClassName) && Commenting::get_config_value($this->owner->ClassName, 'use_ajax_commenting')) {
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/jquery-validate/lib/jquery.form.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/jquery-validate/jquery.validate.pack.js');
|
||||
Requirements::javascript('comments/javascript/CommentsInterface.js');
|
||||
}
|
||||
|
||||
$interface = new SSViewer('CommentsInterface');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user