From a5fa313b6ab88fa52ea5d59a9b4871ce6ca3f4a6 Mon Sep 17 00:00:00 2001 From: Imanol Losada Date: Fri, 27 Mar 2015 09:02:50 -0500 Subject: [PATCH 1/3] Set default status to STUDENT - refs BT#8538 --- main/auth/inscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/auth/inscription.php b/main/auth/inscription.php index 7be7751fa1..f4d1dd48fa 100755 --- a/main/auth/inscription.php +++ b/main/auth/inscription.php @@ -408,7 +408,7 @@ if ($form->validate()) { } } - $status = isset($values['status']) ? $values['status'] : null; + $status = isset($values['status']) ? $values['status'] : STUDENT; $phone = isset($values['phone']) ? $values['phone'] : null; // Creates a new user From 32272842fcb1111ddb2ba098a18eb091e4ebb7df Mon Sep 17 00:00:00 2001 From: Imanol Losada Date: Fri, 27 Mar 2015 09:03:39 -0500 Subject: [PATCH 2/3] Add corrected custom pages - refs BT#8538 --- custompages/registration-dist.php | 92 +++++++++++++--------- custompages/registration-feedback-dist.php | 63 +++++++++------ 2 files changed, 92 insertions(+), 63 deletions(-) diff --git a/custompages/registration-dist.php b/custompages/registration-dist.php index 1f6a52258e..ef66213542 100644 --- a/custompages/registration-dist.php +++ b/custompages/registration-dist.php @@ -7,10 +7,14 @@ * Copyright: CBlue SPRL, 20XX (GNU/GPLv3) * @package chamilo.custompages **/ - +/** + * Initialization + */ require_once('language.php'); require_once('../inc/global.inc.php'); - +require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'; +require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; +require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php'; /** * Removes some unwanted elementend of the form object */ @@ -19,11 +23,12 @@ $content['form']->removeElement('extra_mail_notify_message'); $content['form']->removeElement('extra_mail_notify_group_message'); $content['form']->removeElement('official_code'); $content['form']->removeElement('phone'); -$content['form']->removeElement('submit'); +//$content['form']->removeElement('submit'); if (isset($content['form']->_elementIndex['status'])) { $content['form']->removeElement('status'); $content['form']->removeElement('status'); } +// Deprecated since 2015-03-26 /** * Code to change the way QuickForm render html */ @@ -79,41 +84,54 @@ EOT; ?> - Registration - - - - - - + <?php echo custompages_get_lang('Registration');?> + + + + + + + + + + + -
- -
-
- -
-
    '.$form_error.'
'; - }?> - display(); - ?> -
- -
- -
- - + +
+
+
+
+
+ + '.$content['error'].'
'; + }?> +
+ + +
+ +
+
+
+ +
diff --git a/custompages/registration-feedback-dist.php b/custompages/registration-feedback-dist.php index 57775f231b..dfd7a1a310 100644 --- a/custompages/registration-feedback-dist.php +++ b/custompages/registration-feedback-dist.php @@ -3,39 +3,50 @@ /** * Quick display for user registration * @package chamilo.custompages - */ + */ /** * HTML output */ +require_once('language.php'); ?> - Registration - - - - - - + <?php echo custompages_get_lang('Registration');?> + + + + + + + + + -
- -
-
- -
- -
- -
+ +
+
+
+
+
+ +
+ +
+ +
+
+
+
+
From 9c9bca23f0e2580e14c71e999d3209f57edda004 Mon Sep 17 00:00:00 2001 From: Imanol Losada Date: Fri, 27 Mar 2015 09:07:52 -0500 Subject: [PATCH 3/3] Uncomment submit removeElement - refs BT#8538 --- custompages/registration-dist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custompages/registration-dist.php b/custompages/registration-dist.php index ef66213542..aeb4fc0f83 100644 --- a/custompages/registration-dist.php +++ b/custompages/registration-dist.php @@ -23,7 +23,7 @@ $content['form']->removeElement('extra_mail_notify_message'); $content['form']->removeElement('extra_mail_notify_group_message'); $content['form']->removeElement('official_code'); $content['form']->removeElement('phone'); -//$content['form']->removeElement('submit'); +$content['form']->removeElement('submit'); if (isset($content['form']->_elementIndex['status'])) { $content['form']->removeElement('status'); $content['form']->removeElement('status');