{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template assignfeedback_editpdfplus/axis_del_form Admin template for remove one axis. Context variables required for this template: * courseid - Course id * title - Title of the page (add or edit) * render - form render for removing the axis * id - form id }}
{{title}}

{{# str }} adminaxisdelete_question, assignfeedback_editpdfplus {{/ str }}

{{{render}}}
{{# js }} require(['jquery','core/ajax','core/notification'], function($,ajax,notification) { var formid='{{id}}'; $("#axisDelSubmit").on("click", function () { var form = $('#'+formid); var data = form.serialize()+"&courseid="+{{courseid}}; ajax.call([ { methodname: 'assignfeedback_editpdfplus_submit_axis_del_form', args: {jsonformdata: JSON.stringify(data)} } ])[0].done(function(message) { if (message[0].message === "1"){ $('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body').html(""); $("#editpdlplus_axes option:selected").remove(); $("#editpdlplus_axes").change(); $("#axistool").show(); }else{ $('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body > .panel > .panel-body').append("
"+message[0].message+"
"); } var selectAxis = $("#editpdlplus_axes").val(); if (selectAxis && selectAxis !== "") { $("#axistool").show(); $('#assignfeedback_editpdfplus_widget_admin_toolheader').show(); $('#assignfeedback_editpdfplus_widget_admin_toolworkspace').show(); } else { $("#assignfeedback_editpdfplus_widget_admin_workspace").hide(); $('#assignfeedback_editpdfplus_widget_admin_toolheader').hide(); $('#assignfeedback_editpdfplus_widget_admin_toolworkspace').hide(); } $("#editpdlplus_axes").prop('disabled',false); }).fail(notification.exception); }); $("#axisDelCancel").on("click", function () { $('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body').html(""); $("#axistool").show(); $('#assignfeedback_editpdfplus_widget_admin_toolheader').show(); $('#assignfeedback_editpdfplus_widget_admin_toolworkspace').show(); $("#editpdlplus_axes").prop('disabled',false); }); }); {{/ js }}