changeset 159:a84d782f38e9

Target/Comment retained on wrong textcha during Copy
author Akash Sinha <akash2607@gmail.com>
date Tue, 22 Mar 2011 01:40:34 +0530
parents eaa4c984d8f3
children 8b811bdef521
files MoinMoin/apps/frontend/views.py MoinMoin/templates/copy.html
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Mon Mar 21 23:53:00 2011 +0530
+++ b/MoinMoin/apps/frontend/views.py	Tue Mar 22 01:40:34 2011 +0530
@@ -354,7 +354,7 @@
     if request.method == 'GET':
         return render_template(item.copy_template,
                                item=item, item_name=item_name,
-                               form=form,
+                               form=form, target=item.name,
                                gen=make_generator(),
                               )
     if request.method == 'POST':
@@ -365,7 +365,7 @@
             if not valid:
                 return render_template(item.copy_template,
                                        item=item, item_name=item_name,
-                                       form=form,
+                                       form=form, target=target,
                                        gen=make_generator(),
                                        comment=comment,
                                       )
--- a/MoinMoin/templates/copy.html	Mon Mar 21 23:53:00 2011 +0530
+++ b/MoinMoin/templates/copy.html	Tue Mar 22 01:40:34 2011 +0530
@@ -6,10 +6,10 @@
 <form action="{{ url_for('frontend.copy_item', item_name=item.name) }}" method="POST" enctype="multipart/form-data">
     <dl>
         <dt><label for="target">{{ _("Target") }}</label></dt>
-        <dd><input type="text" id="target" name="target" size="80" maxlength="200" value="{{ item.name }}" /></dd>
+        <dd><input type="text" id="target" name="target" size="80" maxlength="200" value="{{ target }}" /></dd>
         
         <dt><label for="comment">{{ _("Comment") }}</label></dt>
-        <dd><input type="text" id="comment" name="comment" size="80" maxlength="200" value="" /></dd>
+        <dd><input type="text" id="comment" name="comment" size="80" maxlength="200" value="{{ comment }}" /></dd>
     </dl>
 
     <input class="button" type="submit" name="button_ok" value="{{ _('Copy') }}" />