4 include_once(
"./Services/Table/interfaces/interface.ilTableFilterItem.php");
5 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
6 include_once
'Services/UIComponent/Toolbar/interfaces/interface.ilToolbarItem.php';
7 include_once
'Services/Form/interfaces/interface.ilMultiValuesItem.php';
45 parent::__construct($a_title, $a_postvar);
48 $this->validationRegexp =
"";
58 if($this->
getMulti() && is_array($a_value))
61 $a_value = array_shift($a_value);
63 $this->value = $a_value;
84 $this->validationFailureMessage = $a_msg;
99 $this->validationRegexp = $a_value;
119 $this->maxlength = $a_maxlength;
139 $this->
size = $a_size;
149 $this->style_css = $a_style;
164 $this->css_class = $a_class;
200 $this->suffix = $a_value;
232 return $this->input_type;
242 $this->submit_form_on_enter = $a_val;
270 $this->
setAlert($lng->txt(
"msg_input_is_required"));
281 $lng->txt(
'msg_wrong_format')
303 $this->
setAlert($lng->txt(
"msg_input_is_required"));
323 $lng->txt(
'msg_wrong_format')
348 $this->ajax_datasource = $href;
349 $this->ajax_datasource_delimiter = $a_delimiter;
354 $this->ajax_datasource_commit = $a_stat;
364 $this->ajax_datasource_commit_url = $a_url;
374 foreach($a_values as $idx =>
$value)
376 $a_values[$idx] = trim(
$value);
377 if($a_values[$idx] ==
"")
379 unset($a_values[$idx]);
382 parent::setMultiValues($a_values);
388 public function render($a_mode =
"")
395 $tpl =
new ilTemplate(
"tpl.prop_textinput.html",
true,
true,
"Services/Form");
398 $tpl->setCurrentBlock(
"prop_text_propval");
400 $tpl->parseCurrentBlock();
404 $tpl->setCurrentBlock(
"stylecss");
406 $tpl->parseCurrentBlock();
410 $tpl->setCurrentBlock(
"classcss");
412 $tpl->parseCurrentBlock();
416 $tpl->touchBlock(
"submit_form_on_enter");
422 $tpl->setVariable(
'PROP_INPUT_TYPE',
'password');
425 $tpl->setVariable(
'PROP_INPUT_TYPE',
'hidden');
429 $tpl->setVariable(
'PROP_INPUT_TYPE',
'text');
463 $tpl->setVariable(
"HIDDEN_INPUT", $hidden);
465 $tpl->setVariable(
"DISABLED",
" disabled=\"disabled\"");
475 include_once
"Services/jQuery/classes/class.iljQueryUtil.php";
481 $tpl->setCurrentBlock(
"ac_multi");
484 $tpl->parseCurrentBlock();
487 $sel_auto =
'[id^="'.$this->getFieldId().
'"]';
492 $sel_auto =
"#".$this->getFieldId();
495 $tpl->setCurrentBlock(
"autocomplete_bl");
498 $tpl->setVariable(
'SEL_AUTOCOMPLETE', $sel_auto);
503 $tpl->setVariable(
'SEL_AUTOCOMPLETE_AUTOSUBMIT', $sel_auto);
509 $tpl->setVariable(
'AUTOCOMPLETE_DELIMITER', $this->ajax_datasource_delimiter);
510 $tpl->setVariable(
'SEL_AUTOCOMPLETE_DELIMITER', $sel_auto);
513 $tpl->parseCurrentBlock();
515 $tpl->setVariable(
'MORE_TXT', $lng->txt(
'autocomplete_more'));
518 if ($a_mode ==
"toolbar")
523 $tpl->setVariable(
"STYLE_PAR",
'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
527 $tpl->setVariable(
"STYLE_PAR",
'');
532 $tpl->setVariable(
"AUTOCOMPLETE",
"autocomplete=\"off\"");
537 $tpl->setVariable(
"REQUIRED",
"required=\"required\"");
543 $tpl->touchBlock(
"inline_in_bl");
557 $html = $this->render();
559 $a_tpl->setCurrentBlock(
"prop_generic");
560 $a_tpl->setVariable(
"PROP_GENERIC",
$html);
561 $a_tpl->parseCurrentBlock();
569 $html = $this->render();
578 $html = $this->render(
"toolbar");
587 $this->autocomplete_disabled = $autocomplete;
setSubmitFormOnEnter($a_val)
Set submit form on enter.
insert($a_tpl)
Insert property html.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
static initjQueryUI()
Init jQuery UI (see included_components.txt for included components)
Interface for property form input GUI classes that can be used in table filters.
setDataSource($href, $a_delimiter=null)
set datasource link for js autocomplete
getDataSourceSubmitOnSelection()
setDataSourceSubmitOnSelection($a_stat)
getDataSource()
get datasource link for js autocomplete
setDataSourceSubmitUrl($a_url)
getToolbarHTML()
Get HTML for toolbar.
getValidationFailureMessage()
getTableFilterHTML()
Get HTML for table filter.
isHtmlAutoCompleteDisabled()
__construct($a_title="", $a_postvar="")
Constructor.
$ajax_datasource_commit_url
getSubmitFormOnEnter()
Get submit form on enter.
setMultiValues(array $a_values)
getValidationRegexp()
Get validation regexp.
special template class to simplify handling of ITX/PEAR
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setDisableHtmlAutoComplete($autocomplete)
setValidationFailureMessage($a_msg)
Set message string for validation failure.
setMaxLength($a_maxlength)
Set Max Length.
$ajax_datasource_delimiter
Create styles array
The data for the language used.
checkInput()
Check input, strip slashes etc.
Interface for multi values support.
setValueByArray($a_values)
Set value by array.
setSuffix($a_value)
Set suffix.
$validationFailureMessage
getInputType()
get input type
setInlineStyle($a_style)
Set inline style.
static initjQuery($a_tpl=null)
Init jQuery.
setValidationRegexp($a_value)
Set validation regexp.
setValue($a_value)
Set Value.
setInputType($a_type)
set input type
getInlineStyle()
Get inline style.