public static function label($for, $label, $ak = null)
{
if (is_null($ak)) {
$ak = self::getAccessKey($label, 1);
}
$label = self::highlightAccessKey($label, $ak);
return sprintf('<label for="%s"%s>%s</label>', $for, !empty($ak) ? ' accesskey="' . $ak . '"' : '', $label);
}
/** */ protected function _content() { global $page_output; $name = strval(new Horde_Support_Randomid()); $page_output->addScriptFile('vatid.js', 'horde'); $page_output->addInlineScript(array('$("' . $name . '").observe("submit", HordeBlockVatid.onSubmit.bindAsEventListener(HordeBlockVatid))'), true); return '<form style="padding:2px" action="' . $this->_ajaxUpdateUrl() . '" id="' . $name . '">' . Horde_Util::formInput() . Horde::label('vatid', _("VAT identification number:")) . '<br /><input type="text" length="14" name="vatid" />' . '<br /><input type="submit" id="vatbutton" value="' . _("Check") . '" class="horde-default" /> ' . Horde_Themes_Image::tag('loading.gif', array('alt' => _("Checking"), 'attr' => array('style' => 'display:none'))) . '<div class="vatidResults"></div>' . '</form>'; }