Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit dd613b60ec16cd984665e624f228dc624188f652 1 parent 68b0cae
Tim Hunt timhunt authored

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. +3 0  lib/formslib.php
3  lib/formslib.php
@@ -933,6 +933,9 @@ function repeat_elements_fix_clone($i, $elementclone, &$namecloned) {
933 933 $value = $elementclone->_text;
934 934 $elementclone->setValue(str_replace('{no}', ($i+1), $value));
935 935
  936 + } else if (is_a($elementclone, 'HTML_QuickForm_submit') || is_a($elementclone, 'HTML_QuickForm_button')) {
  937 + $elementclone->setValue(str_replace('{no}', ($i+1), $elementclone->getValue()));
  938 +
936 939 } else {
937 940 $value=$elementclone->getLabel();
938 941 $elementclone->setLabel(str_replace('{no}', ($i+1), $value));

0 comments on commit dd613b6

Please sign in to comment.
Something went wrong with that request. Please try again.