mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-56826 question: Add bootstrap styles to question preview
This commit is contained in:
parent
820a43510f
commit
009c57d730
@ -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');
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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"]});
|
||||
|
@ -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() {
|
||||
|
2
question/yui/src/preview/js/preview.js
vendored
2
question/yui/src/preview/js/preview.js
vendored
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user