Skip to content

Commit

Permalink
MDL-30560 Forms Lib: 'type' key for repeat_elements is restored
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Dec 7, 2011
1 parent 01f7f6f commit e61eeca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/formslib.php
Expand Up @@ -1014,7 +1014,12 @@ function repeat_elements($elementobjs, $repeats, $options, $repeathiddenname,
$params = array_merge(array($realelementname), $params);
call_user_func_array(array(&$mform, 'addRule'), $params);
break;

case 'type' :
//Type should be set only once
if (!isset($mform->_types[$elementname])) {
$mform->setType($elementname, $params);
}
break;
}
}
}
Expand Down

0 comments on commit e61eeca

Please sign in to comment.