Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit e9ccaa1077ba571de200b6c36f86e033f1baa663 1 parent 9283723
Rajesh Taneja authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/formslib.php
7 lib/formslib.php
View
@@ -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;
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.