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';
47 $this->lng = $DIC->language();
48 parent::__construct($a_title, $a_postvar);
51 $this->validationRegexp =
"";
61 if ($this->
getMulti() && is_array($a_value)) {
63 $a_value = array_shift($a_value);
65 $this->value = $a_value;
86 $this->validationFailureMessage = $a_msg;
101 $this->validationRegexp = $a_value;
121 $this->maxlength = $a_maxlength;
141 $this->
size = $a_size;
151 $this->style_css = $a_style;
166 $this->css_class = $a_class;
202 $this->suffix = $a_value;
234 return $this->input_type;
244 $this->submit_form_on_enter = $a_val;
278 $lng->txt(
'msg_wrong_format')
310 $lng->txt(
'msg_wrong_format')
335 $this->ajax_datasource = $href;
336 $this->ajax_datasource_delimiter = $a_delimiter;
341 $this->ajax_datasource_commit = $a_stat;
351 $this->ajax_datasource_commit_url = $a_url;
361 foreach ($a_values as $idx =>
$value) {
362 $a_values[$idx] = trim(
$value);
363 if ($a_values[$idx] ==
"") {
364 unset($a_values[$idx]);
367 parent::setMultiValues($a_values);
373 public function render($a_mode =
"")
380 $tpl =
new ilTemplate(
"tpl.prop_textinput.html",
true,
true,
"Services/Form");
382 $tpl->setCurrentBlock(
"prop_text_propval");
384 $tpl->parseCurrentBlock();
387 $tpl->setCurrentBlock(
"stylecss");
389 $tpl->parseCurrentBlock();
392 $tpl->setCurrentBlock(
"classcss");
394 $tpl->parseCurrentBlock();
397 $tpl->touchBlock(
"submit_form_on_enter");
402 $tpl->setVariable(
'PROP_INPUT_TYPE',
'password');
405 $tpl->setVariable(
'PROP_INPUT_TYPE',
'hidden');
409 $tpl->setVariable(
'PROP_INPUT_TYPE',
'text');
430 foreach (
$value as $item) {
438 $tpl->setVariable(
"HIDDEN_INPUT", $hidden);
440 $tpl->setVariable(
"DISABLED",
" disabled=\"disabled\"");
447 include_once
"Services/jQuery/classes/class.iljQueryUtil.php";
452 $tpl->setCurrentBlock(
"ac_multi");
455 $tpl->parseCurrentBlock();
458 $sel_auto =
'[id^="' . $this->
getFieldId() .
'"]';
464 $tpl->setCurrentBlock(
"autocomplete_bl");
466 $tpl->setVariable(
'SEL_AUTOCOMPLETE', $sel_auto);
469 $tpl->setVariable(
'SEL_AUTOCOMPLETE_AUTOSUBMIT', $sel_auto);
473 $tpl->setVariable(
'AUTOCOMPLETE_DELIMITER', $this->ajax_datasource_delimiter);
474 $tpl->setVariable(
'SEL_AUTOCOMPLETE_DELIMITER', $sel_auto);
477 $tpl->parseCurrentBlock();
479 $tpl->setVariable(
'MORE_TXT',
$lng->txt(
'autocomplete_more'));
482 if ($a_mode ==
"toolbar") {
486 $tpl->setVariable(
"STYLE_PAR",
'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
488 $tpl->setVariable(
"STYLE_PAR",
'');
492 $tpl->setVariable(
"AUTOCOMPLETE",
"autocomplete=\"off\"");
496 $tpl->setVariable(
"REQUIRED",
"required=\"required\"");
501 $tpl->touchBlock(
"inline_in_bl");
517 $html = $this->render();
519 $a_tpl->setCurrentBlock(
"prop_generic");
520 $a_tpl->setVariable(
"PROP_GENERIC",
$html);
521 $a_tpl->parseCurrentBlock();
529 $html = $this->render();
538 $html = $this->render(
"toolbar");
547 $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.
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
checkInput()
Check input, strip slashes etc.
Interface for multi values support.
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
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)
inits and adds the jQuery JS-File to the global or a passed template
setValidationRegexp($a_value)
Set validation regexp.
setValue($a_value)
Set Value.
setInputType($a_type)
set input type
getInlineStyle()
Get inline style.