Revision 38569
Added by Eri Katsari almost 9 years ago
modules/uoa-joomla/trunk/joomla-3.4/components/com_slogin/controller.php | ||
---|---|---|
45 | 45 |
$last_name, |
46 | 46 |
$email, |
47 | 47 |
$slogin_id, |
48 |
$orcid, |
|
49 |
$eduid, |
|
48 | 50 |
$provider, |
49 | 51 |
$rawRequest, |
50 | 52 |
$network, |
... | ... | |
140 | 142 |
$this->last_name = !empty($request->last_name) ? $request->last_name : ''; |
141 | 143 |
$this->email = !empty($request->email) ? $request->email : ''; |
142 | 144 |
$this->slogin_id = !empty($request->id) ? $request->id : ''; |
145 |
// $this->orcid = !empty($request->orcid ) ? $request->orcid : ''; |
|
146 |
// $this->eduid= !empty($request->eduid) ? $request->eduid: ''; |
|
147 |
|
|
143 | 148 |
$this->provider = $plugin; |
144 | 149 |
$this->rawRequest = $request->all_request; |
145 | 150 |
$this->network = !empty($request->network) ? $request->network : ''; |
... | ... | |
784 | 789 |
); |
785 | 790 |
$app->setUserState('com_slogin.comparison_user.data', $data); |
786 | 791 |
|
792 |
|
|
787 | 793 |
|
788 |
|
|
789 |
|
|
790 |
|
|
791 | 794 |
$this->displayRedirect('index.php?option=com_slogin&view=comparison_user', $popup, $msg, 'error'); |
792 | 795 |
|
793 | 796 |
|
... | ... | |
1076 | 1079 |
public $sex = ''; |
1077 | 1080 |
public $display_name = ''; |
1078 | 1081 |
public $birthday = ''; |
1082 |
// public $orcid= ''; |
|
1083 |
//public $eduid= ''; |
|
1079 | 1084 |
public $avatar = ''; |
1080 | 1085 |
public $all_request = null; |
1081 | 1086 |
} |
modules/uoa-joomla/trunk/joomla-3.4/components/com_slogin/views/mail/view.html.php | ||
---|---|---|
1 |
<?php |
|
2 |
/** |
|
3 |
* Social Login |
|
4 |
* |
|
5 |
* @version 1.0 |
|
6 |
* @author SmokerMan, Arkadiy, Joomline |
|
7 |
* @copyright © 2012. All rights reserved. |
|
8 |
* @license GNU/GPL v.3 or later. |
|
9 |
*/ |
|
10 |
|
|
11 |
// No direct access to this file |
|
12 |
defined('_JEXEC') or die('Restricted access'); |
|
13 |
|
|
14 |
// import Joomla view library |
|
15 |
jimport('joomla.application.component.view'); |
|
16 |
|
|
17 |
//костыль для поддержки 2 и 3 джумлы |
|
18 |
if(!class_exists('SloginViewMailParent')){ |
|
19 |
if(class_exists('JViewLegacy')){ |
|
20 |
class SloginViewMailParent extends JViewLegacy{} |
|
21 |
} |
|
22 |
else{ |
|
23 |
class SloginViewMailParent extends JView{} |
|
24 |
} |
|
25 |
} |
|
26 |
|
|
27 |
// import joomla controller library |
|
28 |
jimport('joomla.application.component.controller'); |
|
29 |
|
|
30 |
/** |
|
31 |
* HTML View class for the HelloWorld Component |
|
32 |
*/ |
|
33 |
class SloginViewMail extends SloginViewMailParent |
|
34 |
{ |
|
35 |
// Overwriting JView display method |
|
36 |
function display($tpl = null) |
|
37 |
{ |
|
38 |
$app = JFactory::getApplication(); |
|
39 |
|
|
40 |
$data = $app->getUserState('com_slogin.provider.data'); |
|
41 |
$app = JFactory::getApplication(); |
|
42 |
|
|
43 |
$msg = $app->getUserState('com_slogin.msg', ''); |
|
44 |
$msgType = $app->getUserState('com_slogin.msgType', ''); |
|
45 |
$app->setUserState('com_slogin.msg', ''); |
|
46 |
$app->setUserState('com_slogin.msgType', ''); |
|
47 |
|
|
48 |
if(!empty($msg)){ |
|
49 |
$msgType = (!empty($msgType)) ? $msgType : 'message'; |
|
50 |
$app->enqueueMessage($msg, $msgType); |
|
51 |
} |
|
52 |
|
|
53 |
//костыль для поддержки 2 и 3 джумлы |
|
54 |
$className = (class_exists('JControllerLegacy')) ? 'JControllerLegacy' : 'JController'; |
|
55 |
|
|
56 |
// Get an instance of the controller prefixed by SLogin |
|
57 |
$controller = call_user_func(array($className, 'getInstance'), 'SLogin'); |
|
58 |
$controller->setVars('first_name', $data['first_name']); |
|
59 |
$controller->setVars('last_name', $data['last_name']); |
|
60 |
$controller->setVars('email', $data['email']); |
|
61 |
$controller->setVars('slogin_id', $data['slogin_id']); |
|
62 |
$controller->setVars('provider', $data['provider']); |
|
63 |
|
|
64 |
$this->name = $controller->setUserName(); |
|
65 |
$this->username = $controller->setUserUserName(); |
|
66 |
$this->email = $data['email']; |
|
67 |
|
|
68 |
$this->action = JRoute::_('index.php?option=com_slogin&task=check_mail'); |
|
69 |
|
|
70 |
// Display the view |
|
71 |
parent::display($tpl); |
|
72 |
} |
|
73 |
} |
|
1 |
<?php |
|
2 |
/** |
|
3 |
* Social Login |
|
4 |
* |
|
5 |
* @version 1.0 |
|
6 |
* @author SmokerMan, Arkadiy, Joomline |
|
7 |
* @copyright © 2012. All rights reserved. |
|
8 |
* @license GNU/GPL v.3 or later. |
|
9 |
*/ |
|
10 |
|
|
11 |
// No direct access to this file |
|
12 |
defined('_JEXEC') or die('Restricted access'); |
|
13 |
|
|
14 |
// import Joomla view library |
|
15 |
jimport('joomla.application.component.view'); |
|
16 |
|
|
17 |
//костыль для поддержки 2 и 3 джумлы |
|
18 |
if(!class_exists('SloginViewMailParent')){ |
|
19 |
if(class_exists('JViewLegacy')){ |
|
20 |
class SloginViewMailParent extends JViewLegacy{} |
|
21 |
} |
|
22 |
else{ |
|
23 |
class SloginViewMailParent extends JView{} |
|
24 |
} |
|
25 |
} |
|
26 |
|
|
27 |
// import joomla controller library |
|
28 |
jimport('joomla.application.component.controller'); |
|
29 |
|
|
30 |
/** |
|
31 |
* HTML View class for the HelloWorld Component |
|
32 |
*/ |
|
33 |
class SloginViewMail extends SloginViewMailParent |
|
34 |
{ |
|
35 |
// Overwriting JView display method |
|
36 |
function display($tpl = null) |
|
37 |
{ |
|
38 |
$app = JFactory::getApplication(); |
|
39 |
|
|
40 |
$data = $app->getUserState('com_slogin.provider.data'); |
|
41 |
$app = JFactory::getApplication(); |
|
42 |
|
|
43 |
$msg = $app->getUserState('com_slogin.msg', ''); |
|
44 |
$msgType = $app->getUserState('com_slogin.msgType', ''); |
|
45 |
$app->setUserState('com_slogin.msg', ''); |
|
46 |
$app->setUserState('com_slogin.msgType', ''); |
|
47 |
|
|
48 |
//TODO ERI: HIDE THE ERROR MESSAGES |
|
49 |
if(!empty($msg)){ |
|
50 |
$msgType = (!empty($msgType)) ? $msgType : 'message'; |
|
51 |
// $app->enqueueMessage($msg, $msgType); |
|
52 |
} |
|
53 |
|
|
54 |
//костыль для поддержки 2 и 3 джумлы |
|
55 |
$className = (class_exists('JControllerLegacy')) ? 'JControllerLegacy' : 'JController'; |
|
56 |
|
|
57 |
// Get an instance of the controller prefixed by SLogin |
|
58 |
$controller = call_user_func(array($className, 'getInstance'), 'SLogin'); |
|
59 |
$controller->setVars('first_name', $data['first_name']); |
|
60 |
$controller->setVars('last_name', $data['last_name']); |
|
61 |
$controller->setVars('email', $data['email']); |
|
62 |
$controller->setVars('slogin_id', $data['slogin_id']); |
|
63 |
$controller->setVars('provider', $data['provider']); |
|
64 |
|
|
65 |
$this->name = $controller->setUserName(); |
|
66 |
$this->username = $controller->setUserUserName(); |
|
67 |
$this->email = $data['email']; |
|
68 |
|
|
69 |
$this->action = JRoute::_('index.php?option=com_slogin&task=check_mail'); |
|
70 |
|
|
71 |
// Display the view |
|
72 |
parent::display($tpl); |
|
73 |
} |
|
74 |
} |
modules/uoa-joomla/trunk/joomla-3.4/components/com_slogin/views/mail/tmpl/default.php | ||
---|---|---|
19 | 19 |
|
20 | 20 |
<div class="login"> |
21 | 21 |
|
22 |
<h3> |
|
23 |
<?php echo JText::_('Missing Data !'); ?> |
|
22 |
<div id="mailTab"> |
|
23 |
|
|
24 |
<h3 > |
|
25 |
|
|
26 |
<?php echo JText::_('Almost there!'); ?> |
|
24 | 27 |
</h3> |
25 |
<div id ='warning' class='uk-block'> |
|
26 |
<?php echo JText::_('The Login Provider you selected does not release your mail address. |
|
27 |
</br>Please fill the form so you can complete the registration process.')?> |
|
28 |
|
|
29 |
<div id ='warning' class='uk-alert uk-alert-in'> |
|
30 |
<?php echo JText::_('<p></p>It seems that the Social Network you selected does not release your e-mail address to third parties. |
|
31 |
</br>Please fill in the missing data in the form below so you can complete the registration process.<p></p>')?> |
|
28 | 32 |
|
29 |
|
|
30 |
|
|
31 |
</div> |
|
33 |
</div> |
|
32 | 34 |
|
33 | 35 |
<!-- <div class="login-description" id="slogin_error_mesages"></div> --> |
34 | 36 |
|
37 |
<div id="slogin_spacer"></div> |
|
38 |
|
|
35 | 39 |
<div class="login"> |
36 | 40 |
<form action="<?php echo $this->action; ?>" method="post" class="form-validate" id="sloginUserForm"> |
37 | 41 |
<fieldset> |
38 | 42 |
<div class="login-fields"> |
39 | 43 |
<label id="name-lbl" for="name" class=" required"> |
40 |
<?php echo JText::_('Display Name')?> |
|
44 |
<?php echo JText::_('Display Name:')?>
|
|
41 | 45 |
</label> |
42 |
<input type="text" name="name" id="name" class="validate-name required"
|
|
46 |
<input type="text" name="name" id="name" class=" required" |
|
43 | 47 |
value="<?php echo $this->name; ?>" size="25"/> |
44 | 48 |
</div> |
45 | 49 |
<div class="login-fields"> |
46 | 50 |
<label id="username-lbl" for="username" class=" required"> |
47 |
<?php echo JText::_('Username')?> |
|
51 |
<?php echo JText::_('Username:')?>
|
|
48 | 52 |
</label> |
49 |
<input type="text" name="username" id="username" class="validate-username required"
|
|
53 |
<input type="text" name="username" id="username" class="required" |
|
50 | 54 |
value="<?php echo $this->username; ?>" size="25"/> |
51 | 55 |
</div> |
52 | 56 |
<div class="login-fields"> |
53 | 57 |
<label id="email-lbl" for="email" class="required"> |
54 |
<?php echo JText::_('COM_SLOGIN_MAIL')?>
|
|
58 |
<?php echo JText::_('E-mail:')?>
|
|
55 | 59 |
</label> |
56 | 60 |
<input type="text" name="email" id="email" |
57 |
value="<?php echo $this->email; ?>" class="validate-email required" size="25">
|
|
61 |
value="<?php echo $this->email; ?>" class="required" size="25"> |
|
58 | 62 |
</div> |
63 |
<div id="slogin_spacer_small"></div> |
|
59 | 64 |
|
60 |
<input type="submit" class="button validate" value="<?php echo JText::_('COM_SLOGIN_SUBMIT'); ?>"/> |
|
61 |
|
|
65 |
<!-- <input type="submit" id="submitBnt" class="button validate" value="<?php echo JText::_('COM_SLOGIN_SUBMIT'); ?>"/> --> |
|
66 |
<input type="submit" id="submitBnt" class="uk-button uk-button-primary" value="<?php echo JText::_('COM_SLOGIN_SUBMIT'); ?>"/> |
|
67 |
|
|
68 |
<a class="uk-button uk-button-cancel" href="<?php echo JURI::base(); ?>"><?php echo JText::_('CANCEL'); ?></a> |
|
69 |
|
|
62 | 70 |
<?php echo JHtml::_('form.token'); ?> |
63 | 71 |
</fieldset> |
64 | 72 |
</form> |
65 | 73 |
|
66 |
|
|
74 |
</div> |
|
67 | 75 |
</div> |
68 | 76 |
</div> |
modules/uoa-joomla/trunk/joomla-3.4/components/com_slogin/views/comparison_user/view.html.php | ||
---|---|---|
40 | 40 |
$this->params = JComponentHelper::getParams('com_users'); |
41 | 41 |
$this->user = JFactory::getUser(); |
42 | 42 |
|
43 |
// $this->form = $this->get('Form');
|
|
43 |
$this->form = $this->get('Form'); |
|
44 | 44 |
|
45 |
// $this->email = $data['email'];
|
|
46 |
//$this->id = $data['id'];
|
|
47 |
// $this->provider = $data['provider'];
|
|
48 |
// $this->slogin_id = $data['slogin_id'];
|
|
45 |
$this->email = $data['email']; |
|
46 |
$this->id = $data['id']; |
|
47 |
$this->provider = $data['provider']; |
|
48 |
$this->slogin_id = $data['slogin_id']; |
|
49 | 49 |
|
50 | 50 |
// Display the view |
51 |
//parent::display($tpl);
|
|
51 |
parent::display($tpl);
|
|
52 | 52 |
} |
53 | 53 |
} |
modules/uoa-joomla/trunk/joomla-3.4/components/com_slogin/views/comparison_user/tmpl/default.php | ||
---|---|---|
15 | 15 |
$doc->addStyleSheet(JURI::root().'media/com_slogin/comslogin.css') |
16 | 16 |
?> |
17 | 17 |
<div class="login"> |
18 |
<div id="mailTab"> |
|
18 | 19 |
|
19 |
<h1> |
|
20 |
<?php echo JText::_('COM_SLOGIN_COMPARISON'); ?> |
|
21 |
</h1> |
|
20 |
|
|
21 |
<h3> |
|
22 |
|
|
23 |
<?php echo JText::_('CONFIRM YOUR ACCOUNT'); ?> |
|
24 |
</h3> |
|
25 |
|
|
26 |
<div id ='warning' class='uk-alert uk-alert-in'> |
|
27 |
<?php echo JText::sprintf('<p>The mail you provided is already registered with another account.<br> If you are the owner of this account, please verify your credentials:</p>', ""); ?> |
|
22 | 28 |
|
23 |
<div class="login-description"> |
|
24 |
<?php echo JText::sprintf('This mail is already in use by another user. If this is you, please verify your account:', ""); ?> |
|
25 |
</div> |
|
29 |
</div> |
|
26 | 30 |
|
31 |
|
|
32 |
<div id="slogin_spacer"></div> |
|
33 |
|
|
34 |
|
|
27 | 35 |
<form action="<?php echo JRoute::_('index.php?option=com_slogin&task=join_mail'); ?>" method="post"> |
28 | 36 |
<fieldset> |
29 | 37 |
<div class="login-fields"> |
30 | 38 |
<label id="username-lbl" for="username" class=" required"> |
31 |
<?php echo JText::_('Username:'); ?> |
|
39 |
<?php echo JText::_('Username :'); ?>
|
|
32 | 40 |
<!-- <span class="star"> *</span> --> |
33 | 41 |
</label> |
34 |
<input type="text" name="username" id="username" value="" class="validate-username required" size="10">
|
|
42 |
<input type="text" name="username" id="username" value="" class="required" size="10"> |
|
35 | 43 |
</div> |
36 | 44 |
<div class="login-fields"> |
37 | 45 |
<label id="password-lbl" for="password" class=" required"> |
38 |
<?php echo JText::_('Password:'); ?> |
|
46 |
<?php echo JText::_('Password :'); ?>
|
|
39 | 47 |
<!-- <span class="star"> *</span> --> |
40 | 48 |
</label> |
41 | 49 |
<input type="password" name="password" id="password" value="" |
42 |
class="validate-password required" size="10">
|
|
50 |
class="required" size="10"> |
|
43 | 51 |
</div> |
44 |
<button type="submit" class="button"><?php echo JText::_('COM_SLOGIN_JOIN'); ?></button> |
|
52 |
|
|
53 |
<div id="slogin_spacer_small"></div> |
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
<button type="submit" id="submitBnt" class="uk-button uk-button-primary" ><?php echo JText::_('COM_SLOGIN_JOIN'); ?></button> |
|
58 |
<a class="uk-button uk-button-cancel" href="<?php echo JURI::base(); ?>"><?php echo JText::_('CANCEL'); ?></a> |
|
59 |
|
|
45 | 60 |
<input type="hidden" name="return" |
46 | 61 |
value="<?php echo base64_encode($this->params->get('login_redirect_url', $this->form->getValue('return'))); ?>"/> |
47 | 62 |
<input type="hidden" name="user_id" value="<?php echo $this->id; ?>"/> |
... | ... | |
51 | 66 |
</fieldset> |
52 | 67 |
</form> |
53 | 68 |
|
69 |
</div> |
|
54 | 70 |
</div> |
Also available in: Unified diff
com_slogin : fix for views and look and feel