Skip to content

Commit 5a1216d

Browse files
committed
v1.7 release
1 parent 47ea567 commit 5a1216d

11 files changed

Lines changed: 507 additions & 530 deletions

en-GB.mod_registerlogin.ini

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
MOD_LOGIN_FORM="Login Form"
2-
MOD_REGISTRATION_FORM="Registration Form"
1+
COM_USERS_PROFILE_USERNAME_LABEL="Username"
2+
COM_USERS_REGISTER_EMAIL1_DESC="Enter your email address."
3+
COM_USERS_REGISTER_EMAIL1_LABEL="Email Address"
4+
COM_USERS_REGISTER_NAME_DESC="Enter your full name."
5+
COM_USERS_REGISTER_NAME_LABEL="Name"
6+
COM_USERS_REGISTER_PASSWORD1_LABEL="Password"
7+
COM_USERS_REGISTER_PASSWORD2_DESC="Confirm your password."
8+
COM_USERS_REGISTER_PASSWORD2_LABEL="Confirm Password"
9+
COM_USERS_REGISTER_USERNAME_DESC="Enter your desired username."
10+
COM_USERS_REGISTER_EMAIL2_DESC="Confirm your email address."
11+
COM_MODULES_FIELD_MODULECLASS_SFX_LABEL="Module Class Suffix"
12+
COM_MODULES_FIELD_MODULECLASS_SFX_DESC="A suffix to be applied to the CSS class of the module. This allows for individual module styling."
13+
COM_MODULES_FIELD_CACHING_DESC="Use the global cache setting to cache the content of this module or disable caching for this module."
14+
MOD_REGISTERLOGIN_USERACTIVATION_DESC="If set to Self the user will be registered immediately. If set to Admin the user will be emailed a link to verify their email address and then all users set to receive system emails and who have the permission to create users will be notified to activate the user's account."
315
MOD_REGISTERLOGIN="Login Register"
416
MOD_REGISTERLOGIN_USERACTIVATION_LABEL="New User Account Activation"
5-
MOD_REGISTERLOGIN_USERACTIVATION_DESC="If set to Self the user will be registered immediately. If set to Admin the user will be emailed a link to verify their email address and then all users set to receive system emails and who have the permission to create users will be notified to activate the user's account."
617
MOD_REGISTERLOGIN_USERACTIVATION_OPTION_SELFACTIVATION="Self"
718
MOD_REGISTERLOGIN_USERACTIVATION_OPTION_ADMINACTIVATION="Admin"
819
MOD_REGISTERLOGIN_DESC_DEFAULTVIEW="Select the default view for the module"
920
MOD_REGISTERLOGIN_LABEL_DEFAULTVIEW="Default View"
1021
MOD_REGISTERLOGIN_LABEL_ACTIVE_USER_AUTOMATICALLY="Activate user Automatically"
11-
MOD_REGISTERLOGIN_LABEL_AJAX_REGISTRATION = "Select Yes If You Would Like to Notifiy the Site Administrator About New Registrations"
12-
MOD_REGISTERLOGIN_LABEL_AJAX_REGISTRATION_DESCRIPTION = "Ajax Registration"
13-
MOD_REGISTERLOGIN_LABEL_NOTIFICATION_EMAIL_TO_ADMINISTRATOR = "Notifiy Admin"
14-
MOD_REGISTERLOGIN_LABEL_SITE_KEY = "Site Key"
15-
MOD_REGISTERLOGIN_LABEL_SECRATE_KEY = "Secret Key"
22+
MOD_REGISTERLOGIN_LABEL_AJAX_REGISTRATION="Select Yes If You Would Like to Notifiy the Site Administrator About New Registrations"
23+
MOD_REGISTERLOGIN_LABEL_AJAX_REGISTRATION_DESCRIPTION="Ajax Registration"
24+
MOD_REGISTERLOGIN_LABEL_NOTIFICATION_EMAIL_TO_ADMINISTRATOR="Notifiy Admin"
25+
MOD_REGISTERLOGIN_LABEL_SITE_KEY="Site Key"
26+
MOD_REGISTERLOGIN_LABEL_SECRATE_KEY="Secret Key"
1627
MOD_REGISTERLOGIN_LABEL_ENABLECAPTCHAONLOGIN="Enable Captcha On login"
1728
MOD_REGISTERLOGIN_LABEL_ENABLE_TERMS_OF_USE_ON_REGISTER="Enable terms of use on Registration"
1829
MOD_REGISTERLOGIN_LABEL_ENABLE_CHECKBOX_REGISTER_DESC="Enable to add the checkbox to terms of use."
@@ -37,23 +48,23 @@ MOD_REGISTERLOGIN_LABEL_PRIVATEKEY="Private Key"
3748
MOD_REGISTERLOGIN_DESC_PRIVATEKEY="ReCaptcha Public Key. Visit www.google.com/recaptcha"
3849
MOD_REGISTERLOGIN_LABEL_RECAPTCHATHEME="ReCaptcha Theme"
3950
MOD_REGISTERLOGIN_LABEL_CAPTCHA="Captcha"
40-
MOD_REGISTERLOGIN_DISPLAY_LABEL = "Display label"
41-
MOD_REGISTERLOGIN_DISPLAY_LABEL_DESC = "An option to specify label to the input fields."
51+
MOD_REGISTERLOGIN_DISPLAY_LABEL="Display label"
52+
MOD_REGISTERLOGIN_DISPLAY_LABEL_DESC="An option to specify label to the input fields."
4253
MOD_INVALID_KEY="Invalid Private Key"
4354
MOD_INVALID_CAPTCHA="Invalid Captcha"
4455
MOD_REGISTERLOGIN_PARAM_DEFAULTVIEW_LOGIN="Login"
4556
MOD_REGISTERLOGIN_PARAM_DEFAULTVIEW_REGISTER="Register"
46-
MOD_REGISTERLOGIN_NAME = "Name"
47-
MOD_REGISTERLOGIN_USERNAME = "Username"
48-
MOD_REGISTERLOGIN_PASSWORD = "Password"
49-
MOD_REGISTERLOGIN_CONFIRM_PASSWORD = "Confirm Password"
50-
MOD_REGISTERLOGIN_EMAIL = "Email Address"
51-
MOD_REGISTERLOGIN_CONFIRM_EMAIL = "Confirm email Address"
52-
MOD_REGISTERLOGIN_REQUIRED_FIELD = " Required field"
53-
MOD_REGISTERLOGIN_AJAX_REGISTRATION = "Ajax Registration"
54-
MOD_REGISTERLOGIN_AJAX_REGISTRATION_DESCRIPTION = "Ajax Registration helps you to register without reloading the entire page."
55-
MOD_REGISTERLOGIN_REMEMBER_ME = "Remember Me"
56-
MOD_REGISTERLOGIN_FORGOT_YOUR_USERNAME = "Forgot your username?"
57+
MOD_REGISTERLOGIN_NAME="Name"
58+
MOD_REGISTERLOGIN_USERNAME="Username"
59+
MOD_REGISTERLOGIN_PASSWORD="Password"
60+
MOD_REGISTERLOGIN_CONFIRM_PASSWORD="Confirm Password"
61+
MOD_REGISTERLOGIN_EMAIL="Email Address"
62+
MOD_REGISTERLOGIN_CONFIRM_EMAIL="Confirm email Address"
63+
MOD_REGISTERLOGIN_REQUIRED_FIELD=" Required field"
64+
MOD_REGISTERLOGIN_AJAX_REGISTRATION="Ajax Registration"
65+
MOD_REGISTERLOGIN_AJAX_REGISTRATION_DESCRIPTION="Ajax Registration helps you to register without reloading the entire page."
66+
MOD_REGISTERLOGIN_REMEMBER_ME="Remember Me"
67+
MOD_REGISTERLOGIN_FORGOT_YOUR_USERNAME="Forgot your username?"
5768
MOD_REGISTERLOGIN_FORGOT_YOUR_PASSWORD="Forgot your password?"
5869
MOD_REGISTERLOGIN_VALUE_USERNAME="Username"
5970
MOD_REGISTERLOGIN_HINAME="Hi %s,"
@@ -69,14 +80,14 @@ MOD_REGISTERLOGIN_EMAIL_REGISTERED_BODY_NOPW="Hello %s,\n\nThank you for registe
6980
MOD_REGISTERLOGIN_EMAIL_REGISTERED_NOTIFICATION_TO_ADMIN_BODY="Hello administrator, \n\nA new user '%s', username '%s', has registered at %s."
7081
MOD_REGISTERLOGIN_DATABASE_ERROR="Error getting the user from the database: %s"
7182
MOD_REGISTERLOGIN_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED="An error was encountered while sending activation notification email"
72-
MOD_REGISTERLOGIN_WRONG_LOGIN_MESSAGE = "Username and password do not match or you do not have an account yet"
73-
MOD_REGISTERLOGIN_CAPTCHA_ERROR = "Captcha code is incorrect. enter a valid captcha code."
83+
MOD_REGISTERLOGIN_WRONG_LOGIN_MESSAGE="Username and password do not match or you do not have an account yet"
84+
MOD_REGISTERLOGIN_CAPTCHA_ERROR="Captcha code is incorrect. enter a valid captcha code."
7485
MOD_REGISTERLOGIN_REGISTRATION_SAVE_SUCCESS="Thank you for registering. You may now log in using the username and password you registered with."
7586
MOD_REGISTERLOGIN_REGISTRATION_ACTIVATE_SUCCESS="Your Account has been successfully activated. You can now log in using the username and password you chose during the registration."
7687
MOD_REGISTERLOGIN_REGISTRATION_ADMINACTIVATE_SUCCESS="The user's account has been successfully activated and the user has been notified about it."
7788
MOD_REGISTERLOGIN_REGISTRATION_VERIFY_SUCCESS="Your email address has been verified. Once an administrator approves your account you will be notified by email and you can login to the site."
78-
MOD_REGISTERLOGIN_USERNAME_ALREADY_EXIST = "This Username is already registered."
79-
MOD_REGISTERLOGIN_LOGIN_SUCCESS = "You have been logged in successfully."
89+
MOD_REGISTERLOGIN_USERNAME_ALREADY_EXIST="This Username is already registered."
90+
MOD_REGISTERLOGIN_LOGIN_SUCCESS="You have been logged in successfully."
8091
MOD_REGISTERLOGIN_REGISTRATION_COMPLETE_ACTIVATE="Your account has been created and an activation link has been sent to the email address you entered. Note that you must activate the account by clicking on the activation link when you get the email before you can login."
8192
MOD_REGISTERLOGIN_REGISTRATION_COMPLETE_VERIFY="Your account has been created and a verification link has been sent to the email address you entered. Note that you must verify the account by clicking on the verification link when you get the email and then an administrator will activate your account before you can login."
8293
MOD_REGISTERLOGIN_FIELD_LOGIN_REDIRECTURL_LABEL="Login Redirection Page"
@@ -98,8 +109,8 @@ MOD_REGISTERLOGIN_DESC_DISPLAYTEXT="An option to specify text for the terms of u
98109
MOD_REGISTERLOGIN_LABEL_LINK="Link"
99110
MOD_REGISTERLOGIN_OPENINTHESAMEWINDOW="Open in the same window"
100111
MOD_REGISTERLOGIN_OPENINTHENEWWINDOW="Open in the new window"
101-
MOD_REGISTERLOGIN_OPENINMODEL = "Open in Modal/Popup"
102-
MOD_REGISTERLOGIN_CHOOSELAYOUT = "Select a Layout"
103-
MOD_REGISTERLOGIN_CHOOSELAYOUT_DES = "Select a Layout"
104-
MOD_REGISTERLOGIN_CHOOSELAYOUT_VALUE = "Radio Buttons"
105-
MOD_REGISTERLOGIN_CHOOSELAYOUT_VALUE1 = "Tabs"
112+
MOD_REGISTERLOGIN_OPENINMODEL="Open in Modal/Popup"
113+
MOD_REGISTERLOGIN_CHOOSELAYOUT="Select a Layout"
114+
MOD_REGISTERLOGIN_CHOOSELAYOUT_DES="Select a Layout"
115+
MOD_REGISTERLOGIN_CHOOSELAYOUT_VALUE="Radio Buttons"
116+
MOD_REGISTERLOGIN_CHOOSELAYOUT_VALUE1="Tabs"

en-GB.mod_registerlogin.sys.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
MOD_REGISTERLOGIN="Register Login"
1+
MOD_REGISTERLOGIN="Register Login"

mod_registerlogin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
$app = JFactory::getApplication();
2020
$type = modRegisterLoginHelper::getType();
2121
$return = modRegisterLoginHelper::getReturnURL($params, $type);
22-
22+
$jinput = $app->input->get;
2323
// user register
2424
$mName = 'module'.$module->id;
2525
$errorMessage = '';
26-
if(JRequest::getVar($mName) == 'register'){
26+
if($jinput->get($mName) == 'register'){
2727
$registerResponse = modRegisterLoginHelper::getUserRegister($params);
2828
if($registerResponse['error']){
2929
$errorMessage = $registerResponse['error_message'];
@@ -55,7 +55,7 @@
5555
//user login
5656
$loginResponse = '';
5757
$mName = 'module'.$module->id;
58-
if(JRequest::getVar($mName) == 'login'){
58+
if($jinput->get($mName) == 'login'){
5959
$loginResponse = modRegisterLoginHelper::getUserlogin($params);
6060
if(!$loginResponse['error']){
6161
if($params->get('login')){

mod_registerlogin.xml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@
66
method="upgrade">
77
<name>Register Login</name>
88
<author>JoomDev</author>
9-
<creationDate>May 2018</creationDate>
10-
<authorEmail>support@joomdev.com</authorEmail>
11-
<authorUrl>http://www.joomdev.com</authorUrl>
9+
<creationDate>June, 2018</creationDate>
10+
<copyright>All rights reserved.</copyright>
1211
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
13-
<copyright>Copyright (C) 2008 - 2018 JoomDev.com. All rights reserved.</copyright>
14-
<version>1.6</version>
12+
<authorEmail>support@joomdev.com</authorEmail>
13+
<authorUrl>www.joomDev.com</authorUrl>
14+
<version>1.7</version>
1515
<description>
1616
<![CDATA[<div style="font-size:16px; font-weight:bold; color:black; text-align:left; margin:0px; padding:0px 5px;"><h3>Register Login By JoomDev</h3></div>
1717
<div style="font-weight:normal; border-bottom:1px solid #f0dc7e;display:block; padding-bottom:5px; margin:5px; background-color:#fff;"></div>
1818
<p>This extension enables you to manage both Login and registration from a module itself without having the user to go the registration page.</p>
1919
<p>List of features:</p>
2020
<ul>
2121
<li>Option to disable login and display only registration in the module.</li>
22-
<li>Recaptcha Support.</li>
22+
<li>Recaptcha Support.</li>
2323
<li>Fields Validation.</li>
2424
<li>Option to display Radio Buttons to switch between login and Register either at the top or bottom.</li>
2525
<li>Ajax Registration helps to register without reloading the entire page.</li>
2626
<li>Option to select the process for new user account activation.</li>
2727
<li>Option to manage terms of use on registration.</li>
28-
<li>Manage label for the input fields with single click.</li>
28+
<li>Managelabel for the input fields with single click </li>
2929
</ul>
3030
]]>
3131
</description>
@@ -47,7 +47,7 @@
4747
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_LOGIN" />
4848
<config>
4949
<fields name="params">
50-
<fieldset name="basic">
50+
<fieldset name="basic" addfieldpath="/administrator/components/com_content/models/fields" addfieldprefix="Joomla\Component\Content\Administrator\Field">
5151
<field
5252
name="view"
5353
type="list"
@@ -145,7 +145,7 @@
145145
<option value="1">MOD_REGISTERLOGIN_TERMFOUSE_ENABLE</option>
146146
<option value="0">MOD_REGISTERLOGIN_TERMFOUSE_DISABLE</option>
147147
</field>
148-
<field
148+
<field
149149
type="text"
150150
name="title"
151151
default="I Agree to the Terms of Use"
@@ -154,7 +154,13 @@
154154
size="50"
155155
description="MOD_REGISTERLOGIN_DESC_DISPLAYTEXT">
156156
</field>
157-
<field type="modal_article" name="articleid" label="MOD_REGISTERLOGIN_LABEL_ARTICLEID" description="MOD_REGISTERLOGIN_DESC_ARTICLEID" showon="tou:1"></field>
157+
<field
158+
type="modal_article"
159+
name="articleid"
160+
label="MOD_REGISTERLOGIN_LABEL_ARTICLEID"
161+
description="MOD_REGISTERLOGIN_DESC_ARTICLEID"
162+
showon="tou:1">
163+
</field>
158164
<field
159165
name="checkbox"
160166
type="radio"
@@ -172,7 +178,7 @@
172178
<option value="_self">MOD_REGISTERLOGIN_OPENINTHESAMEWINDOW</option>
173179
<option value="_blank">MOD_REGISTERLOGIN_OPENINTHENEWWINDOW</option>
174180
</field>
175-
<field
181+
<field
176182
name="usetext"
177183
type="radio"
178184
class="btn-group btn-group-yesno"

tmpl/assets/Spinner.gif

86.4 KB
Loading

tmpl/assets/registerlogin.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tmpl/assets/registerloginajax.js

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
jQuery(document).ready(function() {
22

3+
function error(){
4+
jQuery('#error_message1').css("padding","15px");
5+
jQuery('#error_message1').css("background","#f2dede");
6+
jQuery('#error_message1').css("color","#a94442");
7+
jQuery('#error_message1').css("display","inline-block");
8+
}
9+
310
jQuery(".view_").change(function() {
411
if(jQuery(this).val() == 1) {
5-
jQuery('#login_form input#openview').val(jQuery(this).val());
6-
}else if (jQuery(this).val() ==2){
7-
jQuery('#registration_ input#openview').val(jQuery(this).val());
8-
}
9-
});
10-
jQuery("#registration_form").validate({
12+
jQuery('#login_form input#openview').val(jQuery(this).val());
13+
}else if (jQuery(this).val() ==2){
14+
jQuery('#registration_ input#openview').val(jQuery(this).val());
15+
}
16+
});
17+
18+
jQuery("#registration_form").validate({
1119
rules: {recaptcha_response_field: "required"},
1220
errorPlacement: function(error, element) {
1321
if (element.attr("name") == "recaptcha_response_field") {
@@ -21,41 +29,38 @@ jQuery(document).ready(function() {
2129
submitHandler: function() {
2230
var submit = jQuery('#register_submit');
2331
jQuery.ajax({
24-
url: 'index.php?option=com_ajax&module=registerlogin&method=getUserRegister&Itemid='+itemId+'&format=json',
32+
url: 'index.php?option=com_ajax&module=registerlogin&method=getUserRegister&Itemid=+itemId+&format=json',
2533
type: 'POST',
2634
data: jQuery('#registration_form').serialize(),
2735
async:true,
2836
beforeSend: function(){
2937
submit.attr('disabled', true);
3038
jQuery('.regload').show();
3139
},
32-
success: function(data) {
40+
success: function(response) {
3341
jQuery('.regload').hide();
3442
submit.removeAttr('disabled');
35-
if(data){
43+
if(response){
3644
jQuery('form#registration_form input#register_submit').val('Register');
45+
error();
3746
}
38-
if(data == "captcha incorrect"){
47+
if(response == "captcha incorrect"){
3948
jQuery('#error_message1').html("Captcha incorrect , please enter valid value");
40-
jQuery('#error_message1').css("padding","15px");
41-
jQuery('#error_message1').css("background","#f2dede");
42-
jQuery('#error_message1').css("color","#a94442");
43-
jQuery('#error_message1').css("display","inline-block");
44-
}else if(data == "The username you entered is not available. Please pick another username."){
45-
jQuery('#error_message1').html(data);
46-
jQuery('#error_message1').css("padding","15px");
47-
jQuery('#error_message1').css("background","#f2dede");
48-
jQuery('#error_message1').css("color","#a94442");
49-
jQuery('#error_message1').css("display","inline-block");
50-
}else if(data == "This email address is already registered."){
51-
jQuery('#error_message1').html(data);
52-
jQuery('#error_message1').css("padding","15px");
53-
jQuery('#error_message1').css("background","#f2dede");
54-
jQuery('#error_message1').css("color","#a94442");
55-
jQuery('#error_message1').css("display","inline-block");
56-
}else {
49+
error();
50+
}else if(response == "The username you entered is not available. Please pick another username."){
51+
jQuery('#error_message1').html(response);
52+
error();
53+
}else if(response == "This email address is already registered."){
54+
jQuery('#error_message1').html(response);
55+
error();
56+
57+
}else if(response == "Please enter your name."){
58+
jQuery('#error_message1').html("Sorry the credentials you are using are invalid");
59+
error();
60+
}
61+
else {
5762
jQuery('form#registration_form input').val('');
58-
jQuery('#error_message1').html(data);
63+
jQuery('#error_message1').html(response);
5964
jQuery('#error_message1').css("padding","15px");
6065
jQuery('#error_message1').css("background","#dff0d8");
6166
jQuery('#error_message1').css("color","#3c763d");
@@ -73,4 +78,4 @@ jQuery(document).ready(function() {
7378
return false;
7479
}
7580
});
76-
});
81+
});

0 commit comments

Comments
 (0)