Permalink
Browse files

MDL-30560 Forms Lib: 'type' key for repeat_elements is restored

  • Loading branch information...
1 parent 42f6b3f commit 51070abc78b9e1db1db9a44855e8623b22bebd48 Rajesh Taneja committed Dec 7, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/formslib.php
View
@@ -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;
}
}
}

0 comments on commit 51070ab

Please sign in to comment.