From 192a8aef343befa64d6530149fd73aa506c77065 Mon Sep 17 00:00:00 2001 From: Tomasz Muras Date: Sat, 20 Aug 2011 16:29:21 +0100 Subject: [PATCH] MDL-29012 Show which user profile field is being deleted Improve usability by showing the name of the profile field being deleted. --- lang/en/admin.php | 2 +- user/profile/index.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lang/en/admin.php b/lang/en/admin.php index 77021d920fb..dc80da11172 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -804,7 +804,7 @@ $string['profiledefaultcategory'] = 'Other fields'; $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'; diff --git a/user/profile/index.php b/user/profile/index.php index d61c4057217..0617d173bac 100644 --- a/user/profile/index.php +++ b/user/profile/index.php @@ -55,8 +55,9 @@ switch ($action) { } //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); -- 2.43.0