static function loadOpenIdJS() { if (!self::$_loadOpenIdJS) { $doc = JFactory::getDocument(); $doc->addScript('components/com_hs_users/asset/js/openid.js'); $urlTitle = JText::_('COM_HS_USERS_HTML_OPENID_ENTER_TITLE'); $btnSubmit = JText::_('COM_HS_USERS_HTML_OPENID_SUBMIT_DATA'); $errorMissedField = JText::_('COM_HS_USERS_HTML_OPENID_ERROR_MISSED_FIELD'); $js = <<<EOF window.addEvent('domready',function(){ \tnew HSJS.coms.users.openid({ \t\tlanguage:{ \t\t\tenterUrlTitle:'{$urlTitle}', \t\t\tbtnSubmit:'{$btnSubmit}', \t\t\terrorMissedField:'{$errorMissedField}'\t\t\t \t\t} \t}); }); EOF; $doc->addScriptDeclaration($js); self::$_loadOpenIdJS = true; } }