Permalink
Browse files

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

  • Loading branch information...
1 parent 9283723 commit e9ccaa1077ba571de200b6c36f86e033f1baa663 Rajesh Taneja committed Dec 7, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/formslib.php
View
7 lib/formslib.php
@@ -996,7 +996,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 e9ccaa1

Please sign in to comment.