Browse Source

- Clean some code in the Login widget

pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
dae9f3ab4a
  1. 14
      app/widgets/Login/Login.php
  2. 33
      app/widgets/Login/login.tpl
  3. 1
      index.php
  4. 5
      system/Logs/Logger.php

14
app/widgets/Login/Login.php

@ -61,16 +61,10 @@ class Login extends WidgetBase {
$whitelist = $conf['xmppWhiteList'];
if(isset($whitelist) && $whitelist!=''){
$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;">'.$whitelist.'</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', $whitelist);
$this->view->assign('whitelist_display', true);
} else{
$this->view->assign('whitelist_display', false);
$this->view->assign('whitelist_display', 'none');
}
}

33
app/widgets/Login/login.tpl

@ -42,20 +42,25 @@
<div class="clear"></div>
<ul id="loginhelp">
<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" style="display:{$gmail_display};">
{$gmail}
</li>
<li id="facebook" style="display:{$facebook_display};">
{$facebook}
</li>
<li id="whitelist" style="display:{$whitelist_display};">
{$whitelist}
</li>
{if="$whitelist_display == true"}
<li id="whitelist" style="display:{$whitelist_display};">
<p>This server accept only connection with xmpp accounts from these servers :</p>
<p style="font-weight:bold; text-align:center; margin:0.5em;">{$whitelist}</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>
</li>
{else}
<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" style="display:{$gmail_display};">
{$gmail}
</li>
<li id="facebook" style="display:{$facebook_display};">
{$facebook}
</li>
{/if}
</ul>
<iframe id="passwordiframe" name="passwordiframe" style="display: none;"></iframe>

1
index.php

@ -53,7 +53,6 @@ try {
WidgetWrapper::destroyInstance();
} catch (Exception $e) {
//manage errors
\system\Logs\Logger::displayDebugCSS();
if (ENVIRONMENT === 'development') {

5
system/Logs/Logger.php

@ -75,11 +75,6 @@ abstract class Logger
#final_exception h2 {
color: red;
}
a:link, a:visited {
text-decoration: none;
color: #32434D;
}
.carreful, .debug {
margin: 0 auto;

Loading…
Cancel
Save