mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
registration MDL-21715 temporary disable the region code (not done) and the image url fields (security purpose). Add help icons.
This commit is contained in:
parent
3ff6bd3463
commit
4032415e04
@ -175,6 +175,7 @@ class site_registration_form extends moodleform {
|
|||||||
$options[SITELINKPUBLISHED] = $hub->get_site_privacy_string(SITELINKPUBLISHED);
|
$options[SITELINKPUBLISHED] = $hub->get_site_privacy_string(SITELINKPUBLISHED);
|
||||||
$mform->addElement('select', 'privacy', get_string('siteprivacy', 'hub'), $options);
|
$mform->addElement('select', 'privacy', get_string('siteprivacy', 'hub'), $options);
|
||||||
$mform->setDefault('privacy', $privacy);
|
$mform->setDefault('privacy', $privacy);
|
||||||
|
$mform->addHelpButton('privacy', 'privacy', 'hub');
|
||||||
unset($options);
|
unset($options);
|
||||||
|
|
||||||
$mform->addElement('textarea', 'description', get_string('description'), array('rows'=>10));
|
$mform->addElement('textarea', 'description', get_string('description'), array('rows'=>10));
|
||||||
@ -199,15 +200,17 @@ class site_registration_form extends moodleform {
|
|||||||
$mform->setDefault('address', $address);
|
$mform->setDefault('address', $address);
|
||||||
|
|
||||||
//TODO: use the region array I generated
|
//TODO: use the region array I generated
|
||||||
$mform->addElement('select', 'region', get_string('selectaregion'), array('-' => '-'));
|
// $mform->addElement('select', 'region', get_string('selectaregion'), array('-' => '-'));
|
||||||
$mform->setDefault('region', $region);
|
// $mform->setDefault('region', $region);
|
||||||
|
$mform->addElement('hidden', 'regioncode', '-');
|
||||||
|
|
||||||
$countries = get_string_manager()->get_list_of_countries();
|
$countries = get_string_manager()->get_list_of_countries();
|
||||||
$mform->addElement('select', 'country', get_string('selectacountry'), $countries);
|
$mform->addElement('select', 'countrycode', get_string('selectacountry'), $countries);
|
||||||
$mform->setDefault('country', $country);
|
$mform->setDefault('countrycode', $country);
|
||||||
|
|
||||||
$mform->addElement('text','geolocation' , get_string('geolocation'));
|
$mform->addElement('text','geolocation' , get_string('geolocation'));
|
||||||
$mform->setDefault('geolocation', $geolocation);
|
$mform->setDefault('geolocation', $geolocation);
|
||||||
|
$mform->addHelpButton('geolocation', 'geolocation', 'hub');
|
||||||
|
|
||||||
$mform->addElement('text', 'contactname', get_string('administrator'));
|
$mform->addElement('text', 'contactname', get_string('administrator'));
|
||||||
$mform->addRule('contactname', $strrequired, 'required', null, 'client');
|
$mform->addRule('contactname', $strrequired, 'required', null, 'client');
|
||||||
@ -216,6 +219,7 @@ class site_registration_form extends moodleform {
|
|||||||
|
|
||||||
$mform->addElement('text','contactphone' , get_string('phone'));
|
$mform->addElement('text','contactphone' , get_string('phone'));
|
||||||
$mform->setType('contactphone', PARAM_TEXT);
|
$mform->setType('contactphone', PARAM_TEXT);
|
||||||
|
$mform->addHelpButton('contactphone', 'contactphone', 'hub');
|
||||||
|
|
||||||
$mform->addElement('text', 'contactemail', get_string('email'));
|
$mform->addElement('text', 'contactemail', get_string('email'));
|
||||||
$mform->addRule('contactemail', $strrequired, 'required', null, 'client');
|
$mform->addRule('contactemail', $strrequired, 'required', null, 'client');
|
||||||
@ -227,6 +231,7 @@ class site_registration_form extends moodleform {
|
|||||||
$options[1] = get_string("registrationcontactyes");
|
$options[1] = get_string("registrationcontactyes");
|
||||||
$mform->addElement('select', 'contactable', get_string('registrationcontact'), $options);
|
$mform->addElement('select', 'contactable', get_string('registrationcontact'), $options);
|
||||||
$mform->setDefault('contactable', $contactable);
|
$mform->setDefault('contactable', $contactable);
|
||||||
|
$mform->addHelpButton('contactable', 'contactable', 'hub');
|
||||||
unset($options);
|
unset($options);
|
||||||
|
|
||||||
$options = array();
|
$options = array();
|
||||||
@ -234,11 +239,13 @@ class site_registration_form extends moodleform {
|
|||||||
$options[1] = get_string("registrationyes");
|
$options[1] = get_string("registrationyes");
|
||||||
$mform->addElement('select', 'emailalert', get_string('registrationemail'), $options);
|
$mform->addElement('select', 'emailalert', get_string('registrationemail'), $options);
|
||||||
$mform->setDefault('emailalert', $emailalert);
|
$mform->setDefault('emailalert', $emailalert);
|
||||||
|
$mform->addHelpButton('emailalert', 'emailalert', 'hub');
|
||||||
unset($options);
|
unset($options);
|
||||||
|
|
||||||
$mform->addElement('text','imageurl' , get_string('logourl', 'hub'));
|
// $mform->addElement('text','imageurl' , get_string('logourl', 'hub'));
|
||||||
$mform->setType('imageurl', PARAM_URL);
|
// $mform->setType('imageurl', PARAM_URL);
|
||||||
$mform->setDefault('imageurl', $imageurl);
|
// $mform->setDefault('imageurl', $imageurl);
|
||||||
|
// $mform->addHelpButton('imageurl', 'imageurl', 'hub');
|
||||||
|
|
||||||
/// Display statistic that are going to be retrieve by the hub
|
/// Display statistic that are going to be retrieve by the hub
|
||||||
$coursecount = $DB->count_records('course')-1;
|
$coursecount = $DB->count_records('course')-1;
|
||||||
|
@ -82,8 +82,8 @@ if (!empty($fromform) and confirm_sesskey()) {
|
|||||||
set_config('site_imageurl_'.$cleanhuburl, $fromform->imageurl, 'hub');
|
set_config('site_imageurl_'.$cleanhuburl, $fromform->imageurl, 'hub');
|
||||||
set_config('site_privacy_'.$cleanhuburl, $fromform->privacy, 'hub');
|
set_config('site_privacy_'.$cleanhuburl, $fromform->privacy, 'hub');
|
||||||
set_config('site_address_'.$cleanhuburl, $fromform->address, 'hub');
|
set_config('site_address_'.$cleanhuburl, $fromform->address, 'hub');
|
||||||
set_config('site_region_'.$cleanhuburl, $fromform->region, 'hub');
|
set_config('site_region_'.$cleanhuburl, $fromform->regioncode, 'hub');
|
||||||
set_config('site_country_'.$cleanhuburl, $fromform->country, 'hub');
|
set_config('site_country_'.$cleanhuburl, $fromform->countrycode, 'hub');
|
||||||
set_config('site_geolocation_'.$cleanhuburl, $fromform->geolocation, 'hub');
|
set_config('site_geolocation_'.$cleanhuburl, $fromform->geolocation, 'hub');
|
||||||
set_config('site_contactable_'.$cleanhuburl, $fromform->contactable, 'hub');
|
set_config('site_contactable_'.$cleanhuburl, $fromform->contactable, 'hub');
|
||||||
set_config('site_emailalert_'.$cleanhuburl, $fromform->emailalert, 'hub');
|
set_config('site_emailalert_'.$cleanhuburl, $fromform->emailalert, 'hub');
|
||||||
|
@ -38,8 +38,12 @@ $string['audienceadmins'] = 'Administators';
|
|||||||
$string['badurlformat'] = 'Bad URL format';
|
$string['badurlformat'] = 'Bad URL format';
|
||||||
$string['community'] = 'Community';
|
$string['community'] = 'Community';
|
||||||
$string['confirmregistration'] = 'Confirm registration';
|
$string['confirmregistration'] = 'Confirm registration';
|
||||||
|
$string['contactable'] = 'Contact from the public';
|
||||||
|
$string['contactable_help'] = 'Set to yes, the hub will display your email address.';
|
||||||
$string['contactemail'] = 'Contact email';
|
$string['contactemail'] = 'Contact email';
|
||||||
$string['contactname'] = 'Contact name';
|
$string['contactname'] = 'Contact name';
|
||||||
|
$string['contactphone'] = 'Phone';
|
||||||
|
$string['contactphone_help'] = 'Phone numbers are displayed to the Hub administrator only. There are not communicated on the hub list or anywhere else.';
|
||||||
$string['contributornames'] = 'Contributor names';
|
$string['contributornames'] = 'Contributor names';
|
||||||
$string['coursemap'] = 'Course map';
|
$string['coursemap'] = 'Course map';
|
||||||
$string['coursename'] = 'Name';
|
$string['coursename'] = 'Name';
|
||||||
@ -62,11 +66,16 @@ $string['edulevelother'] = 'Other';
|
|||||||
$string['edulevelprimary'] = 'Primary';
|
$string['edulevelprimary'] = 'Primary';
|
||||||
$string['edulevelsecondary'] = 'Secondary';
|
$string['edulevelsecondary'] = 'Secondary';
|
||||||
$string['eduleveltertiary'] = 'Tertiary';
|
$string['eduleveltertiary'] = 'Tertiary';
|
||||||
|
$string['emailalert'] = 'Email notifications';
|
||||||
|
$string['emailalert_help'] = 'Set to yes, the hub administrator will send you emails about security issues and other important news.';
|
||||||
$string['enrollable'] = 'Enrollable';
|
$string['enrollable'] = 'Enrollable';
|
||||||
$string['errorbadimageheightwidth'] = 'The image should have a maximum size of {$a->width} X {$a->height}';
|
$string['errorbadimageheightwidth'] = 'The image should have a maximum size of {$a->width} X {$a->height}';
|
||||||
$string['errorlangnotrecognized'] = 'Language code is unknown by Moodle. Please contact {$a}';
|
$string['errorlangnotrecognized'] = 'Language code is unknown by Moodle. Please contact {$a}';
|
||||||
|
$string['geolocation'] = 'latitude - longitude';
|
||||||
|
$string['geolocation_help'] = 'A geolocation code like you can find on Google Map or Twitter (example: -31.947884,115.871285)';
|
||||||
$string['hub'] = 'Hub';
|
$string['hub'] = 'Hub';
|
||||||
$string['imageurl'] = 'Image url';
|
$string['imageurl'] = 'Image url';
|
||||||
|
$string['imageurl_help'] = 'This image will be displayed on the hub. This image must be available from the hub at any moment. The image should have a maximum size of {$a->width} X {$a->height}';
|
||||||
$string['information'] = 'Information';
|
$string['information'] = 'Information';
|
||||||
$string['language'] = 'Language';
|
$string['language'] = 'Language';
|
||||||
$string['logourl'] = 'Logo URL';
|
$string['logourl'] = 'Logo URL';
|
||||||
@ -90,6 +99,7 @@ $string['postaladdress'] = 'Postal address';
|
|||||||
$string['postsnumber'] = 'Number of posts ({$a})';
|
$string['postsnumber'] = 'Number of posts ({$a})';
|
||||||
$string['prioritise'] = 'Prioritise';
|
$string['prioritise'] = 'Prioritise';
|
||||||
$string['privacy'] = 'Privacy';
|
$string['privacy'] = 'Privacy';
|
||||||
|
$string['privacy_help'] = 'You can either choose to not display your site on the hub site list, either to display only your site general information, either to display your site general information + a link to your site.';
|
||||||
$string['private'] = 'Private';
|
$string['private'] = 'Private';
|
||||||
$string['privatehuburl'] = 'Private hub URL';
|
$string['privatehuburl'] = 'Private hub URL';
|
||||||
$string['publicationinfo'] = 'Course publication information';
|
$string['publicationinfo'] = 'Course publication information';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user