archimed.py: enable local auth

This commit is contained in:
Jérôme Schneider 2014-01-20 11:12:26 +01:00
parent 249dd29d96
commit c61909a731
1 changed files with 6 additions and 34 deletions

View File

@ -119,48 +119,20 @@ def rewrite_login_box(env, values, request, response):
'id="perso_authentification"' in response.msg and \
'action="logon.aspx"' in response.msg:
r = re.compile(
r'(<div style="display:none" id="perso_authentification">).*?(</form>\s+</div>)',
r'<a id="REGISTRATION" class="fancybox.iframe".*?</a>',
re.MULTILINE|re.DOTALL)
response.msg = re.sub(r,
r"""\1
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#REGISTRATION").fancybox({
maxWidth : 800,
maxHeight : 800,
fitToView : false,
width : '70%',
height : '100%',
autoSize : false,
closeClick : false,
openEffect : 'none',
closeEffect : 'none',
type:'iframe'
});
});
//]]></script>
<a class="" href="/mandaye/sso" title="Connecter vous">
<span style="font-weight: bold;">Me connecter</span>
r"""
<br />
<a class="" href="/mandaye/sso" title="Se connecter avec son compte citoyen Montpellier Agglo">
<span style="font-weight: bold;">Se connecter avec son compte citoyen Montpellier Agglo</span>
</a>
<br />
<a class="" href="http://oai.mediatheques.montpellier-agglo.com/camo/GuestRegister.csp?Profile=Default&amp;OpacLanguage=fre" title="Inscrivez-vous" target="_blank">
<span>Préinscription en ligne</span>
</a>
<br />
<a class="" href="/EXPLOITATION/DEFAULT/resetpassword.aspx" title="Réinitialiser votre mot de passe">
<span>Réinitialiser votre mot de passe</span>
</a>
<a class="help-lector" href="/EXPLOITATION/DEFAULT/aide-compte-lecteur.aspx" title="Aide">
<span>Aide</span>
</a>
<div class="chargement_async" style="display:none;"> </div>
\2""",
""",
response.msg)
return response