mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-51084 tool_customlang: return to the same page after submit
This commit is contained in:
parent
6d392b3027
commit
bdead9b5c7
2 changed files with 2 additions and 1 deletions
|
@ -63,7 +63,7 @@ if ($translatorsubmitted) {
|
|||
$checkin = optional_param('savecheckin', false, PARAM_RAW);
|
||||
|
||||
if ($checkin === false) {
|
||||
$nexturl = $PAGE->url;
|
||||
$nexturl = new moodle_url($PAGE->url, array('p' => $currentpage));
|
||||
} else {
|
||||
$nexturl = new moodle_url('/admin/tool/customlang/index.php', array('action'=>'checkin', 'lng' => $lng, 'sesskey'=>sesskey()));
|
||||
}
|
||||
|
|
|
@ -133,6 +133,7 @@ class tool_customlang_renderer extends plugin_renderer_base {
|
|||
$output .= html_writer::start_tag('div');
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'translatorsubmitted', 'value'=>1));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'sesskey', 'value'=>sesskey()));
|
||||
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'p', 'value'=>$translator->currentpage));
|
||||
$save1 = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savecontinue', 'value'=>get_string('savecontinue', 'tool_customlang')));
|
||||
$save2 = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savecheckin', 'value'=>get_string('savecheckin', 'tool_customlang')));
|
||||
$output .= html_writer::tag('fieldset', $save1.$save2, array('class'=>'buttonsbar'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue