Bind for UserFlag only if there is a form for it
This commit is contained in:
parent
e20a54fb8c
commit
6d29f3f2de
|
@ -146,7 +146,7 @@ class UserFlagPlugin extends Plugin
|
||||||
function onEndShowScripts($action)
|
function onEndShowScripts($action)
|
||||||
{
|
{
|
||||||
$action->elementStart('script', array('type' => 'text/javascript'));
|
$action->elementStart('script', array('type' => 'text/javascript'));
|
||||||
$action->raw('/*<![CDATA[*/ SN.U.FormXHR($(".form_entity_flag")); /*]]>*/');
|
$action->raw('/*<![CDATA[*/ if ($(".form_entity_flag").length > 0) { SN.U.FormXHR($(".form_entity_flag")); } /*]]>*/');
|
||||||
$action->elementEnd('script');
|
$action->elementEnd('script');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user