5 include_once(
"./Services/Table/interfaces/interface.ilTableFilterItem.php");
6 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
7 include_once
'Services/UIComponent/Toolbar/interfaces/interface.ilToolbarItem.php';
8 include_once
'Services/Form/interfaces/interface.ilMultiValuesItem.php';
31 parent::__construct($a_title, $a_postvar);
42 $this->options = $a_options;
52 return $this->options ? $this->options :
array();
62 if($this->
getMulti() && is_array($a_value))
65 $a_value = array_shift($a_value);
67 $this->value = $a_value;
91 $item->setValueByArray($a_values);
114 $this->
setAlert($lng->txt(
'msg_invalid_post_input'));
125 $this->
setAlert($lng->txt(
'msg_invalid_post_input'));
138 $this->
setAlert($lng->txt(
"msg_input_is_required"));
146 $this->cust_attr[] = $a_attr;
159 $tpl =
new ilTemplate(
"tpl.prop_select.html",
true,
true,
"Services/Form");
163 $tpl->setCurrentBlock(
'cust_attr');
164 $tpl->setVariable(
'CUSTOM_ATTR',$attr);
165 $tpl->parseCurrentBlock();
171 foreach($this->
getOptions() as $option_value => $option_text)
175 $sel_value = $option_value;
178 if ((
string) $option_value == (
string) $this->
getValue())
180 $sel_value = $option_value;
183 foreach($this->
getOptions() as $option_value => $option_text)
185 $tpl->setCurrentBlock(
"prop_select_option");
187 if((
string) $sel_value == (
string) $option_value)
189 $tpl->setVariable(
"CHK_SEL_OPTION",
190 'selected="selected"');
192 $tpl->setVariable(
"TXT_SELECT_OPTION", $option_text);
193 $tpl->parseCurrentBlock();
223 $tpl->setVariable(
"DISABLED",
" disabled=\"disabled\"");
224 $tpl->setVariable(
"HIDDEN_INPUT", $hidden);
235 $tpl->touchBlock(
"inline_in_bl");
249 $a_tpl->setCurrentBlock(
"prop_generic");
250 $a_tpl->setVariable(
"PROP_GENERIC", $this->
render());
251 $a_tpl->parseCurrentBlock();
281 $this->hide_sub = (bool)$a_value;
286 ' { il.Form.showSubForm(\'subform_'.$this->getFieldId().
'\', \
'il_prop_cont_'.$this->getFieldId().
'\'); }
'. 287 ' else { il.Form.hideSubForm(\
'subform_'.$this->
getFieldId().
'\'); };
"'); 291 function hideSubForm() 293 return (bool)$this->hide_sub;
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
Interface for property form input GUI classes that can be used in table filters.
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.
Interface for multi values support.