Bind for UserFlag only if there is a form for it

This commit is contained in:
Sarven Capadisli 2009-11-28 20:54:32 +01:00
parent e20a54fb8c
commit 6d29f3f2de
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ class UserFlagPlugin extends Plugin
function onEndShowScripts($action)
{
$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');
return true;
}