~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/settings/__init__.py

  • Committer: mattgiuca
  • Date: 2008-02-25 01:17:22 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:560
settings: Python code generates all of the HTML for the static page.
The JavaScript makes a call to get the data but doesn't yet populate the page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    req.content_type = "text/html"
32
32
    # These files don't really exist - just a test of our linking
33
33
    # capabilities
34
 
    req.styles = []
35
 
    req.scripts = ["media/settings/settings.js"]
 
34
    req.styles = [
 
35
        "media/settings/settings.css",
 
36
    ]
 
37
    req.scripts = [
 
38
        "media/settings/settings.js",
 
39
        "media/common/json2.js",
 
40
        "media/common/util.js",
 
41
    ]
36
42
    req.write_html_head_foot = True     # Have dispatch print head and foot
37
43
 
38
44
    # Start writing data
39
 
    req.write('<div id="ivle_padding">\n')
40
 
    req.write("<p>Settings</p>\n")
41
 
    req.write("</div>\n")
 
45
    req.write("""<div id="ivle_padding">
 
46
 
 
47
  <h2>User Profile</h2>
 
48
  <p><span id="fullname"></span> (<b><span id="login"></span></b>)</p>
 
49
  <div id="role"></div>
 
50
  <h3>Change settings</h3>
 
51
  <table>
 
52
    <tr><td>Display name:</td><td><input type="text" name="nick" id="nick"
 
53
        size="40" /></td></tr>
 
54
    <tr><td>Email address:</td><td><input type="text" name="email" id="email"
 
55
        size="40" /></td></tr>
 
56
  </table>
 
57
  <h3>Change password</h3>
 
58
  <table>
 
59
    <tr><td>New password:</td><td><input type="password"
 
60
        name="newpass" id="newpass" size="40" /></td></tr>
 
61
    <tr><td>Retype password:</td><td><input type="password"
 
62
        name="repeatpass" id="repeatpass" size="40" /></td></tr>
 
63
  </table>
 
64
  <p>Please type your new password twice, to make sure you remember it.</p>
 
65
  <input value="Save" onclick="save_settings()" type="button" />
 
66
  <input value="Revert" onclick="populate()" type="button" />
 
67
 
 
68
  <div id="notices"></div>
 
69
</div>
 
70
""")