Changeset 3724 for TI12-security


Ignore:
Timestamp:
02/04/08 15:22:45 (12 years ago)
Author:
pjkersha
Message:
 
Location:
TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/templates/ndg/security
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/templates/ndg/security/login.kid

    r3658 r3724  
    1 <html py:extends="'ndgPage.kid'" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 
    2      
    3     <div py:def="loginForm()" class="loginForm"> 
    4         <form action="$g.securityCfg.getCredentials" method="POST"> 
    5             <input type="hidden" name="r" value="${c.b64encReturnTo}"/> 
    6             <table cellspacing="0" border="0" cellpadding="5"> 
    7                 <tr> 
    8                     <td>Username:</td>  
    9                     <td><input type="text" name="username" value=""/></td> 
    10                 </tr><tr> 
    11                     <td>Pass-phrase:</td> 
    12                     <td><input type="password" name="passphrase"/></td> 
    13                 </tr><tr> 
    14                     <td colspan="2" align="right"> 
    15                     <input type="submit" value="Login"/></td> 
    16                 </tr> 
    17             </table> 
    18         </form> 
    19     </div> 
    20      
    21     <head> 
    22     <replace py:replace="pagehead()"/> 
    23     </head> 
    24     <body> 
    25         <div py:replace="header()"/> 
    26         <div class="loginContent" style="text-indent:5px">         
    27             <h4>Login</h4> 
    28             <div py:replace="loginForm()"/> 
    29             <p>${c.xml}</p> 
    30         </div> 
    31         <div py:replace="footer()"/> 
    32     </body> 
    33  
    34 </html> 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/templates/ndg/security/ndgPage.kid

    r3658 r3724  
    1 <!-- This is a bunch of named templates for use in pages --> 
    2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 
    3      
    4     <!-- HTML Header and Document header follow --> 
    5      
    6     <head py:def="pagehead()" py:strip="True"> 
    7         <title py:content="c.title">title</title> 
    8         <!--! The following includes the javascript, note that the XML 
    9         function is needed to avoid escaping the < character --> 
    10         ${XML(h.javascript_include_tag(builtins=True))} 
    11         <script type="text/javascript" src="$g.securityCfg.server/js/toggleDiv.js"/> 
    12  
    13         <link media="all, screen" href="$g.securityCfg.server/layout/ndg2.css" type="text/css" rel="stylesheet"/> 
    14         <link rel="icon" type="image/ico" href="$g.securityCfg.server/layout/favicon.jpg" /> 
    15  
    16     </head> 
    17  
    18     <div py:def="header()"> 
    19         <div id="header"/> 
    20         <div id="logo"><img src="$g.securityCfg.LeftLogo" alt="$g.securityCfg.LeftAlt" /></div> 
    21     </div> 
    22      
    23     <div py:def="PageTabs(tabv)" id="PageTabs"> 
    24         <div id="PageTabRow"> 
    25             <ul> 
    26                 <span py:for="tab in c.pageTabs"> 
    27                     <?python 
    28                     linkto=True 
    29                     if tab[0] == tabv:  
    30                         status='current' 
    31                         linkto=False 
    32                     else: status='hidden' 
    33                     ?> 
    34                     <li class="$status"><span class="pagetab"> 
    35                         ${XML(h.link_to_if(linkto,tab[0],tab[1]))} 
    36                     </span></li>  
    37                  </span> 
    38             </ul> 
    39         </div> 
    40         <div class="line"/> 
    41         <div class="clear"/> 
    42     </div> 
    43     <py if="c.UpdatePageTabs" py:replace="PageTabs(c.current)"/> 
    44  
    45     <!-- Page Footer follows --> 
    46     <div py:def="footer()" id="Footer"> 
    47         <center><table><tbody> 
    48             <tr> 
    49                 <td align="left" width="60%"> 
    50                     <table><tbody> 
    51                     <tr><td><span py:replace="linkimage(g.securityCfg.ndgLink,g.securityCfg.ndgImage,'NDG')"/></td> 
    52                     <td> This portal is a product of the <a href="http://ndg.nerc.ac.uk"> NERC DataGrid</a> 
    53                     ${g.securityCfg.disclaimer} </td> 
    54                     </tr> 
    55                     </tbody></table> 
    56                 </td> 
    57                 <td width="40%" align="center"> 
    58                     <div id="loginStatus"> 
    59                         <!--! now we choose one of the next two (logged in or not) --> 
    60                         <div py:if="'ndgSec' in session"><table><tbody><tr><td>  
    61                         User [${session['ndgSec']['u']}] logged in at  
    62                         ${session['ndgSec']['org']} with roles  
    63                         [${len(session['ndgSec']['roles'])==1 and session['ndgSec']['roles'][0] or ', '.join(session['ndgSec']['roles'])}]</td><td> 
    64                         &nbsp;<span py:replace="logOut()"/></td></tr></tbody></table></div> 
    65                         <div py:if="'ndgSec' not in session">Further services maybe available if you can 
    66                             <span py:replace="logIn()"/></div> 
    67                     </div> 
    68                 </td> 
    69                 <td align="right"><span py:replace="linkimage(g.securityCfg.stfcLink,g.securityCfg.stfcImage,'Hosted by the STFC CEDA')"/></td> 
    70             </tr> 
    71         </tbody></table></center> 
    72     </div> 
    73      
    74     <!-- Utility Functions follow --> 
    75      
    76     <!-- hyperlinked image --> 
    77     <span py:def="linkimage(linkref,imageref,alttext)"> 
    78         <a href="$linkref"><image src="$imageref" alt="$alttext" title="$alttext"/></a> 
    79     </span> 
    80      
    81     <!-- Help Icons --> 
    82     <span py:def="helpIcon(value)"> 
    83         <span> 
    84             <a href="javascript:;" title="Toggle help" onclick="toggleDiv(1,'$value','shown','hidden','div'); return false;"> 
    85             <img src="$g.securityCfg.helpIcon" alt="Toggle help" class="helpicon"/></a> 
    86        
    87         </span> 
    88     </span> 
    89      
    90     <!-- Login and out buttons -->     
    91     <span py:def="logOut()" class="logOut"> 
    92         <form action="$g.securityCfg.logout"> 
    93             <input type="hidden" name="r" value="${c.b64encReturnTo}"/> 
    94             <input type="submit" value="Logout"/> 
    95         </form> 
    96     </span> 
    97      
    98     <span py:def="logIn()" class="logIn"> 
    99         <?python 
    100         from base64 import urlsafe_b64encode 
    101          
    102         # Base 64 encode to enable passing around in 'r' argument of query 
    103         # string for use with login/logout 
    104         c.returnTo = c.requestURL 
    105         c.b64encReturnTo = urlsafe_b64encode(c.requestURL) 
    106         ?> 
    107         <form action="$g.securityCfg.wayfuri"> 
    108             <input type="hidden" name="r" value="${c.b64encReturnTo}"/> 
    109             <input type="submit" value="Login"/> 
    110         </form> 
    111     </span> 
    112      
    113      
    114      
    115 </html> 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/templates/ndg/security/wayf.kid

    r3658 r3724  
    1 <html py:extends="'ndgPage.kid'" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 
    2     <head> 
    3     <replace py:replace="pagehead()"/> 
    4     </head> 
    5     <body> 
    6         <div py:replace="header()"/> 
    7         <div class="wayfContent" style="text-indent:5px">         
    8         <h4> Where are you from? </h4> 
    9         <p> You can login in at: 
    10         <?python 
    11         # Sort alphabetically 
    12         providerNames = c.providers.keys() 
    13         providerNames.sort() 
    14         ?> 
    15         <ul py:for="h in providerNames"> 
    16             <li> <a href="${c.providers[h]}?r=${c.b64encReturnTo}">${h}</a></li> 
    17         </ul></p> 
    18         <p>Before clicking on these links, please check that the links redirect to a site 
    19         you trust with your security credentials.</p> 
    20         <p> How can I tell?  For any of the above, following login you will be  
    21         redirected back to the URL: <a href="${c.returnTo}">${c.returnTo}</a></p> 
    22                 </div> 
    23         <div py:replace="footer()"/> 
    24     </body> 
    25      
    26         <div py:def="footer()" id="Footer"> 
    27         <center><table><tbody> 
    28             <tr> 
    29                 <td align="center" width="60%"> 
    30                     <table><tbody> 
    31                     <tr><td><span py:replace="linkimage(g.securityCfg.ndgLink,g.securityCfg.ndgImage,'NDG')"/></td> 
    32                     <td> This portal is a product of the <a href="http://ndg.nerc.ac.uk"> NERC DataGrid</a> 
    33                     Not all functionality is completely implemented, bugs and problems are expected </td> 
    34                     </tr> 
    35                     </tbody></table> 
    36                 </td> 
    37                 <td width="40%" align="center"> 
    38                     <div id="loginStatus"> 
    39                         <!--! now we choose one of the next two (logged in or not) --> 
    40                         <div py:if="'ndgSec' in session"><table><tbody><tr><td> User [${session['ndgSec']['u']}] logged in 
    41                         at [${session['ndgSec']['h']}] with roles [${session['ndgSec']['roles']}]</td><td> 
    42                         &nbsp;<span py:replace="logOut()"/></td></tr></tbody></table></div> 
    43                         <div py:if="'ndgSec' not in session"></div> 
    44                     </div> 
    45                 </td> 
    46                 <td><span py:replace="linkimage(g.securityCfg.stfcLink,g.securityCfg.stfcImage,'Hosted by the STFC CEDA')"/></td> 
    47             </tr> 
    48         </tbody></table></center> 
    49     </div> 
    50 </html> 
Note: See TracChangeset for help on using the changeset viewer.