Skip to content

Commit

Permalink
MDL-72965 mod_data: Update tertiary navigation wording
Browse files Browse the repository at this point in the history
- Changed text to 'Manage fields' in the primary dropdown
- Change text to 'Create a new field' in the add new field dropdown
- Add a header when on 'Manage fields' page.
  • Loading branch information
Peter Dias committed Nov 30, 2021
1 parent 18b2af6 commit bdbef74
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/data/classes/output/action_bar.php
Expand Up @@ -61,7 +61,7 @@ public function get_fields_action_bar(bool $hasfieldselect = false, bool $hassav
$presetslink = new moodle_url('/mod/data/field.php', ['d' => $this->id, 'mode' => 'usepreset']);

$menu = [
$createfieldlink->out(false) => get_string('newfield', 'mod_data'),
$createfieldlink->out(false) => get_string('managefields', 'mod_data'),
$importlink->out(false) => get_string('importpreset', 'mod_data'),
$presetslink->out(false) => get_string('usestandard', 'mod_data'),
];
Expand Down Expand Up @@ -89,7 +89,7 @@ public function get_fields_action_bar(bool $hasfieldselect = false, bool $hassav
asort($menufield);

$fieldselecturl = new moodle_url('/mod/data/field.php', ['d' => $this->id, 'mode' => 'new']);
$fieldselect = new \single_select($fieldselecturl, 'newtype', $menufield, null, ['' => 'choosedots'],
$fieldselect = new \single_select($fieldselecturl, 'newtype', $menufield, null, get_string('newfield', 'data'),
'fieldform');
}

Expand Down
1 change: 1 addition & 0 deletions mod/data/field.php
Expand Up @@ -349,6 +349,7 @@
} else { /// Display the main listing of all fields
$fieldactionbar = $actionbar->get_fields_action_bar(true, true, true);
data_print_header($course, $cm, $data, 'fields', $fieldactionbar);
echo $OUTPUT->heading(get_string('managefields', 'data'), 2);

if (!$DB->record_exists('data_fields', array('dataid'=>$data->id))) {
echo $OUTPUT->notification(get_string('nofieldindatabase','data')); // nothing in database
Expand Down
1 change: 1 addition & 0 deletions mod/data/lang/en/data.php
Expand Up @@ -244,6 +244,7 @@
$string['listtemplate'] = 'List template';
$string['longitude'] = 'Longitude';
$string['manageapproved'] = 'Allow editing of approved entries';
$string['managefields'] = 'Manage fields';
$string['manageapproved_help'] = 'If disabled, approved entries are no longer editable or deletable by the user who added them. This setting has no effect unless \'Approval required\' is enabled.';
$string['mapexistingfield'] = 'Map to {$a}';
$string['mapnewfield'] = 'Create a new field';
Expand Down

0 comments on commit bdbef74

Please sign in to comment.