4require_once 
'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
 
   32        parent::__construct($a_title, $a_postvar);
 
   42        $this->values = array();
 
   43        if (is_array($a_value)) {
 
   44            if (is_array($a_value[
'key'])) {
 
   45                foreach ($a_value[
'key'] as $idx => 
$key) {
 
   46                    array_push($this->values, array(
$key, $a_value[
'value'][$idx]));
 
   59        $this->key_size = $a_size;
 
   79        $this->value_size = $a_size;
 
   99        $this->key_maxlength = $a_maxlength;
 
  119        $this->value_maxlength = $a_maxlength;
 
  139        $this->value_name = $a_name;
 
  159        $this->key_name = $a_name;
 
  179        $this->values = $a_values;
 
  199        $this->allowMove = $a_allow_move;
 
  225        if (is_array($foundvalues)) {
 
  227            if (is_array($foundvalues[
'key']) && is_array($foundvalues[
'value'])) {
 
  228                foreach ($foundvalues[
'key'] as $val) {
 
  230                        $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  234                foreach ($foundvalues[
'value'] as $val) {
 
  236                        $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  242                    $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  248                $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  264        $tpl = 
new ilTemplate(
"tpl.prop_kvpwizardinput.html", 
true, 
true, 
"Modules/TestQuestionPool");
 
  266        foreach ($this->values as 
$value) {
 
  268                $tpl->setCurrentBlock(
"prop_key_propval");
 
  270                $tpl->parseCurrentBlock();
 
  271                $tpl->setCurrentBlock(
"prop_value_propval");
 
  273                $tpl->parseCurrentBlock();
 
  276                $tpl->setCurrentBlock(
"move");
 
  277                $tpl->setVariable(
"CMD_UP", 
"cmd[up" . $this->
getFieldId() . 
"][$i]");
 
  278                $tpl->setVariable(
"CMD_DOWN", 
"cmd[down" . $this->
getFieldId() . 
"][$i]");
 
  282                $tpl->parseCurrentBlock();
 
  285            $tpl->setCurrentBlock(
"row");
 
  286            $class = (
$i % 2 == 0) ? 
"even" : 
"odd";
 
  290            if (
$i == count($this->values)-1) {
 
  293            $tpl->setVariable(
"ROW_CLASS", $class);
 
  294            $tpl->setVariable(
"ROW_NUMBER", 
$i);
 
  301            $tpl->setVariable(
"VALUE_ID", $this->
getPostVar() . 
"[value][$i]");
 
  305            $tpl->setVariable(
"CMD_ADD", 
"cmd[add" . $this->
getFieldId() . 
"][$i]");
 
  306            $tpl->setVariable(
"CMD_REMOVE", 
"cmd[remove" . $this->
getFieldId() . 
"][$i]");
 
  312            $tpl->parseCurrentBlock();
 
  320        $a_tpl->setCurrentBlock(
"prop_generic");
 
  321        $a_tpl->setVariable(
"PROP_GENERIC", 
$tpl->get());
 
  322        $a_tpl->parseCurrentBlock();
 
  325        $tpl->addJavascript(
"./Services/Form/js/ServiceFormWizardInput.js");
 
  326        $tpl->addJavascript(
"./Modules/TestQuestionPool/templates/default/kvpwizard.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.
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public