Merge branch 'MDL-63001_master' of git://github.com/markn86/moodle
authorDavid Monllao <davidm@moodle.com>
Tue, 31 Jul 2018 11:52:49 +0000 (13:52 +0200)
committerDavid Monllao <davidm@moodle.com>
Tue, 31 Jul 2018 11:52:49 +0000 (13:52 +0200)
lib/form/submitlink.php [deleted file]
lib/formslib.php
lib/upgrade.txt

diff --git a/lib/form/submitlink.php b/lib/form/submitlink.php
deleted file mode 100644 (file)
index 0cb270c..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-// 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 <http://www.gnu.org/licenses/>.
-
-
-/**
- * submit link type form element
- *
- * Contains HTML class for a submitting to link
- *
- * @deprecated since 3.2
- * @package   core_form
- * @copyright 2006 Jamie Pratt <me@jamiep.org>
- * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-global $CFG;
-require_once("$CFG->libdir/form/submit.php");
-/**
- * submit link type form element
- *
- * HTML class for a submitting to link
- *
- * @package   core_form
- * @category  form
- * @copyright 2006 Jamie Pratt <me@jamiep.org>
- * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class MoodleQuickForm_submitlink extends MoodleQuickForm_submit {
-    /** @var string javascript for submitting element's data */
-    var $_js;
-
-    /** @var string callback function which will be called onclick event */
-    var $_onclick;
-
-    /**
-     * constructor
-     *
-     * @param string $elementName (optional) name of the field
-     * @param string $value (optional) field label
-     * @param string $attributes (optional) Either a typical HTML attribute string or an associative array
-     */
-    public function __construct($elementName=null, $value=null, $attributes=null) {
-        debugging('Element type submitlink is deprecated.', DEBUG_DEVELOPER);
-        parent::__construct($elementName, $value, $attributes);
-    }
-
-    /**
-     * Old syntax of class constructor. Deprecated in PHP7.
-     *
-     * @deprecated since Moodle 3.1
-     */
-    public function MoodleQuickForm_submitlink($elementName=null, $value=null, $attributes=null) {
-        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
-        self::__construct($elementName, $value, $attributes);
-    }
-
-    /**
-     * Returns HTML for submitlink form element.
-     *
-     * @return string
-     */
-    function toHtml() {
-        $text = $this->_attributes['value'];
-
-        return "<noscript><div>" . parent::toHtml() . '</div></noscript><script type="text/javascript">' . $this->_js . "\n"
-             . 'document.write(\'<a href="#" onclick="' . $this->_onclick . '">'
-             . $text . "</a>');\n</script>";
-    }
-}
index ef522da..dadcade 100644 (file)
@@ -3250,7 +3250,6 @@ MoodleQuickForm::registerElementType('selectwithlink', "$CFG->libdir/form/select
 MoodleQuickForm::registerElementType('selectyesno', "$CFG->libdir/form/selectyesno.php", 'MoodleQuickForm_selectyesno');
 MoodleQuickForm::registerElementType('static', "$CFG->libdir/form/static.php", 'MoodleQuickForm_static');
 MoodleQuickForm::registerElementType('submit', "$CFG->libdir/form/submit.php", 'MoodleQuickForm_submit');
-MoodleQuickForm::registerElementType('submitlink', "$CFG->libdir/form/submitlink.php", 'MoodleQuickForm_submitlink');
 MoodleQuickForm::registerElementType('tags', "$CFG->libdir/form/tags.php", 'MoodleQuickForm_tags');
 MoodleQuickForm::registerElementType('text', "$CFG->libdir/form/text.php", 'MoodleQuickForm_text');
 MoodleQuickForm::registerElementType('textarea', "$CFG->libdir/form/textarea.php", 'MoodleQuickForm_textarea');
index cc918f4..69c49d3 100644 (file)
@@ -4,7 +4,7 @@ information provided here is intended especially for developers.
 === 3.6 ===
 
 * Custom AJAX handlers for the form autocomplete fields can now optionally return string in their processResults()
-  callback. If a string is returned, it is displayed instead of the list if suggested items. This can be used, for
+  callback. If a string is returned, it is displayed instead of the list of suggested items. This can be used, for
   example, to inform the user that there are too many items matching the current search criteria.
 * The following functions have been finally deprecated and can not be used any more:
     - external_function_info()
@@ -42,9 +42,9 @@ information provided here is intended especially for developers.
   - events_cleanup()
   - events_dequeue()
   - events_get_handlers()
-
 * coursecat::get() now has optional $user parameter.
 * coursecat::is_uservisible() now has optional $user parameter.
+* Removed the lib/form/submitlink.php element which was deprecated in 3.2.
 
 === 3.5 ===