Commit cb64bea3 authored by Kristina Hoeppner's avatar Kristina Hoeppner

Forums: Change to switchboxes (Bug 1431569)

Change checkboxes to switchboxes

Change-Id: I41072836f23ee6a9d42e71d5d87d2d13876294b8
parent 389df353
......@@ -142,7 +142,7 @@ $editform = array(
),
),
'sendnow' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('sendnow', 'interaction.forum'),
'description' => get_string('sendnowdescription', 'interaction.forum', get_config_plugin('interaction', 'forum', 'postdelay')),
'defaultvalue' => false,
......
......@@ -126,19 +126,19 @@ $editform = array(
),
),
'sticky' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('Sticky', 'interaction.forum'),
'description' => get_string('stickydescription', 'interaction.forum'),
'defaultvalue' => isset($topic) && $topic->sticky == 1 ? 'checked' : null
),
'closed' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('Closed', 'interaction.forum'),
'description' => get_string('closeddescription', 'interaction.forum'),
'defaultvalue' => isset($topic) ? $topic->closed : !empty($forumconfig['closetopics']->value),
),
'sendnow' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('sendnow', 'interaction.forum'),
'description' => get_string('sendnowdescription', 'interaction.forum', get_config_plugin('interaction', 'forum', 'postdelay')),
'defaultvalue' => false,
......
......@@ -147,7 +147,7 @@ $string['reportpostsuccess'] = 'Post reported successfully';
$string['sendnow'] = 'Send message now';
$string['sendnowdescription'] = 'Send message immediately instead of waiting at least %s minutes for it to be sent.';
$string['Sticky'] = 'Sticky';
$string['stickydescription'] = 'Sticky topics are at the top of every page';
$string['stickydescription'] = 'Sticky topics appear at the top of every page';
$string['stickytopics'] = 'Sticky topics';
$string['Subscribe'] = 'Subscribe';
$string['Subscribed'] = 'Subscribed';
......@@ -197,7 +197,7 @@ $string['maxindent'] = 'Maximum indent level';
$string['maxindentdescription'] = 'Set the maximum indentation level for a topic. This only applies if the indent mode has been set to "Expand to maximum".';
$string['closetopics'] = 'Close new topics';
$string['closetopicsdescription'] = 'If checked, all new topics in this forum will be closed by default. Only moderators and group administrators can reply to closed topics.';
$string['closetopicsdescription1'] = 'Close all new topics by default. Only moderators and group administrators can reply to closed topics.';
$string['activetopicsdescription'] = 'Recently updated topics in your groups.';
......
......@@ -90,7 +90,7 @@ class PluginInteractionForum extends PluginInteraction {
'legend' => get_string('settings'),
'elements' => array(
'autosubscribe' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('autosubscribeusers', 'interaction.forum'),
'description' => get_string('autosubscribeusersdescription', 'interaction.forum'),
'defaultvalue' => isset($autosubscribe) ? $autosubscribe : false,
......@@ -129,9 +129,9 @@ class PluginInteractionForum extends PluginInteraction {
),
),
'closetopics' => array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('closetopics', 'interaction.forum'),
'description' => get_string('closetopicsdescription', 'interaction.forum'),
'description' => get_string('closetopicsdescription1', 'interaction.forum'),
'defaultvalue' => !empty($closetopics),
),
)
......
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