Commit 01dc1c11 authored by jun's avatar jun
Browse files

MDL-56919 mod_forum: Assign check icon for selected subscription mode

parent 894b1825
......@@ -7146,6 +7146,7 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
if ($canmanage) {
$mode = $forumnode->add(get_string('subscriptionmode', 'forum'), null, navigation_node::TYPE_CONTAINER);
$mode->add_class('subscriptionmode');
$allowchoice = $mode->add(get_string('subscriptionoptional', 'forum'), new moodle_url('/mod/forum/subscribe.php', array('id'=>$forumobject->id, 'mode'=>FORUM_CHOOSESUBSCRIBE, 'sesskey'=>sesskey())), navigation_node::TYPE_SETTING);
$forceforever = $mode->add(get_string("subscriptionforced", "forum"), new moodle_url('/mod/forum/subscribe.php', array('id'=>$forumobject->id, 'mode'=>FORUM_FORCESUBSCRIBE, 'sesskey'=>sesskey())), navigation_node::TYPE_SETTING);
......@@ -7156,18 +7157,22 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
case FORUM_CHOOSESUBSCRIBE : // 0
$allowchoice->action = null;
$allowchoice->add_class('activesetting');
$allowchoice->icon = new pix_icon('t/selected', '', 'mod_forum');
break;
case FORUM_FORCESUBSCRIBE : // 1
$forceforever->action = null;
$forceforever->add_class('activesetting');
$forceforever->icon = new pix_icon('t/selected', '', 'mod_forum');
break;
case FORUM_INITIALSUBSCRIBE : // 2
$forceinitially->action = null;
$forceinitially->add_class('activesetting');
$forceinitially->icon = new pix_icon('t/selected', '', 'mod_forum');
break;
case FORUM_DISALLOWSUBSCRIBE : // 3
$disallowchoice->action = null;
$disallowchoice->add_class('activesetting');
$disallowchoice->icon = new pix_icon('t/selected', '', 'mod_forum');
break;
}
......
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" preserveAspectRatio="xMinYMid meet" overflow="visible"><path d="M11.4.6l-.9-.5c-.4-.2-1-.1-1.3.4L4.7 8.2 2 6.6C1.5 6.3.9 6.5.6 7l-.5.8c-.2.5-.1 1.1.4 1.4L5 11.8c.1.1.3.1.4.1.4.1.8-.1 1-.5L11.8 2c.3-.5.1-1.1-.4-1.4z" fill="#999"/></svg>
\ No newline at end of file
......@@ -91,6 +91,17 @@ select {
}
}
}
// Style for the forum subscription mode node.
.subscriptionmode {
color: $body-color;
}
// Style for the currently selected subscription mode.
.activesetting {
color: $body-color;
font-weight: bold;
}
}
.forumpost {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment