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;
 
   66                $this->use_other_answer = ($a_value) ? 
true : 
false;
 
   76                include_once 
"./Modules/SurveyQuestionPool/classes/class.SurveyCategories.php";
 
   78                if (is_array($a_value))
 
   80                        if (is_array($a_value[
'answer']))
 
   82                                foreach ($a_value[
'answer'] as $index => 
$value)
 
   84                                        $this->values->addCategory(
$value, $a_value[
'other'][$index]);
 
   97                $this->values = $a_values;
 
  117                $this->allowMove = $a_allow_move;
 
  132                $this->show_wizard = $a_value;
 
  142                $this->categorytext = $a_text;
 
  152                $this->labeltext = $a_text;
 
  162                $this->show_save_phrase = $a_value;
 
  180                if (is_array($foundvalues))
 
  183                        if (is_array($foundvalues[
'answer']))
 
  185                                foreach ($foundvalues[
'answer'] as $idx => $answervalue)
 
  187                                        if (((strlen($answervalue)) == 0) && ($this->
getRequired() && (!$foundvalues[
'other'][$idx])))
 
  189                                                $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  197                        $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  213                $tpl = 
new ilTemplate(
"tpl.prop_matrixrowwizardinput.html", 
true, 
true, 
"Modules/SurveyQuestionPool");
 
  215                if (is_object($this->values))
 
  217                        for ($i = 0; $i < $this->values->getCategoryCount(); $i++)
 
  219                                $cat = $this->values->getCategory($i);
 
  220                                $tpl->setCurrentBlock(
"prop_text_propval");
 
  222                                $tpl->parseCurrentBlock();
 
  223                                $tpl->setCurrentBlock(
"prop_label_propval");
 
  225                                $tpl->parseCurrentBlock();
 
  229                                        $tpl->setCurrentBlock(
"other_answer_checkbox");
 
  231                                        $tpl->setVariable(
"OTHER_ID", $this->
getPostVar() . 
"[other][$i]");
 
  232                                        $tpl->setVariable(
"ROW_NUMBER", $i);
 
  235                                                $tpl->setVariable(
"CHECKED_OTHER", 
' checked="checked"');
 
  237                                        $tpl->parseCurrentBlock();
 
  242                                        $tpl->setCurrentBlock(
"move");
 
  243                                        $tpl->setVariable(
"CMD_UP", 
"cmd[up" . $this->
getFieldId() . 
"][$i]");
 
  244                                        $tpl->setVariable(
"CMD_DOWN", 
"cmd[down" . $this->
getFieldId() . 
"][$i]");
 
  246                                        include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  249                                        $tpl->parseCurrentBlock();
 
  252                                $tpl->setCurrentBlock(
"row");                           
 
  254                                $tpl->setVariable(
"ROW_NUMBER", $i);
 
  256                                $tpl->setVariable(
"ID_LABEL", $this->
getPostVar() . 
"[label][$i]");
 
  258                                $tpl->setVariable(
"SIZE_LABEL", 15);
 
  262                                        $tpl->setVariable(
"DISABLED", 
" disabled=\"disabled\"");
 
  263                                        $tpl->setVariable(
"DISABLED_LABEL", 
" disabled=\"disabled\"");
 
  266                                $tpl->setVariable(
"CMD_ADD", 
"cmd[add" . $this->
getFieldId() . 
"][$i]");
 
  267                                $tpl->setVariable(
"CMD_REMOVE", 
"cmd[remove" . $this->
getFieldId() . 
"][$i]");
 
  268                                include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  271                                $tpl->parseCurrentBlock();
 
  277                        $tpl->setCurrentBlock(
"wizard");
 
  278                        $tpl->setVariable(
"CMD_WIZARD", 
'cmd[wizard' . $this->
getFieldId() . 
']');
 
  280                        $tpl->setVariable(
"WIZARD_TEXT", $lng->txt(
'add_phrase'));
 
  281                        $tpl->parseCurrentBlock();
 
  286                        $tpl->setCurrentBlock(
'savephrase');
 
  288                        $tpl->setVariable(
"VALUE_SAVE_PHRASE", $lng->txt(
'save_phrase'));
 
  289                        $tpl->parseCurrentBlock();
 
  294                        $tpl->setCurrentBlock(
'other_answer_title');
 
  295                        $tpl->setVariable(
"OTHER_TEXT", $lng->txt(
'use_other_answer'));
 
  296                        $tpl->parseCurrentBlock();
 
  302                $tpl->setVariable(
"ACTIONS_TEXT", $lng->txt(
'actions'));
 
  304                $a_tpl->setCurrentBlock(
"prop_generic");
 
  305                $a_tpl->setVariable(
"PROP_GENERIC", 
$tpl->get());
 
  306                $a_tpl->parseCurrentBlock();
 
  309                $tpl->addJavascript(
"./Services/Form/js/ServiceFormWizardInput.js");
 
  310                $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.
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