Skip to content

Commit

Permalink
Small improvements of edit view
Browse files Browse the repository at this point in the history
  • Loading branch information
oz123 committed May 23, 2014
1 parent 0bc0c1c commit 01db5da
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/webui.py
Expand Up @@ -63,10 +63,10 @@
"""

edit_node_tmplt = """
<form action="/edit/" method="POST">
Username: <input type="text" name="username"><br>
Password: <input type="password" name="lastname"><br>
Repeat Password: <input type="password" name="lastname"><br>
<form action="/edit/{{node._id}}" method="POST">
Username: <input type="text" name="username" value="{{node.username}}"><br>
Password: <input type="password" name="password" value="{{node.password}}"><br>
Repeat Password: <input type="password" name="password" value="{{node.password}}"><br>
Notes: <input type="text" name="notes"><br>
Tags: <input type="text" name="tags"><br>
<input type="submit" value="Save edits">
Expand Down Expand Up @@ -104,7 +104,9 @@ def new():

@route('/edit/:no', method=['GET', 'POST'])
def edit_node(no):
output = template(edit_node_tmplt,)
global DB
node = DB.getnodes([no])[0]
output = template(edit_node_tmplt, node=node)
return output


Expand Down

0 comments on commit 01db5da

Please sign in to comment.