Permalink
Browse files

MDL-29012 Show which user profile field is being deleted

Improve usability by showing the name of the profile field
being deleted.
  • Loading branch information...
1 parent 4f36324 commit 192a8aef343befa64d6530149fd73aa506c77065 @tmuras tmuras committed Aug 20, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −1 lang/en/admin.php
  2. +2 −1 user/profile/index.php
View
@@ -804,7 +804,7 @@
$string['profiledefaultdata'] = 'Default value';
$string['profiledefaultchecked'] = 'Checked by default';
$string['profiledeletecategory'] = 'Deleting a category';
-$string['profiledeletefield'] = 'Deleting a field';
+$string['profiledeletefield'] = 'Deleting field "{$a}"';
$string['profiledescription'] = 'Description of the field';
$string['profiledscript'] = 'This script has been profiled';
$string['profiledscriptview'] = 'View profiling information for this script';
View
@@ -55,8 +55,9 @@
}
//ask for confirmation
+ $fieldname = $DB->get_field('user_info_field', 'name', array('id'=>$id));
$optionsyes = array ('id'=>$id, 'confirm'=>1, 'action'=>'deletefield', 'sesskey'=>sesskey());
- $strheading = get_string('profiledeletefield', 'admin');
+ $strheading = get_string('profiledeletefield', 'admin', $fieldname);
$PAGE->navbar->add($strheading);
echo $OUTPUT->header();
echo $OUTPUT->heading($strheading);

0 comments on commit 192a8ae

Please sign in to comment.