Ticket #3923: extcode-3923_2.patch

File extcode-3923_2.patch, 6.2 KB (added by TimothyClemans, 5 years ago)
  • new file notebook/css/registration.css

    # HG changeset patch
    # User Timothy Clemans <timothy.clemans@gmail.com>
    # Date 1219511991 25200
    # Node ID 02971f9fca0dd32062c3bd9acb27a44d04875dd0
    # Parent  774d6bac891e09e0e8b40957166340e20b9448d1
    extcode-3923_2
    
    diff -r 774d6bac891e -r 02971f9fca0d notebook/css/registration.css
    - +  
     1/***** Global Settings *****/ 
     2 
     3html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,table,caption,tbody,tfoot,thead,tr,th,td { 
     4border:0; 
     5font-family:inherit; 
     6font-size:100%; 
     7font-style:inherit; 
     8font-weight:inherit; 
     9margin:0; 
     10outline:0; 
     11padding:0; 
     12text-decoration:none; 
     13vertical-align:baseline 
     14} 
     15 
     16html { 
     17font-size:100.1% 
     18} 
     19 
     20body { 
     21font:0.88em/1.4 Arial, Helvetica, sans-serif; 
     22} 
     23 
     24#wrapper { 
     25margin:0 auto; 
     26max-width:600px 
     27} 
     28 
     29/***** Headings *****/ 
     30 
     31h1,h2,h3,h4,h5 { 
     32font-wieght:normal 
     33} 
     34 
     35h1 { 
     36border-bottom:1px solid #696969; 
     37font-size:2em; 
     38padding:10px 0 
     39} 
     40 
     41h2 { 
     42font-weight:bold 
     43} 
     44 
     45h1, h2, p, li, .entry { 
     46margin-bottom:10px 
     47} 
     48 
     49.entry { 
     50border:1px solid #999; 
     51padding:3px; 
     52width:200 
     53} 
     54 
     55li { 
     56border-bottom:1px solid #CCC 
     57} 
     58 
     59.error, .error_found { 
     60color:red 
     61} 
     62 
     63.error_found { 
     64font-size:1.5em  
     65} 
     66 
     67.button { 
     68font-size:1.2em 
     69} 
     70 No newline at end of file 
  • notebook/templates/base.html

    diff -r 774d6bac891e -r 02971f9fca0d notebook/templates/base.html
    a b  
    22<html lang="en"> 
    33<head> 
    44    <title>{% block title %}{% endblock %} | Sage Notebook</title> 
    5         <link type="text/css" rel="stylesheet" href="/css/master.css" media="screen" /> 
     5        <link type="text/css" rel="stylesheet" href="/css/{% block css %}master{% endblock %}.css" media="screen" /> 
    66</head> 
    77<body> 
    88    {% block content %}{% endblock %} 
  • notebook/templates/login.html

    diff -r 774d6bac891e -r 02971f9fca0d notebook/templates/login.html
    a b  
    5858<span class="addtext">Sign into the Sage Notebook<br><br> 
    5959<form method="POST" action="/login"> 
    6060<table> 
    61 <tr><td align=right>Username:</td><td><input type="text" name="email" value="{{ default }}" size="15"></td></tr> 
     61<tr><td align=right>Username:</td><td><input type="text" name="email" value="{{ default_user }}" size="15"></td></tr> 
    6262{% if username_error %} 
    6363<tr><td align=right><span style="color:red">Error:</span></td><td>Username is not in the system</td></tr> 
    6464{% endif %} 
     
    7070<tr><td>&nbsp</td><td><input type="submit" value="Sign In"></td></tr> 
    7171</table> 
    7272<br><br><br> 
    73 {% if register %} 
    74 <a href='/register'><b>Sign up for a new SAGE Notebook account</b></a> 
     73{% if accounts %} 
     74<a href='/register'><b>Sign up for a new Sage Notebook account</b></a> 
    7575{% endif %} 
    7676<br><br><br> 
    7777<a href='/pub'><b>Browse published Sage worksheets<br>(no login required)</b></a><br /><br/><br/> 
    78 {% if forgot_pass %} 
     78{% if recovery %} 
    7979<a href='/forgotpass'><b>Forgot password</b></a> 
    8080{% endif %} 
    8181</span> 
    8282</td> 
    8383</tr> 
    8484</table> 
    85 {% endblock %} 
     85{% endblock %} 
     86 No newline at end of file 
  • new file notebook/templates/registration.html

    diff -r 774d6bac891e -r 02971f9fca0d notebook/templates/registration.html
    - +  
     1{% extends "base.html" %} 
     2 
     3{% block title %}Sign up{% endblock %} 
     4 
     5{% block css %}registration{% endblock %} 
     6 
     7{% block content %} 
     8<div id="wrapper"> 
     9<h1>Sign up for a Sage Notebook account</h1> 
     10{% if error %} 
     11<h2 class="error_found">Error{{ error[1:] }}found</h2> 
     12{% endif %} 
     13<form method="POST" action="/register"> 
     14<ol> 
     15<li><h2>Create a username</h2> 
     16<p>Your username must start with a letter and be between 4 and 32 characters long. You may only use letters, numbers, underscores, and one dot (.).</p> 
     17<input type="text" name="username" value="{{ username }}" class="entry" /> 
     18{% if username_missing %} 
     19<p><span class="error">Error:</span> No username given</p> 
     20{% endif %} 
     21{% if username_taken %} 
     22<p><span class="error">Error:</span> Username already in use</p> 
     23{% endif %} 
     24{% if username_invalid %} 
     25<p><span class="error">Error:</span> Bad username</p> 
     26{% endif %} 
     27</li> 
     28<li><h2>Create a good password</h2> 
     29<p>Your password must be between 6 and 32 characters long. Your password can not contain your username nor spaces.</p> 
     30<input type="password" name="password" class="entry" /> 
     31{% if password_missing %} 
     32<p><span class="error">Error:</span> No password given</p> 
     33{% endif %} 
     34{% if password_invalid %} 
     35<p><span class="error">Error:</span> Bad password</p> 
     36{% endif %} 
     37</li> 
     38<li><h2>Re-type your password</h2> 
     39<input type="password" name="retype_password" class="entry" /> 
     40{% if passwords_dont_match or retype_password_missing %} 
     41<p><span class="error">Error:</span> Passwords didn't match</p> 
     42{% endif %} 
     43</li> 
     44{% if email or email_missing or email_invaild %} 
     45<li><h2>Enter your email address</h2> 
     46<p>Your email address is required for account confirmation and recovery. You will be emailed a confirmation link right after you successfully sign up.</p> 
     47<input type="text" name="email" value="{{ email_address }}" class="entry" /> 
     48{% if email_missing %} 
     49<p><span class="error">Error:</span> No email address given</p> 
     50{% endif %} 
     51{% if email_invalid %} 
     52<p><span class="error">Error:</span> Invalid email address</p> 
     53{% endif %} 
     54</li> 
     55{% endif %} 
     56</ol> 
     57<input type="submit" value="Create account" class="button" /> 
     58<input type="button" value="Cancel" style="margin-left:10px" onClick="parent.location='/'" class="button" /> 
     59</form> 
     60</div>  
     61{% endblock %} 
     62 No newline at end of file 
  • notebook/templates/yes_no.html

    diff -r 774d6bac891e -r 02971f9fca0d notebook/templates/yes_no.html
    a b  
    55{% block content %} 
    66<table align=center border=1 cellpadding=20 bgcolor="efefef"> 
    77<tr><td> 
    8 {{ mesg }} 
     8{{ message }} 
    99<br><br> 
    1010<font size=+3><a href="yes">Yes</a> or <a href="no">No</a>?</font> 
    1111</td></tr>