本文整理汇总了PHP中Horde::label方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde::label方法的具体用法?PHP Horde::label怎么用?PHP Horde::label使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Horde
的用法示例。
在下文中一共展示了Horde::label方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _content
/**
*/
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>';
}
示例2: display
/**
*/
public function display(Horde_Core_Prefs_Ui $ui)
{
global $injector, $page_output, $prefs;
if (!$ui->nobuttons) {
$page_output->addScriptFile('hordecore.js', 'horde');
$page_output->addScriptFile('colorpicker.js', 'horde');
$page_output->addScriptFile('prefs/flag.js');
}
$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);
$page_output->addInlineJsVars(array('ImpFlagPrefs.new_prompt' => _("Please enter the label for the new flag:"), 'ImpFlagPrefs.confirm_delete' => _("Are you sure you want to delete this flag?")));
$view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs'));
$view->addHelper('FormTag');
$view->addHelper('Tag');
$view->locked = $prefs->isLocked('msgflags');
$view->picker_img = Horde_Themes_Image::tag('colorpicker.png', array('alt' => _("Color Picker")));
$out = array();
$flaglist = $injector->getInstance('IMP_Flags')->getList();
foreach ($flaglist as $val) {
$hash = $val->hash;
$bgid = 'bg_' . $hash;
$color = $val->bgdefault ? '' : $val->bgcolor;
$tmp = array();
if ($val instanceof IMP_Flag_User) {
$tmp['label'] = htmlspecialchars($val->label);
$tmp['label_name'] = 'label_' . $hash;
$tmp['user'] = true;
} else {
$tmp['icon'] = $val->span;
$tmp['label'] = Horde::label($bgid, $val->label);
}
$tmp['color'] = $color;
$tmp['colorid'] = $bgid;
$tmp['colorstyle'] = 'color:' . $val->fgcolor . ';' . (strlen($color) ? 'background-color:' . $color . ';' : '');
$out[] = $tmp;
}
$view->flags = $out;
return $view->render('flags');
}
示例3: alarm
/**
* Create code needed for alarm selection.
*
* @param array $data Data items:
* - 'helplink': (string) [OPTIONAL] Help link.
* - 'label': (string) Label.
* - 'pref': (string) Preference name.
* - 'value': (array) [OPTIONAL] Preference value.
*
* @return string HTML UI code.
*/
public static function alarm($data)
{
$pref = $data['pref'];
$GLOBALS['injector']->getInstance('Horde_PageOutput')->addInlineJsVars(array('HordeAlarmPrefs.pref' => $pref));
$alarm_pref = isset($data['value']) ? $data['value'] : unserialize($GLOBALS['prefs']->getValue($pref));
$selected = array_keys($alarm_pref);
$t = $GLOBALS['injector']->createInstance('Horde_Template');
$t->setOption('gettext', true);
$param_list = $select_list = array();
foreach ($GLOBALS['injector']->getInstance('Horde_Alarm')->handlers() as $method => $handler) {
$select_list[] = array('l' => $handler->getDescription(), 's' => in_array($method, $selected), 'v' => $method);
$tmp = array('method' => $method, 'param' => array());
foreach ($handler->getParameters() as $name => $param) {
switch ($param['type']) {
case 'text':
$tmp['param'][] = array('label' => Horde::label($pref . '_' . $name, $param['desc']), 'name' => $pref . '_' . $name, 'text' => true, 'value' => empty($alarm_pref[$method][$name]) ? '' : htmlspecialchars($alarm_pref[$method][$name]));
break;
case 'bool':
$tmp['param'][] = array('bool' => true, 'checked' => !empty($alarm_pref[$method][$name]), 'label' => Horde::label($pref . '_' . $name, $param['desc']), 'name' => $pref . '_' . $name);
break;
case 'sound':
$current_sound = empty($alarm_pref[$method][$name]) ? '' : $alarm_pref[$method][$name];
$sounds = array();
foreach (Horde_Themes::soundList() as $key => $val) {
$sounds[] = array('c' => $current_sound == $key, 'uri' => htmlspecialchars($val->uri), 'val' => htmlspecialchars($key));
}
$t->set('sounds', $sounds);
$tmp['param'][] = array('sound' => true, 'checked' => !$current_sound, 'name' => $pref . '_' . $name);
break;
}
}
$param_list[] = $tmp;
}
$t->set('desc', Horde::label($pref, $data['label']));
if (!empty($data['helplink'])) {
$t->set('helplink', $data['helplink']);
}
$t->set('pref', htmlspecialchars($pref));
$t->set('param_list', $param_list);
$t->set('select_list', $select_list);
return $t->fetch($GLOBALS['registry']->get('templates', 'horde') . '/prefs/alarm.html');
}
示例4: hordeLabel
/**
* Wrapper around the Horde::label() method.
*
* @see Horde::label()
*/
public function hordeLabel($for, $label, $ak = null)
{
return Horde::label($for, $label, $ak);
}
示例5: _
<strong><?php
echo _("for");
?>
</strong><br />
<?php
echo $fetch_date_select;
?>
<br />
<input id="overwrite" type="checkbox" name="overwrite" value="true" />
<?php
echo Horde::label('overwrite', _("Overwrite comics if they exist?"));
?>
<br />
<input id="nounique" type="checkbox" name="nounique" value="true" />
<?php
echo Horde::label('nounique', _("Don't check for uniqueness"));
?>
<br />
<input class="horde-default" type="submit" value="<?php
echo _("Fetch Comics");
?>
" />
</form>
<hr />
<form action="<?php
echo Horde::url('backend.php');
?>
" method="get">
<?php
echo Horde_Util::formInput();
?>
示例6: _
?>
<div class="notePassphrase">
<form action="view.php" name="passphrase" method="post">
<?php
echo Horde_Util::formInput();
?>
<input type="hidden" name="memolist" value="<?php
echo $this->h($this->listid);
?>
" />
<input type="hidden" name="memo" value="<?php
echo $this->h($this->id);
?>
" />
<?php
echo Horde::label('memo_passphrase', _("_Password"));
?>
:
<input type="password" id="mnemo-passphrase" name="memo_passphrase" />
<input type="submit" class="horde-default" value="<?php
echo _("Decrypt");
?>
" />
</form>
</div>
<?php
} else {
?>
<div class="noteBody">
<?php
echo $this->body;
示例7: _identityHeader
/**
* Output the identities page header entries (default identity,
* identity selection, and identity deletion).
*
* @param array $members The list of prefs to display on this page.
*
* @return string HTML output.
*/
protected function _identityHeader($members)
{
$identity = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Identity')->create(null, $this->app);
$default_identity = $identity->getDefault();
$t = $GLOBALS['injector']->createInstance('Horde_Template');
$t->setOption('gettext', true);
if ($GLOBALS['prefs']->isLocked('default_identity')) {
$t->set('default_identity', intval($default_identity));
$identities = array($default_identity);
} else {
$t->set('defaultid', Horde_Core_Translation::t("Your default identity:"));
$t->set('label', Horde::label('identity', Horde_Core_Translation::t("Select the identity you want to change:")));
$identities = $identity->getAll('id');
}
$entry = $js = array();
$tmp = array();
foreach ($members as $member) {
$tmp[] = $this->_generateEntry($member, $GLOBALS['prefs']->getValue($member));
}
$js[-1] = $tmp;
foreach ($identities as $key => $val) {
$entry[] = array('i' => $key, 'label' => htmlspecialchars($val), 'sel' => $key == $default_identity);
$tmp = array();
foreach ($members as $member) {
$tmp[] = $this->_generateEntry($member, $identity->getValue($member, $key));
}
$js[] = $tmp;
}
$t->set('entry', $entry);
$GLOBALS['injector']->getInstance('Horde_PageOutput')->addInlineScript(array('HordeIdentitySelect.identities = ' . Horde_Serialize::serialize($js, Horde_Serialize::JSON)));
return $t->fetch(HORDE_TEMPLATES . '/prefs/identityselect.html');
}
示例8: _renderVarInput_NagStart
protected function _renderVarInput_NagStart($form, $var, $vars)
{
$var->type->getInfo($vars, $var, $task_start);
$start_dt = $task_start == 0 ? $_SERVER['REQUEST_TIME'] + 604800 : $task_start;
$on = $task_start > 0;
/* Set up the radio buttons. */
$html = sprintf('<input id="start_date_none" name="start_date" type="radio" class="radio" value="none"%s />
%s
<br />
<input id="start_date_specified" name="start_date" type="radio" class="radio" value="specified"%s />
<label for="start_date_specified" class="hidden">%s</label>
<label for="start_date" class="hidden">%s</label>
<input type="text" name="start[date]" id="start_date" size="10" value="%s">', $on ? '' : ' checked="checked"', Horde::label('start_date_none', _("No delay")), $on ? ' checked="checked"' : '', _("Start date specified."), _("Date"), htmlspecialchars(strftime($GLOBALS['prefs']->getValue('time_format_mini'), $start_dt)));
if ($GLOBALS['browser']->hasFeature('javascript')) {
Horde_Core_Ui_JsCalendar::init(array('full_weekdays' => true));
$GLOBALS['page_output']->addScriptFile('calendar.js');
$html .= ' <span id="start_wday"></span>' . Horde::img('calendar.png', _("Calendar"), 'id="startimg"');
}
return $html;
}
示例9: _
<table width="100%"><tr><td align="center"><table width="300" align="center">
<tr>
<td class="light rightAlign"><strong><?php
echo Horde::label('horde_user', _("Username"));
?>
</strong> </td>
<td class="leftAlign"><input type="text" id="horde_user" name="horde_user" value="<?php
echo htmlspecialchars(Horde_Util::getFormData('horde_user'));
?>
" style="direction:ltr" /></td>
</tr>
<tr>
<td class="light rightAlign"><strong><?php
echo Horde::label('horde_pass', _("Password"));
?>
</strong> </td>
<td class="leftAlign"><input type="password" id="horde_pass" name="horde_pass" value="" style="direction:ltr" /></td>
</tr>
<tr>
<td> </td>
<td class="light leftAlign"><input name="loginButton" class="button" value="<?php
echo _("Log in");
?>
" type="submit" onclick="return submit_login();" /></td>
</tr>
</table></td></tr></table>
</form>
示例10: _
?>
</td>
<td><input type="checkbox" id="memo_encrypt" name="memo_encrypt" checked="checked" /></td>
</tr>
<?php
}
?>
<tr>
<td class="rightAlign"><?php
echo Horde::label('memo_passphrase', _("_Password:"));
?>
</td>
<td><input type="password" id="memo_passphrase" name="memo_passphrase" /></td>
</tr>
<tr>
<td class="rightAlign"><?php
echo Horde::label('memo_passphrase2', _("_Repeat:"));
?>
</td>
<td><input type="password" id="memo_passphrase2" name="memo_passphrase2" /></td>
</tr>
<?php
}
?>
</table>
</form>
<?php
}
?>
</div>