51                parent::__construct($a_title, $a_postvar);
 
   53                $this->show_wizard = 
false;
 
   54                $this->show_save_phrase = 
false;
 
   55                $this->categorytext = 
$lng->txt(
'row_text');
 
   56                $this->use_other_answer = 
false;
 
   68                $this->use_other_answer = ($a_value) ? 
true : 
false;
 
   78                include_once 
"./Modules/SurveyQuestionPool/classes/class.SurveyCategories.php";
 
   80                if (is_array($a_value))
 
   82                        if (is_array($a_value[
'answer']))
 
   84                                foreach ($a_value[
'answer'] as $index => 
$value)
 
   86                                        $this->values->addCategory(
$value, $a_value[
'other'][$index]);
 
   99                $this->values = $a_values;
 
  119                $this->allowMove = $a_allow_move;
 
  134                $this->show_wizard = $a_value;
 
  144                $this->categorytext = $a_text;
 
  154                $this->labeltext = $a_text;
 
  164                $this->show_save_phrase = $a_value;
 
  182                if (is_array($foundvalues))
 
  185                        if (is_array($foundvalues[
'answer']))
 
  187                                foreach ($foundvalues[
'answer'] as $idx => $answervalue)
 
  189                                        if (((strlen($answervalue)) == 0) && ($this->
getRequired() && (!$foundvalues[
'other'][$idx])))
 
  191                                                $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  199                        $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  215                $tpl = 
new ilTemplate(
"tpl.prop_matrixrowwizardinput.html", 
true, 
true, 
"Modules/SurveyQuestionPool");
 
  217                if (is_object($this->values))
 
  219                        for ($i = 0; $i < $this->values->getCategoryCount(); $i++)
 
  221                                $cat = $this->values->getCategory($i);
 
  222                                $tpl->setCurrentBlock(
"prop_text_propval");
 
  224                                $tpl->parseCurrentBlock();
 
  225                                $tpl->setCurrentBlock(
"prop_label_propval");
 
  227                                $tpl->parseCurrentBlock();
 
  231                                        $tpl->setCurrentBlock(
"other_answer_checkbox");
 
  233                                        $tpl->setVariable(
"OTHER_ID", $this->
getPostVar() . 
"[other][$i]");
 
  234                                        $tpl->setVariable(
"ROW_NUMBER", $i);
 
  237                                                $tpl->setVariable(
"CHECKED_OTHER", 
' checked="checked"');
 
  239                                        $tpl->parseCurrentBlock();
 
  244                                        $tpl->setCurrentBlock(
"move");
 
  245                                        $tpl->setVariable(
"CMD_UP", 
"cmd[up" . $this->
getFieldId() . 
"][$i]");
 
  246                                        $tpl->setVariable(
"CMD_DOWN", 
"cmd[down" . $this->
getFieldId() . 
"][$i]");
 
  248                                        include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  251                                        $tpl->parseCurrentBlock();
 
  254                                $tpl->setCurrentBlock(
"row");                           
 
  256                                $tpl->setVariable(
"ROW_NUMBER", $i);
 
  258                                $tpl->setVariable(
"ID_LABEL", $this->
getPostVar() . 
"[label][$i]");
 
  260                                $tpl->setVariable(
"SIZE_LABEL", 15);
 
  264                                        $tpl->setVariable(
"DISABLED", 
" disabled=\"disabled\"");
 
  265                                        $tpl->setVariable(
"DISABLED_LABEL", 
" disabled=\"disabled\"");
 
  268                                $tpl->setVariable(
"CMD_ADD", 
"cmd[add" . $this->
getFieldId() . 
"][$i]");
 
  269                                $tpl->setVariable(
"CMD_REMOVE", 
"cmd[remove" . $this->
getFieldId() . 
"][$i]");
 
  270                                include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  273                                $tpl->parseCurrentBlock();
 
  279                        $tpl->setCurrentBlock(
"wizard");
 
  280                        $tpl->setVariable(
"CMD_WIZARD", 
'cmd[wizard' . $this->
getFieldId() . 
']');
 
  282                        $tpl->setVariable(
"WIZARD_TEXT", $lng->txt(
'add_phrase'));
 
  283                        $tpl->parseCurrentBlock();
 
  288                        $tpl->setCurrentBlock(
'savephrase');
 
  290                        $tpl->setVariable(
"VALUE_SAVE_PHRASE", $lng->txt(
'save_phrase'));
 
  291                        $tpl->parseCurrentBlock();
 
  296                        $tpl->setCurrentBlock(
'other_answer_title');
 
  297                        $tpl->setVariable(
"OTHER_TEXT", $lng->txt(
'use_other_answer'));
 
  298                        $tpl->parseCurrentBlock();
 
  304                $tpl->setVariable(
"ACTIONS_TEXT", $lng->txt(
'actions'));
 
  306                $a_tpl->setCurrentBlock(
"prop_generic");
 
  307                $a_tpl->setVariable(
"PROP_GENERIC", 
$tpl->get());
 
  308                $a_tpl->parseCurrentBlock();
 
  311                $tpl->addJavascript(
"./Services/Form/js/ServiceFormWizardInput.js");
 
  312                $tpl->addJavascript(
"./Modules/SurveyQuestionPool/templates/default/matrixrowwizard.js");
 
An exception for terminatinating execution or to throw for unit testing.
static get($a_glyph, $a_text="")
Get glyph html.
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
getMaxLength()
Get Max Length.
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public