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