Permalink
Browse files

MDL-34008 formslib: repeat_elements replace {no} for submits & buttons

  • Loading branch information...
1 parent a5f6ea2 commit b0cf55f1453d3d06a62afca0a944a5f955641baa @timhunt timhunt committed Jun 25, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/formslib.php
View
@@ -944,6 +944,9 @@ function repeat_elements_fix_clone($i, $elementclone, &$namecloned) {
$value = $elementclone->_text;
$elementclone->setValue(str_replace('{no}', ($i+1), $value));
+ } else if (is_a($elementclone, 'HTML_QuickForm_submit') || is_a($elementclone, 'HTML_QuickForm_button')) {
+ $elementclone->setValue(str_replace('{no}', ($i+1), $elementclone->getValue()));
+
} else {
$value=$elementclone->getLabel();
$elementclone->setLabel(str_replace('{no}', ($i+1), $value));

0 comments on commit b0cf55f

Please sign in to comment.