Commit f163fa6c authored by Pat Kira's avatar Pat Kira Committed by Aaron Wells
Browse files

Comments on page view (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: I2fbc8593a97edf9721edb40fe2ecc0561c98c15b
parent 91927381
...@@ -33,7 +33,7 @@ $deleteform = array( ...@@ -33,7 +33,7 @@ $deleteform = array(
'elements' => array( 'elements' => array(
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-danger', 'class' => 'btn btn-default',
'value' => array(get_string('deleteplan','artefact.plans'), get_string('cancel')), 'value' => array(get_string('deleteplan','artefact.plans'), get_string('cancel')),
'goto' => get_config('wwwroot') . '/artefact/plans/index.php', 'goto' => get_config('wwwroot') . '/artefact/plans/index.php',
), ),
......
...@@ -33,7 +33,7 @@ $deleteform = array( ...@@ -33,7 +33,7 @@ $deleteform = array(
'elements' => array( 'elements' => array(
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-danger', 'class' => 'btn btn-default',
'value' => array(get_string('deletetask','artefact.plans'), get_string('cancel')), 'value' => array(get_string('deletetask','artefact.plans'), get_string('cancel')),
'goto' => get_config('wwwroot') . '/artefact/plans/plan.php?id='.$todelete->get('parent'), 'goto' => get_config('wwwroot') . '/artefact/plans/plan.php?id='.$todelete->get('parent'),
), ),
......
...@@ -64,6 +64,7 @@ $form = pieform(array( ...@@ -64,6 +64,7 @@ $form = pieform(array(
'elements' => array( 'elements' => array(
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-default',
'value' => array(get_string('yes'), get_string('no')), 'value' => array(get_string('yes'), get_string('no')),
'goto' => $baseurl, 'goto' => $baseurl,
), ),
......
...@@ -37,6 +37,7 @@ $form = pieform(array( ...@@ -37,6 +37,7 @@ $form = pieform(array(
'elements' => array( 'elements' => array(
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-default',
'value' => array(get_string('yes'), get_string('no')), 'value' => array(get_string('yes'), get_string('no')),
'goto' => group_homepage_url($group), 'goto' => group_homepage_url($group),
) )
......
...@@ -74,7 +74,7 @@ $searchform = pieform(array( ...@@ -74,7 +74,7 @@ $searchform = pieform(array(
'name' => 'search', 'name' => 'search',
'checkdirtychange' => false, 'checkdirtychange' => false,
'method' => 'post', 'method' => 'post',
'class' => 'form-inline', 'class' => 'form-inline ptl pbl',
'elements' => $elements 'elements' => $elements
) )
); );
......
...@@ -96,7 +96,7 @@ if ('admin' == $role) { ...@@ -96,7 +96,7 @@ if ('admin' == $role) {
$searchform = pieform(array( $searchform = pieform(array(
'name' => 'search', 'name' => 'search',
'checkdirtychange' => false, 'checkdirtychange' => false,
'class' => 'search-views-form form-inline', 'class' => 'search-views-form form-inline ptl pbl',
'elements' => array( 'elements' => array(
'id' => array( 'id' => array(
'type' => 'hidden', 'type' => 'hidden',
......
...@@ -64,7 +64,7 @@ $form = pieform(array( ...@@ -64,7 +64,7 @@ $form = pieform(array(
'checkdirtychange' => false, 'checkdirtychange' => false,
'method' => 'post', 'method' => 'post',
'renderer' => 'div', 'renderer' => 'div',
'class' => 'form-inline', 'class' => 'form-inline ptl pbl',
'elements' => array( 'elements' => array(
'inputgroup' => array( 'inputgroup' => array(
'type' => 'fieldset', 'type' => 'fieldset',
......
...@@ -44,6 +44,7 @@ $form = pieform(array( ...@@ -44,6 +44,7 @@ $form = pieform(array(
), ),
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-success',
'value' => array(get_string('yes'), get_string('no')), 'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . 'interaction/' .$instance->get('plugin') . 'goto' => get_config('wwwroot') . 'interaction/' .$instance->get('plugin') .
($returnto == 'index' ? '/index.php?group=' . $instance->get('group') : '/view.php?id=' . $instance->get('id')), ($returnto == 'index' ? '/index.php?group=' . $instance->get('group') : '/view.php?id=' . $instance->get('id')),
......
...@@ -73,6 +73,7 @@ $form = pieform(array( ...@@ -73,6 +73,7 @@ $form = pieform(array(
), ),
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-success',
'value' => array(get_string('yes'), get_string('no')), 'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . 'interaction/forum/topic.php?id=' . $post->topic . '&post=' . $postid 'goto' => get_config('wwwroot') . 'interaction/forum/topic.php?id=' . $post->topic . '&post=' . $postid
), ),
......
...@@ -69,10 +69,12 @@ $form = pieform(array( ...@@ -69,10 +69,12 @@ $form = pieform(array(
'autofocus' => false, 'autofocus' => false,
'elements' => array( 'elements' => array(
'title' => array( 'title' => array(
'type' => 'html',
'value' => get_string('deletetopicsure', 'interaction.forum'), 'value' => get_string('deletetopicsure', 'interaction.forum'),
), ),
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-default',
'value' => array(get_string('yes'), get_string('no')), 'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . ($returnto == 'view' ? 'interaction/forum/view.php?id=' . $topic->forumid : 'interaction/forum/topic.php?id=' . $topicid), 'goto' => get_config('wwwroot') . ($returnto == 'view' ? 'interaction/forum/view.php?id=' . $topic->forumid : 'interaction/forum/topic.php?id=' . $topicid),
), ),
......
...@@ -67,11 +67,12 @@ if ($forums) { ...@@ -67,11 +67,12 @@ if ($forums) {
'renderer' => 'oneline', 'renderer' => 'oneline',
'elements' => array( 'elements' => array(
'submit' => array( 'submit' => array(
'type' => 'submit', 'type' => 'button',
'class' => $forum->subscribed ? 'btn btn-default btn-xs' : 'btn btn-primary btn-xs', 'usebuttontag' => true,
'value' => $forum->subscribed ? get_string('Unsubscribe', 'interaction.forum') : get_string('Subscribe', 'interaction.forum'), 'class' => 'btn btn-default btn-xs',
'value' => $forum->subscribed ? '<span class="fa fa-lg fa-times prs text-danger"></span> ' . get_string('Unsubscribe', 'interaction.forum') : '<span class="fa fa-lg fa-star prs text-primary"></span> ' . get_string('Subscribe', 'interaction.forum'),
// 'help' => $i == 0 ? true : false // 'help' => $i == 0 ? true : false
'help' => false 'help' => false
), ),
'forum' => array( 'forum' => array(
'type' => 'hidden', 'type' => 'hidden',
......
...@@ -85,6 +85,7 @@ class PluginInteractionForum extends PluginInteraction { ...@@ -85,6 +85,7 @@ class PluginInteractionForum extends PluginInteraction {
), ),
'fieldset' => array( 'fieldset' => array(
'type' => 'fieldset', 'type' => 'fieldset',
'class' => 'last mtl',
'collapsible' => true, 'collapsible' => true,
'collapsed' => true, 'collapsed' => true,
'legend' => get_string('forumsettings', 'interaction.forum'), 'legend' => get_string('forumsettings', 'interaction.forum'),
......
...@@ -75,10 +75,10 @@ if ($membership && !$topic->forumsubscribed) { ...@@ -75,10 +75,10 @@ if ($membership && !$topic->forumsubscribed) {
'autofocus' => false, 'autofocus' => false,
'elements' => array( 'elements' => array(
'submit' => array( 'submit' => array(
'type' => 'button', 'type' => 'button',
'usebuttontag' => true, 'usebuttontag' => true,
'class' => 'btn btn-default', 'class' => $topic->topicsubscribed ? 'btn btn-default' : 'btn btn-default',
'value' => $topic->topicsubscribed ? '<span class="fa fa-lg fa-star-o prs text-danger"></span> ' . get_string('unsubscribefromtopic', 'interaction.forum') : '<span class="fa fa-lg fa-star prs text-primary"></span> ' . get_string('subscribetotopic', 'interaction.forum'), 'value' => $topic->topicsubscribed ? '<span class="fa fa-times fa-lg text-danger prs"></span>'. get_string('unsubscribefromtopic', 'interaction.forum') : '<span class="fa fa-star fa-lg text-primary prs"></span>' . get_string('subscribetotopic', 'interaction.forum'),
'help' => false 'help' => false
), ),
'topic' => array( 'topic' => array(
......
...@@ -182,7 +182,7 @@ if ($membership) { ...@@ -182,7 +182,7 @@ if ($membership) {
'type' => 'button', 'type' => 'button',
'usebuttontag' => true, 'usebuttontag' => true,
'class' => 'btn btn-default', 'class' => 'btn btn-default',
'value' => $forum->subscribed ? '<span class="fa fa-lg fa-star-o prs text-danger"></span> ' . get_string('unsubscribefromforum', 'interaction.forum') : '<span class="fa fa-lg fa-star prs text-primary"></span> ' . get_string('subscribetoforum', 'interaction.forum'), 'value' => $forum->subscribed ? '<span class="fa fa-lg fa-times prs text-danger"></span> ' . get_string('unsubscribefromforum', 'interaction.forum') : '<span class="fa fa-lg fa-star prs text-primary"></span> ' . get_string('subscribetoforum', 'interaction.forum'),
'help' => false 'help' => false
), ),
'forum' => array( 'forum' => array(
......
...@@ -23,7 +23,7 @@ function addFeedbackError(form, data) { ...@@ -23,7 +23,7 @@ function addFeedbackError(form, data) {
} }
function addFeedbackSuccess(form, data) { function addFeedbackSuccess(form, data) {
addElementClass('add_feedback_form', 'hidden'); // addElementClass('add_feedback_form', 'hidden');
if ($('overlay')) { if ($('overlay')) {
removeElement('overlay'); removeElement('overlay');
} }
...@@ -55,7 +55,7 @@ function addFeedbackSuccess(form, data) { ...@@ -55,7 +55,7 @@ function addFeedbackSuccess(form, data) {
} }
function objectionSuccess(form, data) { function objectionSuccess(form, data) {
addElementClass('objection_form', 'hidden'); // addElementClass('objection_form', 'hidden');
$('objection_form_message').value = ''; $('objection_form_message').value = '';
rewriteCancelButtons(); rewriteCancelButtons();
formSuccess(form, data); formSuccess(form, data);
......
...@@ -57,8 +57,8 @@ $string['reallyaddaccesstoemptyview'] = 'Your page contains no blocks. Do you re ...@@ -57,8 +57,8 @@ $string['reallyaddaccesstoemptyview'] = 'Your page contains no blocks. Do you re
$string['viewdeleted'] = 'Page deleted'; $string['viewdeleted'] = 'Page deleted';
$string['viewsubmitted'] = 'Page submitted'; $string['viewsubmitted'] = 'Page submitted';
$string['deletethisview'] = 'Delete this page'; $string['deletethisview'] = 'Delete this page';
$string['submitthisviewto'] = 'Submit this page to'; $string['submitthisviewto'] = 'Submit this page';
$string['submitthiscollectionto'] = 'Submit this collection to'; $string['submitthiscollectionto'] = 'Submit this collection';
$string['forassessment'] = 'for assessment'; $string['forassessment'] = 'for assessment';
$string['accessfromdate2'] = 'Nobody else can see this page before %s.'; $string['accessfromdate2'] = 'Nobody else can see this page before %s.';
$string['accessuntildate2'] = 'Nobody else can see this page after %s.'; $string['accessuntildate2'] = 'Nobody else can see this page after %s.';
......
...@@ -1375,31 +1375,38 @@ function group_view_submission_form($groupid) { ...@@ -1375,31 +1375,38 @@ function group_view_submission_form($groupid) {
return pieform(array( return pieform(array(
'name' => 'group_view_submission_form_' . $groupid, 'name' => 'group_view_submission_form_' . $groupid,
'method' => 'post', 'method' => 'post',
'renderer' => 'oneline', 'renderer' => 'div',
'class' => 'form-inline', 'class' => 'form-inline pts pbs',
'autofocus' => false, 'autofocus' => false,
'successcallback' => 'group_view_submission_form_submit', 'successcallback' => 'group_view_submission_form_submit',
'elements' => array( 'elements' => array(
'text1' => array( 'text1' => array(
'class' => 'mrm', 'class' => 'inline text-small',
'type' => 'html', 'value' => get_string('submit', 'group') . ' ', 'type' => 'html', 'value' => get_string('submit', 'group') . ' ',
), ),
'options' => array(
'type' => 'select',
'class' => 'mrs',
'collapseifoneoption' => false,
'optgroups' => $optgroups,
'options' => $options,
),
'text2' => array( 'text2' => array(
'type' => 'html', 'type' => 'html',
'class' => 'forassessment mrs', 'class' => 'forassessment text-small',
'value' => get_string('forassessment', 'view'), 'value' => get_string('forassessment', 'view'),
), ),
'submit' => array( 'inputgroup' => array(
'type' => 'submit', 'type' => 'fieldset',
'class' => 'btn btn-primary btn-sm', 'class' => 'input-group',
'value' => get_string('submit') 'elements' => array(
'options' => array(
'type' => 'select',
'class' => 'form-control',
'collapseifoneoption' => false,
'optgroups' => $optgroups,
'options' => $options,
),
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn btn-primary input-group-btn ',
'value' => get_string('submit')
),
),
), ),
'group' => array( 'group' => array(
'type' => 'hidden', 'type' => 'hidden',
......
...@@ -281,7 +281,7 @@ function render_license($artefact) { ...@@ -281,7 +281,7 @@ function render_license($artefact) {
if (!empty($details)) { if (!empty($details)) {
$html = '<a href="' . hsc($license) . '" class="license">'; $html = '<a href="' . hsc($license) . '" class="license">';
if ($details->icon) { if ($details->icon) {
$html .= '<img src="' . license_icon_url($details->icon) . '" class="license-icon"' . $html .= '<img src="' . license_icon_url($details->icon) . '" class="license-icon prm"' .
'alt="' . get_string('licenseiconalt') . '">'; 'alt="' . get_string('licenseiconalt') . '">';
} }
$html .= hsc($details->displayname) . '</a>'; $html .= hsc($details->displayname) . '</a>';
......
...@@ -36,6 +36,7 @@ function objection_form() { ...@@ -36,6 +36,7 @@ function objection_form() {
$form['elements']['submit'] = array( $form['elements']['submit'] = array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-success',
'value' => array(get_string('notifyadministrator'), get_string('cancel')), 'value' => array(get_string('notifyadministrator'), get_string('cancel')),
'confirm' => array(get_string('notifyadministratorconfirm')), 'confirm' => array(get_string('notifyadministratorconfirm')),
); );
...@@ -132,6 +133,7 @@ function notrude_form() { ...@@ -132,6 +133,7 @@ function notrude_form() {
return array( return array(
'name' => 'notrude_form', 'name' => 'notrude_form',
'class' => 'form-inline',
'method' => 'post', 'method' => 'post',
'elements' => array( 'elements' => array(
'objection' => array( 'objection' => array(
...@@ -140,10 +142,12 @@ function notrude_form() { ...@@ -140,10 +142,12 @@ function notrude_form() {
), ),
'text' => array( 'text' => array(
'type' => 'html', 'type' => 'html',
'class' => 'pbm',
'value' => get_string('viewobjectionableunmark', 'view'), 'value' => get_string('viewobjectionableunmark', 'view'),
), ),
'submit' => array( 'submit' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-default',
'value' => get_string('notobjectionable'), 'value' => get_string('notobjectionable'),
), ),
), ),
......
...@@ -3706,7 +3706,7 @@ class View { ...@@ -3706,7 +3706,7 @@ class View {
$searchform = array( $searchform = array(
'name' => 'searchviews', 'name' => 'searchviews',
'checkdirtychange' => false, 'checkdirtychange' => false,
'class' => 'search-views-form form-inline', 'class' => 'search-views-form form-inline ptl pbl',
'elements' => array( 'elements' => array(
'query' => array( 'query' => array(
'type' => 'text', 'type' => 'text',
...@@ -6288,26 +6288,38 @@ function view_group_submission_form($view, $tutorgroupdata, $returnto=null) { ...@@ -6288,26 +6288,38 @@ function view_group_submission_form($view, $tutorgroupdata, $returnto=null) {
$form = array( $form = array(
'name' => 'view_group_submission_form_' . $viewid, 'name' => 'view_group_submission_form_' . $viewid,
'method' => 'post', 'method' => 'post',
'renderer' => 'oneline', 'renderer' => 'div',
'class' => 'form-inline ptl pbl',
'autofocus' => false, 'autofocus' => false,
'successcallback' => 'view_group_submission_form_submit', 'successcallback' => 'view_group_submission_form_submit',
'elements' => array( 'elements' => array(
'text1' => array( 'text1' => array(
'type' => 'html', 'type' => 'html',
'class' => 'inline',
'value' => '', 'value' => '',
), ),
'options' => array(
'type' => 'select',
'collapseifoneoption' => false,
'options' => $options,
),
'text2' => array( 'text2' => array(
'type' => 'html', 'type' => 'html',
'class' => 'prm',
'value' => get_string('forassessment', 'view'), 'value' => get_string('forassessment', 'view'),
), ),
'submit' => array( 'inputgroup' => array(
'type' => 'submit', 'type' => 'fieldset',
'value' => get_string('submit') 'class' => 'input-group',
'elements' => array(
'options' => array(
'type' => 'select',
'class' => 'form-control',
'collapseifoneoption' => false,
'options' => $options,
),
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn btn-primary input-group-btn',
'value' => get_string('submit')
)
),
), ),
'returnto' => array( 'returnto' => array(
'type' => 'hidden', 'type' => 'hidden',
......
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