MDL-56826 question: Add bootstrap styles to question preview

This commit is contained in:
Damyon Wiese 2016-11-17 15:51:48 +08:00
parent 820a43510f
commit 009c57d730
5 changed files with 8 additions and 8 deletions

View File

@ -255,13 +255,13 @@ echo $quba->render_question($slot, $options, $displaynumber);
// Finish the question form.
echo html_writer::start_tag('div', array('id' => 'previewcontrols', 'class' => 'controls'));
echo html_writer::empty_tag('input', $restartdisabled + array('type' => 'submit',
'name' => 'restart', 'value' => get_string('restart', 'question')));
'name' => 'restart', 'value' => get_string('restart', 'question'), 'class' => 'btn btn-secondary'));
echo html_writer::empty_tag('input', $finishdisabled + array('type' => 'submit',
'name' => 'save', 'value' => get_string('save', 'question')));
'name' => 'save', 'value' => get_string('save', 'question'), 'class' => 'btn btn-secondary'));
echo html_writer::empty_tag('input', $filldisabled + array('type' => 'submit',
'name' => 'fill', 'value' => get_string('fillincorrect', 'question')));
'name' => 'fill', 'value' => get_string('fillincorrect', 'question'), 'class' => 'btn btn-secondary'));
echo html_writer::empty_tag('input', $finishdisabled + array('type' => 'submit',
'name' => 'finish', 'value' => get_string('submitandfinish', 'question')));
'name' => 'finish', 'value' => get_string('submitandfinish', 'question'), 'class' => 'btn btn-secondary'));
echo html_writer::end_tag('div');
echo html_writer::end_tag('form');

View File

@ -36,7 +36,7 @@ M.question.preview.init = function() {
M.core_question_engine.init_form(Y, '#responseform');
// Add a close button to the window.
var closebutton = Y.Node.create('<input type="button" />')
var closebutton = Y.Node.create('<input type="button" class="btn btn-secondary"/>')
.set('value', M.util.get_string('closepreview', 'question'));
closebutton.on('click', function() {

View File

@ -1 +1 @@
YUI.add("moodle-question-preview",function(e,t){M.question=M.question||{},M.question.preview=M.question.preview||{},M.question.preview.init=function(){M.core_question_engine.init_form(e,"#responseform");var t=e.Node.create('<input type="button" />').set("value",M.util.get_string("closepreview","question"));t.on("click",function(){window.close()}),e.one("#previewcontrols").append(t),e.on("submit",M.core_question_engine.prevent_repeat_submission,"#mform1",null,e)}},"@VERSION@",{requires:["base","dom","event-delegate","event-key","core_question_engine"]});
YUI.add("moodle-question-preview",function(e,t){M.question=M.question||{},M.question.preview=M.question.preview||{},M.question.preview.init=function(){M.core_question_engine.init_form(e,"#responseform");var t=e.Node.create('<input type="button" class="btn btn-secondary"/>').set("value",M.util.get_string("closepreview","question"));t.on("click",function(){window.close()}),e.one("#previewcontrols").append(t),e.on("submit",M.core_question_engine.prevent_repeat_submission,"#mform1",null,e)}},"@VERSION@",{requires:["base","dom","event-delegate","event-key","core_question_engine"]});

View File

@ -36,7 +36,7 @@ M.question.preview.init = function() {
M.core_question_engine.init_form(Y, '#responseform');
// Add a close button to the window.
var closebutton = Y.Node.create('<input type="button" />')
var closebutton = Y.Node.create('<input type="button" class="btn btn-secondary"/>')
.set('value', M.util.get_string('closepreview', 'question'));
closebutton.on('click', function() {

View File

@ -34,7 +34,7 @@ M.question.preview.init = function() {
M.core_question_engine.init_form(Y, '#responseform');
// Add a close button to the window.
var closebutton = Y.Node.create('<input type="button" />')
var closebutton = Y.Node.create('<input type="button" class="btn btn-secondary"/>')
.set('value', M.util.get_string('closepreview', 'question'));
closebutton.on('click', function() {