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;
222 $this->input_type = $a_type;
232 return $this->input_type;
242 $this->submit_form_on_enter = $a_val;
269 $this->
setAlert($lng->txt(
"msg_input_is_required"));
280 $lng->txt(
'msg_wrong_format')
296 $this->
setAlert($lng->txt(
"msg_input_is_required"));
316 $lng->txt(
'msg_wrong_format')
341 $this->ajax_datasource = $href;
342 $this->ajax_datasource_delimiter = $a_delimiter;
347 $this->ajax_datasource_commit = $a_stat;
357 $this->ajax_datasource_commit_url = $a_url;
367 foreach($a_values as $idx =>
$value)
369 $a_values[$idx] = trim(
$value);
370 if($a_values[$idx] ==
"")
372 unset($a_values[$idx]);
375 parent::setMultiValues($a_values);
381 public function render($a_mode =
"")
388 $tpl =
new ilTemplate(
"tpl.prop_textinput.html",
true,
true,
"Services/Form");
391 $tpl->setCurrentBlock(
"prop_text_propval");
393 $tpl->parseCurrentBlock();
397 $tpl->setCurrentBlock(
"stylecss");
399 $tpl->parseCurrentBlock();
403 $tpl->setCurrentBlock(
"classcss");
405 $tpl->parseCurrentBlock();
409 $tpl->touchBlock(
"submit_form_on_enter");
415 $tpl->setVariable(
'PROP_INPUT_TYPE',
'password');
418 $tpl->setVariable(
'PROP_INPUT_TYPE',
'hidden');
422 $tpl->setVariable(
'PROP_INPUT_TYPE',
'text');
456 $tpl->setVariable(
"DISABLED",
" disabled=\"disabled\"");
457 $tpl->setVariable(
"HIDDEN_INPUT", $hidden);
468 include_once
"Services/jQuery/classes/class.iljQueryUtil.php";
474 $tpl->setCurrentBlock(
"ac_multi");
477 $tpl->parseCurrentBlock();
480 $sel_auto =
'[id^="'.$this->getFieldId().
'"]';
485 $sel_auto =
"#".$this->getFieldId();
488 $tpl->setCurrentBlock(
"autocomplete_bl");
491 $tpl->setVariable(
'SEL_AUTOCOMPLETE', $sel_auto);
496 $tpl->setVariable(
'SEL_AUTOCOMPLETE_AUTOSUBMIT', $sel_auto);
502 $tpl->setVariable(
'AUTOCOMPLETE_DELIMITER', $this->ajax_datasource_delimiter);
503 $tpl->setVariable(
'SEL_AUTOCOMPLETE_DELIMITER', $sel_auto);
506 $tpl->parseCurrentBlock();
508 $tpl->setVariable(
'MORE_TXT', $lng->txt(
'autocomplete_more'));
511 if ($a_mode ==
"toolbar")
516 $tpl->setVariable(
"STYLE_PAR",
'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
520 $tpl->setVariable(
"STYLE_PAR",
'');
525 $tpl->setVariable(
"AUTOCOMPLETE",
"autocomplete=\"off\"");
531 $tpl->touchBlock(
"inline_in_bl");
545 $html = $this->render();
547 $a_tpl->setCurrentBlock(
"prop_generic");
548 $a_tpl->setVariable(
"PROP_GENERIC", $html);
549 $a_tpl->parseCurrentBlock();
557 $html = $this->render();
566 $html = $this->render(
"toolbar");
575 $this->autocomplete_disabled = $autocomplete;
setSubmitFormOnEnter($a_val)
Set submit form on enter.
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)
insert(&$a_tpl)
Insert property html.
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.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$ajax_datasource_delimiter
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.