本文整理汇总了PHP中HTML_QuickForm_text类的典型用法代码示例。如果您正苦于以下问题:PHP HTML_QuickForm_text类的具体用法?PHP HTML_QuickForm_text怎么用?PHP HTML_QuickForm_text使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HTML_QuickForm_text类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: HTML_QuickForm_text
/**
* Class constructor
*
* @param string $elementName (optional)Input field name attribute
* @param string $elementLabel (optional)Input field label
* @param mixed $attributes (optional)Either a typical HTML attribute string
* or an associative array
* @since 1.0
* @access public
* @return void
*/
function HTML_QuickForm_text($elementName = null, $elementLabel = null, $attributes = null)
{
//HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
new HTML_QuickForm_input($elementName, $elementLabel, $attributes);
self::$_persistantFreeze = true;
self::setType('text');
}
开发者ID:alachaum,项目名称:timetrex,代码行数:18,代码来源:text.php
示例2: MoodleQuickForm_tccolourpopup
public function MoodleQuickForm_tccolourpopup($elementname = null, $elementlabel = null, $attributes = null, $options = null)
{
parent::HTML_QuickForm_text($elementname, $elementlabel, $attributes);
}
开发者ID:LearningPool,项目名称:moodle-format_topcoll,代码行数:4,代码来源:tc_colourpopup.php
示例3: MoodleQuickForm_tccolourpopup
function MoodleQuickForm_tccolourpopup($elementName = null, $elementLabel = null, $attributes = null, $options = null)
{
global $CFG;
parent::HTML_QuickForm_text($elementName, $elementLabel, $attributes);
}
开发者ID:oncampus,项目名称:mooin_course_format_octabs,代码行数:5,代码来源:tc_colourpopup.php
示例4: MoodleQuickForm_customcert_colourpicker
/**
* Constructor for the colour picker.
*
* @param string $elementName
* @param string $elementLabel
* @param array $attributes
*/
function MoodleQuickForm_customcert_colourpicker($elementName = null, $elementLabel = null, $attributes = null)
{
parent::HTML_QuickForm_text($elementName, $elementLabel, $attributes);
}
开发者ID:rezaies,项目名称:moodle-mod_customcert,代码行数:11,代码来源:colourpicker.php
示例5: MoodleQuickForm_gfcolourpopup
public function MoodleQuickForm_gfcolourpopup($elementName = null, $elementLabel = null, $attributes = null, $options = null)
{
parent::HTML_QuickForm_text($elementName, $elementLabel, $attributes);
$this->_type = 'colourtext';
}
开发者ID:philippe-tcg,项目名称:moodle-format_grid,代码行数:5,代码来源:gf_colourpopup.php
示例6: MoodleQuickForm_username
function MoodleQuickForm_username($elementName = null, $elementLabel = null, $attributes = null)
{
HTML_QuickForm_text::HTML_QuickForm_text($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->setType('user');
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:6,代码来源:username.php
示例7: toHtml
/**
* @return string
*/
public function toHtml()
{
$js = $this->getElementJS();
$this->removeAttribute('format');
$this->removeAttribute('timepicker');
$this->removeAttribute('validate_format');
return $js . parent::toHtml();
}
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:11,代码来源:DateRangePicker.php
示例8: toHtml
function toHtml()
{
if ($this->_hiddenLabel) {
$this->_generateId();
return '<label class="accesshide" for="' . $this->getAttribute('id') . '" >' . $this->getLabel() . '</label>' . parent::toHtml();
} else {
return parent::toHtml();
}
}
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:9,代码来源:text.php
示例9: DatePicker
/**
* @param string $elementName
* @param string $elementLabel
* @param array $attributes
*/
public function DatePicker($elementName = null, $elementLabel = null, $attributes = null)
{
if (!isset($attributes['id'])) {
$attributes['id'] = $elementName;
}
$attributes['class'] = 'form-control';
parent::__construct($elementName, $elementLabel, $attributes);
$this->_appendName = true;
$this->_type = 'date_picker';
}
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:15,代码来源:DatePicker.php
示例10: __construct
/**
* Constructor of Url class
* @param type $elementName
* @param type $elementLabel
* @param type $attributes
*/
public function __construct($elementName = null, $elementLabel = null, $attributes = null)
{
if (!isset($attributes['id'])) {
$attributes['id'] = $elementName;
}
$attributes['type'] = 'url';
$attributes['class'] = 'form-control';
parent::__construct($elementName, $elementLabel, $attributes);
$this->setType('url');
}
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:16,代码来源:Url.php
示例11: toHtml
function toHtml()
{
$oldFrozen = $this->_flagFrozen;
$this->_flagFrozen = 0;
if (intval($oldFrozen) !== 0) {
$this->updateAttributes(array('data-depselect-frozen' => '1'));
}
$out = parent::toHtml();
$this->_flagFrozen = $oldFrozen;
return $out;
}
开发者ID:shannah,项目名称:xataface-module-depselect,代码行数:11,代码来源:depselect.php
示例12: toHtml
/**
* Returns the textarea element in HTML
*
* @since 1.0
* @access public
* @return string
*/
function toHtml()
{
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
} else {
ob_start();
if (!defined('HTML_QuickForm_yui_autocomplete_js_loaded')) {
// Load the javascript files if they haven't been loaded yet
define('HTML_QuickForm_yui_autocomplete_js_loaded', true);
$yahoo_dom_event_src = DATAFACE_URL . '/HTML/QuickForm/yui_autocomplete/yahoo-dom-event.js';
$autocomplete_src = DATAFACE_URL . '/HTML/QuickForm/yui_autocomplete/autocomplete-min.js';
$df_autocomplete_src = DATAFACE_URL . '/HTML/QuickForm/yui_autocomplete/df_yui_autocomplete.js';
echo <<<END
\t\t\t\t<script type="text/javascript" src="{$yahoo_dom_event_src}"></script>
END;
if (isset($this->datasourceUrl)) {
// Since a datasource URL has been provided, we must be using
// AJAX for autocompletion
$xhr_src = DATAFACE_URL . '/HTML/QuickForm/yui_autocomplete/connection-min.js';
echo <<<END
\t\t\t\t\t<script type="text/javascript" src="{$xhr_src}"></script>
END;
}
echo <<<END
\t\t\t\t<script type="text/javascript" src="{$autocomplete_src}"></script>
\t\t\t\t<script language="javascript" src="{$df_autocomplete_src}"></script>
END;
}
if ($this->vocabularyName and !defined('HTML_QuickForm_yui_autocomplete_js_valuelists_' . $this->vocabularyName . '_loaded')) {
define('HTML_QuickForm_yui_autocomplete_js_valuelists_' . $this->vocabularyName . '_loaded', 1);
// We must be using in-memory arrays for the vocabulary
import('Services/JSON.php');
$json = new Services_JSON();
$js_options = $json->encode(array_values($this->options));
$valuelistName = $this->vocabularyName;
echo <<<END
\t\t\t<script language="javascript">
\t\t\tif ( !window.DATAFACE ) window.DATAFACE = {};
\t\t\tif ( window.DATAFACE.VALUELISTS == null) window.DATAFACE.VALUELISTS = {};
\t\t\tif ( window.DATAFACE.VALUELISTS['{$valuelistName}'] == null ) window.DATAFACE.VALUELISTS['{$valuelistName}'] = {$js_options};
\t\t\t</script>
END;
}
echo '<div>' . parent::toHtml() . '</div>';
$out = ob_get_contents();
ob_end_clean();
return $out;
}
}
开发者ID:minger11,项目名称:Pipeline,代码行数:56,代码来源:yui_autocomplete.php
示例13: foreach
function HTML_QuickForm_calendar($elementName = null, $elementLabel = null, $attributes = null, $properties = null)
{
parent::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
$this->_type = 'calendar';
// Default language is english
if (!@$properties['lang']) {
$properties['lang'] = 'en';
}
// Default theme is windows 2k. This is the name of a css file (without the .css extension)
if (!@$properties['theme']) {
$properties['theme'] = 'calendar-win2k-2';
}
// Whether to load the stripped javascript files (i.e., the versions with spaces and whitespace stripped out).
// for faster loading
if (!isset($properties['stripped'])) {
$properties['stripped'] = false;
}
// Default show Monday first (first day = 1)
if (!isset($properties['firstDay'])) {
$properties['firstDay'] = 1;
}
// Whether or not to show the time also
if (!isset($properties['showsTime'])) {
$properties['showsTime'] = true;
}
// Whether or not to show others (not sure what this means ... check jscalendar docs
if (!isset($properties['showOthers'])) {
$properties['showOthers'] = true;
}
// The Format to be placed in the input field.
if (!isset($properties['ifFormat'])) {
$properties['ifFormat'] = '%Y-%m-%d %I:%M %P';
}
// The time format
if (!isset($properties['timeFormat'])) {
$properties['timeFormat'] = '12';
}
foreach (array_keys($properties) as $key) {
$this->setProperty($key, $properties[$key]);
}
$this->calendar = new DHTML_Calendar($GLOBALS['HTML_QuickForm_calendar']['jscalendar_BasePath'], $this->getProperty('lang'), $this->getProperty('theme'), $this->getProperty('stripped'));
}
开发者ID:Zunair,项目名称:xataface,代码行数:42,代码来源:calendar.php
示例14: toHtml
/**
* Returns HTML for this form element.
*
* @return string
*/
function toHtml()
{
global $CFG, $COURSE, $USER, $PAGE, $OUTPUT;
$id = $this->_attributes['id'];
$elname = $this->_attributes['name'];
if ($this->_hiddenLabel) {
$this->_generateId();
$str = '<label class="accesshide" for="' . $this->getAttribute('id') . '" >' . $this->getLabel() . '</label>' . parent::toHtml();
} else {
$str = parent::toHtml();
}
if (empty($this->_options['usefilepicker'])) {
return $str;
}
$strsaved = get_string('filesaved', 'repository');
$straddlink = get_string('choosealink', 'repository');
if ($COURSE->id == SITEID) {
$context = context_system::instance();
} else {
$context = context_course::instance($COURSE->id);
}
$client_id = uniqid();
$str .= <<<EOD
<button id="filepicker-button-{$client_id}" style="display:none">
{$straddlink}
</button>
EOD;
$args = new stdClass();
$args->accepted_types = '*';
$args->return_types = FILE_EXTERNAL;
$args->context = $PAGE->context;
$args->client_id = $client_id;
$args->env = 'url';
$fp = new file_picker($args);
$options = $fp->options;
// print out file picker
$str .= $OUTPUT->render($fp);
$module = array('name' => 'form_url', 'fullpath' => '/lib/form/url.js', 'requires' => array('core_filepicker'));
$PAGE->requires->js_init_call('M.form_url.init', array($options), true, $module);
$PAGE->requires->js_function_call('show_item', array('filepicker-button-' . $client_id));
return $str;
}
开发者ID:JP-Git,项目名称:moodle,代码行数:47,代码来源:url.php
示例15: toHtml
/**
* HTML code to display this datepicker
*
* @return string
*/
public function toHtml()
{
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
}
$id = $this->getAttribute('id');
$value = $this->getValue();
if (!empty($value)) {
$value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H);
}
if (empty($this->getLabel())) {
return $this->getElementJS() . '
<div class="input-group">
<span class="input-group-addon">
<input ' . $this->_getAttrString($this->_attributes) . '>
</span>
<input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
</div>
';
}
return $this->getElementJS() . parent::toHtml();
}
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:27,代码来源:DatePicker.php
示例16: toHtml
/**
* Returns HTML for this form element.
*
* @return string
*/
function toHtml()
{
global $PAGE, $OUTPUT;
$id = $this->_attributes['id'];
$elname = $this->_attributes['name'];
if ($this->_hiddenLabel) {
$this->_generateId();
$str = '<label class="accesshide" for="' . $this->getAttribute('id') . '" >' . $this->getLabel() . '</label>' . parent::toHtml();
} else {
$str = parent::toHtml();
}
if (empty($this->_options['usefilepicker'])) {
return $str;
}
$client_id = uniqid();
$args = new stdClass();
$args->accepted_types = '*';
$args->return_types = FILE_EXTERNAL;
$args->context = $PAGE->context;
$args->client_id = $client_id;
$args->env = 'url';
$fp = new file_picker($args);
$options = $fp->options;
if (count($options->repositories) > 0) {
$straddlink = get_string('choosealink', 'repository');
$str .= <<<EOD
<button id="filepicker-button-{$client_id}" class="visibleifjs">
{$straddlink}
</button>
EOD;
}
// print out file picker
$str .= $OUTPUT->render($fp);
$module = array('name' => 'form_url', 'fullpath' => '/lib/form/url.js', 'requires' => array('core_filepicker'));
$PAGE->requires->js_init_call('M.form_url.init', array($options), true, $module);
return $str;
}
开发者ID:alanaipe2015,项目名称:moodle,代码行数:42,代码来源:url.php
示例17: toHtml
/**
* Returns the element in HTML
*
* @since 1.0
* @access public
* @return string
*/
function toHtml()
{
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
}
$html = '';
$id = $this->getAttribute('id');
if (!$id) {
$this->setAttribute('id', $this->getName());
$id = $this->getName();
}
$value = $this->getAttribute('value');
if (!$id) {
$value = '#ddd';
}
if (!defined('HTML_QUICKFORM_colorpicker_LOADED')) {
$html = " <input type=\"button\" value=\"\" ";
$html .= sprintf('style="background-color:%s;border:1px solid #000;' . 'padding:0px;width:20px;cursor:pointer" id="%s_trigger"/>', $value, $id);
if (isset($this->_options['jsFile'])) {
$html .= sprintf("\n<script type=\"text/javascript\" src=\"%s\"></script>", $this->_options['jsFile']);
}
if (isset($this->_options['cssFile'])) {
$html .= sprintf("\n<style type=\"text/css\">@import \"%s\";</style>", $this->_options['cssFile']);
}
$html .= sprintf("\n<script type=\"text/javascript\">\n" . "//<![CDATA[\n" . "connect(window, 'onload', function() { if(\$('%s')) " . "attachColorPicker(\$('%s'), \$('%s_trigger'), false); });\n" . "//]]>\n" . "</script>\n", $id, $id, $id);
define('HTML_QUICKFORM_colorpicker_LOADED', true);
}
$html = parent::toHtml() . $html;
return $html;
}
开发者ID:arhe,项目名称:pwak,代码行数:37,代码来源:colorpicker.php
示例18: searchRequest
/**
* Returns Html for the LiveSearch_Select input text element
*
* @access public
* @return string
*/
function toHtml()
{
$this->realName = $this->getName();
$liveform = '';
$scriptLoad = '';
$style = 'display: block;';
$divstyle = ' class="divstyle" ';
$ulstyle = ' class="ulstyle" ';
$listyle = ' class="listyle" ';
$zeroLength = 0;
$printStyle = 1;
$this->updateAttributes(array('name' => $this->getPrivateName($this->realName)));
if (isset($this->_options['style']) and $this->_options['style'] != '') {
$style = $this->_options['style'];
}
if (isset($this->_options['divstyle']) and $this->_options['divstyle'] != '') {
$divstyle = ' class="' . $this->_options['divstyle'] . '" ';
}
if (isset($this->_options['ulstyle']) and $this->_options['ulstyle'] != '') {
$ulstyle = ' class="' . $this->_options['ulstyle'] . '" ';
}
if (isset($this->_options['listyle']) and $this->_options['listyle'] != '') {
$listyle = ' class="' . $this->_options['listyle'] . '" ';
}
if (isset($this->_options['searchZeroLength']) and $this->_options['searchZeroLength'] == 1) {
$zeroLength = 1;
} else {
$zeroLength = 0;
}
if (isset($this->_options['printStyle']) and $this->_options['printStyle'] != 1) {
$printStyle = 0;
}
if (isset($this->_options['autoserverPath']) and $this->_options['autoserverPath'] != '') {
$autoserverPath = $this->_options['autoserverPath'];
} else {
$autoserverPath = '';
}
if (isset($this->_options['autoComplete']) and $this->_options['autoComplete'] != 0) {
$this->updateAttributes(array('autocomplete' => 'off'));
}
$this->updateAttributes(array('onkeyup' => 'javascript:liveSearchKeyPress(this, event, \'' . $this->getName() . 'Result\', \'target_' . $this->_options['elementId'] . '\', \'' . $this->_options['elementId'] . '\', \'' . $this->realName . '\', ' . $zeroLength . ');', 'onblur' => 'javascript:liveSearchHide(\'' . $this->getName() . 'Result\');', 'id' => $this->_options['elementId'], 'style' => $style));
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
} else {
$liveform .= '
<div' . $divstyle . 'id="' . $this->getName() . 'Result">
<ul' . $ulstyle . 'id="target_' . $this->_options['elementId'] . '">
<li' . $listyle . '> </li>
</ul>
</div>';
if (!defined('HTML_QUICKFORM_LIVESEARCH_EXISTS')) {
if ($printStyle != 0) {
$scriptLoad = <<<EOS
<style type="text/css">
<!--
.divstyle {
position: absolute;
background-color: #aaa;
z-index: 1;
min-width: 140px;
float:left;
clear:left;
background: url(shadowAlpha.png) no-repeat bottom right !important;
background: url(shadow.gif) no-repeat bottom right;
margin: 10px 0 10px 10px !important;
padding: 0px;
display: none;
}
* html .divstyle { width: 140px;}
.ulstyle {
list-style-type: none;
position: relative;
right: 0px;
z-index: 1;
margin: 0px;
padding: 0px;
}
.listyle {
text-indent: -20px;
z-index: 1;
padding-right: 15px;
padding-bottom: 2px;
padding-top: 2px;
padding-left: 20px;
line-height:15px;
margin-bottom: 0px;
}
.outerUl {
list-style-type: none;
position: relative;
z-index: 1;
background-color: #FFFFFF;
color: inherit;
//.........这里部分代码省略.........
开发者ID:haibaer76,项目名称:volksvermessung,代码行数:101,代码来源:livesearch_select.php
示例19: toHtml
/**
* Returns the textarea element in HTML
*
* @since 1.0
* @access public
* @return string
*/
function toHtml()
{
$out = '';
if (!defined('HTML_QuickForm_lookup_files_loaded')) {
define('HTML_QuickForm_lookup_files_loaded', 1);
$jt = Dataface_JavascriptTool::getInstance();
$jt->import('xataface/widgets/lookup.js');
}
$properties = $this->getProperties();
if ($this->_flagFrozen) {
$properties['frozen'] = 1;
}
if (!isset($properties['callback'])) {
$properties['callback'] = 'function(out){}';
}
ob_start();
$oldFrozen = $this->_flagFrozen;
$this->_flagFrozen = 0;
$this->updateAttributes(array('data-xf-lookup-options' => json_encode($properties)));
echo parent::toHtml();
$this->_flagFrozen = $oldFrozen;
$out .= ob_get_contents();
ob_end_clean();
$selector = null;
if ($this->getName()) {
$selector = "input[name='" . $this->getName() . "']";
} else {
$selector = '.xf-lookup-' . $this->index_prefix . '-' . $this->index;
}
return '<span style="white-space:nowrap">' . $out . '</span>';
}
开发者ID:minger11,项目名称:Pipeline,代码行数:38,代码来源:lookup.php
示例20: toHtml
/**
* Generates the HTML for this element
* @global object $PAGE Moodle page object for fetching renderer
* @return string Generated HTML
* @version 2011070501
* @since 2011070501
*/
public function toHtml()
{
global $PAGE;
$output = $PAGE->get_renderer('block_moodletxt');
$renderedElement = parent::toHtml();
$renderedElement .= $output->render($this->getIcon());
return $renderedElement;
}
开发者ID:educacionbe,项目名称:campus,代码行数:15,代码来源:QuickFormTextWithImage.php
注:本文中的HTML_QuickForm_text类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论