mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-79705 profilefield_checkbox: display data as simple Yes/No.
This commit is contained in:
parent
d188d58ce9
commit
62aa37f70d
@ -14,17 +14,10 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'profilefield_checkbox', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package profilefield_checkbox
|
||||
* @copyright 2008 onwards Shane Elliot {@link http://pukunui.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class profile_field_checkbox
|
||||
*
|
||||
* @package profilefield_checkbox
|
||||
* @copyright 2008 onwards Shane Elliot {@link http://pukunui.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
@ -52,10 +45,7 @@ class profile_field_checkbox extends profile_field_base {
|
||||
* @return string HTML.
|
||||
*/
|
||||
public function display_data() {
|
||||
$options = new stdClass();
|
||||
$options->para = false;
|
||||
$checked = intval($this->data) === 1 ? 'checked="checked"' : '';
|
||||
return '<input disabled="disabled" type="checkbox" name="'.$this->inputname.'" '.$checked.' />';
|
||||
return $this->data ? get_string('yes') : get_string('no');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user