Browse Source

- Fix bug #1206714

pull/16/head
Adrien Dorsaz 12 years ago
parent
commit
e55352db1e
  1. 15
      app/widgets/Login/Login.php
  2. 9
      app/widgets/Login/login.tpl

15
app/widgets/Login/Login.php

@ -56,6 +56,21 @@ class Login extends WidgetBase {
$this->view->assign('facebook',
t('You can login with Facebook (chat only) using %syour.id@chat.facebook.com%s and your password',
'<a href="#" onclick="fillExample(\'your.id@chat.facebook.com \', \'\');">', '</a>'));
$xmppWhiteList = Conf::getServerConf()['xmppWhiteList'];
if(isset($xmppWhiteList) && $xmppWhiteList!=''){
$this->view->assign('whitelist',
t('<p>This server accept only connection with xmpp accounts from these servers :</p>
<p style="font-weight:bold;text-align:center;margin:5px;">'.Conf::getServerConf()['xmppWhiteList'].'</p>
<p>If you don\'t have such xmpp account, you can try <a href="http://pod.movim.eu">another public Movim</a> client.</p>'));
$this->view->assign('jabber_display', 'none');
$this->view->assign('gmail_display', 'none');
$this->view->assign('facebook_display', 'none');
$this->view->assign('whitelist_display', 'block');
}else{
$this->view->assign('whitelist_display', 'none');
}
}
function onConfig(array $data)

9
app/widgets/Login/login.tpl

@ -42,17 +42,20 @@
<div class="clear"></div>
<ul id="loginhelp">
<li id="jabber">{$c->t('You can login using your favorite Jabber account')}
<li id="jabber" style="display:{$jabber_display};">{$c->t('You can login using your favorite Jabber account')}
<a href="#" onclick="fillExample('demonstration@movim.eu', 'demonstration');">
{$c->t('or with our demonstration account')}
</a>
</li>
<li id="gmail">
<li id="gmail" style="display:{$gmail_display};">
{$gmail}
</li>
<li id="facebook">
<li id="facebook" style="display:{$facebook_display};">
{$facebook}
</li>
<li id="whitelist" style="display:{$whitelist_display};">
{$whitelist}
</li>
</ul>
<iframe id="passwordiframe" name="passwordiframe" style="display: none;"></iframe>

Loading…
Cancel
Save