← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rvb/maas/maas-fix-forms-bug-941754 into lp:maas

 

Raphaël Badin has proposed merging lp:~rvb/maas/maas-fix-forms-bug-941754 into lp:maas with lp:~rvb/maas/maas-remove-tabs2 as a prerequisite.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #941754 in Maas: "Update forms to new html"
  https://bugs.launchpad.net/maas/+bug/941754

For more details, see:
https://code.launchpad.net/~rvb/maas/maas-fix-forms-bug-941754/+merge/94804

This branch change the way we display forms to use the new form display.

Drive-by fixes:
- get rid of the unused file: src/maasserver/templates/maasserver/node_form.html.
- fix indentation.
-- 
https://code.launchpad.net/~rvb/maas/maas-fix-forms-bug-941754/+merge/94804
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/maas-fix-forms-bug-941754 into lp:maas.
=== removed file 'src/maasserver/templates/maasserver/node_form.html'
--- src/maasserver/templates/maasserver/node_form.html	2012-02-09 00:42:27 +0000
+++ src/maasserver/templates/maasserver/node_form.html	1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-{% extends "maasserver/base.html" %}
-
-{% block nav-active-nodes %}active{% endblock %}
-{% block page-title %}Add node{% endblock %}
-
-{% block content %}
-  <h2>Add node to this cluster</h2>
-    <form action="." method="post">
-      <table>
-        {{ form.as_table }}
-        <tr class="submit-row">
-          <td></td>
-          <td><input type="submit" value="+Add node" /></td></tr>
-      </table>
-    </form>
-{% endblock %}
-

=== modified file 'src/maasserver/templates/maasserver/settings.html'
--- src/maasserver/templates/maasserver/settings.html	2012-02-28 06:59:18 +0000
+++ src/maasserver/templates/maasserver/settings.html	2012-02-28 06:59:18 +0000
@@ -45,7 +45,7 @@
                 <img src="{{ STATIC_URL }}img/edit.png" />
               </a>
               {% if user != user_item %}
-          	    <a title="Delete user {{ user_item.username }}"
+                <a title="Delete user {{ user_item.username }}"
                    class="delete-user"
                    href="{% url 'accounts-del' user_item.username %}">
                   <img src="{{ STATIC_URL }}img/delete.png" />
@@ -63,7 +63,9 @@
       </table>
       <br />
       <a class="button" href="{% url 'accounts-add' %}">
-        <button class="button right">Add user</button></a>
-    </div>
+        <button class="button right">Add user</button>
+      </a>
+      <div class="clear" />
+    </div>      
   </div>
 {% endblock %}

=== modified file 'src/maasserver/templates/maasserver/user_add.html'
--- src/maasserver/templates/maasserver/user_add.html	2012-02-16 15:58:31 +0000
+++ src/maasserver/templates/maasserver/user_add.html	2012-02-28 06:59:18 +0000
@@ -5,10 +5,13 @@
 {% block page-title %}Add user{% endblock %}
 
 {% block content %}
-    <form action="." method="post">
-      {{ form.as_p }}
-      <input type="submit" value="Add user" />
+  <form action="." method="post">
+    <ul>
+    {% for field in form %}
+      {% include "maasserver/form_field.html" %}
+    {% endfor %}
+    </ul>
+    <input type="submit" value="Add user" />
       &nbsp;&nbsp;<a class="link-button" href="{% url 'settings' %}">Cancel</a>
-    </form>
+  </form>
 {% endblock %}
-

=== modified file 'src/maasserver/templates/maasserver/user_edit.html'
--- src/maasserver/templates/maasserver/user_edit.html	2012-02-15 12:08:42 +0000
+++ src/maasserver/templates/maasserver/user_edit.html	2012-02-28 06:59:18 +0000
@@ -5,10 +5,13 @@
 {% block page-title %}Edit User{% endblock %}
 
 {% block content %}
-    <form action="." method="post">
-      {{ form.as_p }}
-      <input type="submit" value="Save user" />
+  <form action="." method="post">
+    <ul>
+    {% for field in form %}
+      {% include "maasserver/form_field.html" %}
+    {% endfor %}
+    </ul>
+    <input type="submit" value="Save user" />
       &nbsp;&nbsp;<a class="link-button" href="{% url 'settings' %}">Cancel</a>
-    </form>
+  </form>
 {% endblock %}
-