mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-71889 user: help text for profile field max length/user identity.
This commit is contained in:
parent
a01f1fa71c
commit
f69077aa8c
@ -1010,7 +1010,8 @@ $string['profilefieldispassword'] = 'Is this a password field?';
|
||||
$string['profilefieldlink'] = 'Link';
|
||||
$string['profilefieldlink_help'] = 'To transform the text into a link, enter a URL containing $$, where $$ will be replaced with the text. For example, to transform a Twitter ID to a link, enter https://twitter.com/$$.';
|
||||
$string['profilefieldlinktarget'] = 'Link target';
|
||||
$string['profilefieldmaxlength'] = 'Maximum length';
|
||||
$string['profilefieldmaxlength'] = 'Character limit';
|
||||
$string['profilefieldmaxlength_help'] = 'To use this field in the setting \'Show user identity\', the limit must be 255 characters or less.';
|
||||
$string['profilefieldrows'] = 'Rows';
|
||||
$string['profilefields'] = 'User profile fields';
|
||||
$string['profilefieldsize'] = 'Display size';
|
||||
|
@ -32,7 +32,8 @@ class profile_define_text extends profile_define_base {
|
||||
|
||||
/**
|
||||
* Add elements for creating/editing a text profile field.
|
||||
* @param moodleform $form
|
||||
*
|
||||
* @param MoodleQuickForm $form
|
||||
*/
|
||||
public function define_form_specific($form) {
|
||||
// Default data.
|
||||
@ -48,6 +49,7 @@ class profile_define_text extends profile_define_base {
|
||||
$form->addElement('text', 'param2', get_string('profilefieldmaxlength', 'admin'), 'size="6"');
|
||||
$form->setDefault('param2', 2048);
|
||||
$form->setType('param2', PARAM_INT);
|
||||
$form->addHelpButton('param2', 'profilefieldmaxlength', 'admin');
|
||||
|
||||
// Param 3 for text type detemines if this is a password field or not.
|
||||
$form->addElement('selectyesno', 'param3', get_string('profilefieldispassword', 'admin'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user