49                parent::__construct($a_title, $a_postvar);
 
   51                $this->show_wizard = 
false;
 
   52                $this->show_save_phrase = 
false;
 
   53                $this->categorytext = 
$lng->txt(
'row_text');
 
   54                $this->use_other_answer = 
false;
 
   64                $this->use_other_answer = ($a_value) ? 
true : 
false;
 
   74                include_once 
"./Modules/SurveyQuestionPool/classes/class.SurveyCategories.php";
 
   76                if (is_array($a_value))
 
   78                        if (is_array($a_value[
'answer']))
 
   80                                foreach ($a_value[
'answer'] as $index => 
$value)
 
   82                                        $this->values->addCategory(
$value, $a_value[
'other'][$index]);
 
   95                $this->values = $a_values;
 
  115                $this->allowMove = $a_allow_move;
 
  130                $this->show_wizard = $a_value;
 
  140                $this->categorytext = $a_text;
 
  150                $this->labeltext = $a_text;
 
  160                $this->show_save_phrase = $a_value;
 
  178                if (is_array($foundvalues))
 
  181                        if (is_array($foundvalues[
'answer']))
 
  183                                foreach ($foundvalues[
'answer'] as $idx => $answervalue)
 
  185                                        if (((strlen($answervalue)) == 0) && ($this->
getRequired() && (!$foundvalues[
'other'][$idx])))
 
  187                                                $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  195                        $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  211                $tpl = 
new ilTemplate(
"tpl.prop_matrixrowwizardinput.html", 
true, 
true, 
"Modules/SurveyQuestionPool");
 
  213                if (is_object($this->values))
 
  215                        for ($i = 0; $i < $this->values->getCategoryCount(); $i++)
 
  217                                $cat = $this->values->getCategory($i);
 
  218                                $tpl->setCurrentBlock(
"prop_text_propval");
 
  220                                $tpl->parseCurrentBlock();
 
  221                                $tpl->setCurrentBlock(
"prop_label_propval");
 
  223                                $tpl->parseCurrentBlock();
 
  227                                        $tpl->setCurrentBlock(
"other_answer_checkbox");
 
  229                                        $tpl->setVariable(
"OTHER_ID", $this->
getPostVar() . 
"[other][$i]");
 
  230                                        $tpl->setVariable(
"ROW_NUMBER", $i);
 
  233                                                $tpl->setVariable(
"CHECKED_OTHER", 
' checked="checked"');
 
  235                                        $tpl->parseCurrentBlock();
 
  240                                        $tpl->setCurrentBlock(
"move");
 
  241                                        $tpl->setVariable(
"CMD_UP", 
"cmd[up" . $this->
getFieldId() . 
"][$i]");
 
  242                                        $tpl->setVariable(
"CMD_DOWN", 
"cmd[down" . $this->
getFieldId() . 
"][$i]");
 
  244                                        include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  247                                        $tpl->parseCurrentBlock();
 
  250                                $tpl->setCurrentBlock(
"row");                           
 
  252                                $tpl->setVariable(
"ROW_NUMBER", $i);
 
  254                                $tpl->setVariable(
"ID_LABEL", $this->
getPostVar() . 
"[label][$i]");
 
  256                                $tpl->setVariable(
"SIZE_LABEL", 15);
 
  260                                        $tpl->setVariable(
"DISABLED", 
" disabled=\"disabled\"");
 
  261                                        $tpl->setVariable(
"DISABLED_LABEL", 
" disabled=\"disabled\"");
 
  264                                $tpl->setVariable(
"CMD_ADD", 
"cmd[add" . $this->
getFieldId() . 
"][$i]");
 
  265                                $tpl->setVariable(
"CMD_REMOVE", 
"cmd[remove" . $this->
getFieldId() . 
"][$i]");
 
  266                                include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  269                                $tpl->parseCurrentBlock();
 
  275                        $tpl->setCurrentBlock(
"wizard");
 
  276                        $tpl->setVariable(
"CMD_WIZARD", 
'cmd[wizard' . $this->
getFieldId() . 
']');
 
  278                        $tpl->setVariable(
"WIZARD_TEXT", $lng->txt(
'add_phrase'));
 
  279                        $tpl->parseCurrentBlock();
 
  284                        $tpl->setCurrentBlock(
'savephrase');
 
  286                        $tpl->setVariable(
"VALUE_SAVE_PHRASE", $lng->txt(
'save_phrase'));
 
  287                        $tpl->parseCurrentBlock();
 
  292                        $tpl->setCurrentBlock(
'other_answer_title');
 
  293                        $tpl->setVariable(
"OTHER_TEXT", $lng->txt(
'use_other_answer'));
 
  294                        $tpl->parseCurrentBlock();
 
  300                $tpl->setVariable(
"ACTIONS_TEXT", $lng->txt(
'actions'));
 
  302                $a_tpl->setCurrentBlock(
"prop_generic");
 
  303                $a_tpl->setVariable(
"PROP_GENERIC", 
$tpl->get());
 
  304                $a_tpl->parseCurrentBlock();
 
  307                $tpl->addJavascript(
"./Services/Form/js/ServiceFormWizardInput.js");
 
  308                $tpl->addJavascript(
"./Modules/SurveyQuestionPool/templates/default/matrixrowwizard.js");
 
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.
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