Skip to content

Commit

Permalink
Accessibility changes to Tag Options lang strings and changing toolti…
Browse files Browse the repository at this point in the history
…p to adapt to Tag Options selection dynamically based on options 2 and 4 #724711
  • Loading branch information
AeonvanGardingen authored and sammarshallou committed Jul 29, 2024
1 parent ee3e40e commit deab2ae
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
12 changes: 7 additions & 5 deletions lang/en/oublog.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@
option is set on the whole blog, that becomes a maximum. For example, if
the whole blog is set to the first level, you cannot change the
level of an individual post at all.</p>';
$string['tags_help'] = 'Tags are labels that help you find and categorise posts.';
$string['tags_help'] = 'Tags are labels that help you find and categorise posts. When adding tags, they should be comma separated if using two or more. {$a}';
$string['tags_help_predefined'] = 'You must select available tags from the dropdown tag list.';
// Used at OU only.
$string['externaldashboardadd'] = 'Add blog to dashboard';
$string['externaldashboardremove'] = 'Remove blog from dashboard';
Expand Down Expand Up @@ -649,10 +650,11 @@
$string['oublogsettingstask'] = 'OU Blog settings task';

$string['restricttags'] = 'Tag options';
$string['restricttags_req'] = 'Must enter tags';
$string['restricttags_req_set'] = 'Must enter pre-defined tags only';
$string['restricttags_set'] = 'Allow pre-defined tags only';
$string['restricttags_default'] = 'Add tags by default';
$string['restricttags_none'] = 'Individual tags (separated by commas) can be added to a post if required';
$string['restricttags_req'] = 'Pre-defined or individual tags (separated by commas) must be chosen to add a post';
$string['restricttags_req_set'] = 'Pre-defined tags must be chosen to add a post';
$string['restricttags_set'] = 'Pre-defined tags can be chosen for a post if required';
$string['restricttags_default'] = 'Predefined tags are added by default a new post';
$string['restricttags_help'] = 'If you select this option, you can restrict
tag entry to only those that are pre-defined at activity level and/or require that at least one tag be entered in a post.';
$string['restricttagslist'] = 'You may only enter the \'Set\' tags: {$a}';
Expand Down
2 changes: 1 addition & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function definition() {
'maxlength', 255, 'client');

$tagopts = array(
'0' => get_string('none'),
'0' => get_string('restricttags_none', 'oublog'),
'1' => get_string('restricttags_set', 'oublog'),
'2' => get_string('restricttags_req', 'oublog'),
'3' => get_string('restricttags_req_set', 'oublog'),
Expand Down
6 changes: 5 additions & 1 deletion post_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ public function definition() {

$mform->addElement('textarea', 'tags', get_string('tagsfield', 'oublog'), array('cols'=>48, 'rows'=>2));
$mform->setType('tags', PARAM_TAGLIST);
$mform->addHelpButton('tags', 'tags', 'oublog');
$extra = '';
if ($this->_customdata['restricttags'] == 2 || $this->_customdata['restricttags'] == 4) {
$extra = get_string('tags_help_predefined','oublog');
}
$mform->addHelpButton('tags', 'tags', 'oublog', '', false, $extra);
if ($this->_customdata['restricttags'] == 4) {
$mform->setDefault('tags', $tagslist);
}
Expand Down

0 comments on commit deab2ae

Please sign in to comment.