MDL-29012 Show which user profile field is being deleted

Improve usability by showing the name of the profile field
being deleted.
This commit is contained in:
Tomasz Muras
2011-08-20 16:29:21 +01:00
parent 4f3632441a
commit 192a8aef34
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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';
+2 -1
View File
@@ -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);