mairin has proposed merging lp:~mairin/postorius/mairin-3 into lp:postorius.

Requested reviews:
  Mailman Coders (mailman-coders)

For more details, see:
https://code.launchpad.net/~mairin/postorius/mairin-3/+merge/189480

Revamp of new domain creation form 

removed default django automatic {{ form.as_p }} and replaced with cleaner, 
bootstrappy form with nice alignment, etc.

-- 
https://code.launchpad.net/~mairin/postorius/mairin-3/+merge/189480
Your team Mailman Coders is requested to review the proposed merge of 
lp:~mairin/postorius/mairin-3 into lp:postorius.
=== modified file 'src/postorius/templates/postorius/domain_new.html'
--- src/postorius/templates/postorius/domain_new.html	2013-05-31 02:21:03 +0000
+++ src/postorius/templates/postorius/domain_new.html	2013-10-05 18:58:58 +0000
@@ -4,11 +4,53 @@
 
 {% block main %}
     {% include 'postorius/menu/settings_nav.html' %}
-    <h1>{% trans "Add a new Domain" %}</h1>
-    <form action="{% url 'domain_new' %}" method="post" class="well"> {% csrf_token %}
-        {{ form.as_p }}
-        <div class="field">
-            <button class="btn btn-success" type="submit">{% trans "Create Domain" %}</button>
-        </div>
-    </form>
+    
+    <form action="{% url 'domain_new' %}" method="post" class="well form-horizontal"> {% csrf_token %}
+    {{ form.non_field_errors }}
+    <fieldset>
+	<legend>Add a new Domain</legend>
+	
+	<div class="control-group">
+	    {{ form.mail_host.errors }}
+	    <label for="id_mail_host" class="control-label">Mail Host:</label> 
+	    <div class="controls">
+		{{ form.mail_host}}
+		<p class="help-block"><strong>Example:</strong> domain.org</p>  
+	    </div>
+	</div>
+	
+	<div class="control-group">
+	    {{ form.web_host.errors }}
+	    <label for="id_web_host" class="control-label">Web Host:</label> 
+	    <div class="controls">
+		{{ form.web_host}}
+		<p class="help-block"><strong>Example:</strong> www.domain.org</p>  
+	    </div>
+	</div>
+	
+	<div class="control-group">
+	    {{ form.description.errors }}
+	    <label for="id_description" class="control-label">Description:</label> 
+	    <div class="controls">
+		{{ form.description}}
+		<p class="help-block"><strong>Example:</strong> Test lists will live on this domain.</p>  
+	    </div>
+	</div>
+	
+	<div class="control-group">
+	    {{ form.contact_address.errors }}
+	    <label for="id_contact_address" class="control-label">Contact Address:</label> 
+	    <div class="controls">
+		{{ form.contact_address}}
+		<p class="help-block"><strong>Example:</strong> [email protected]</p>  
+	    </div>
+	</div>
+	
+	<div class="form-actions">
+	    <button class="btn btn-success btn-primary" type="submit">Create Domain</button>
+	</div>
+	
+    </fieldset>
+</form>
+    
 {% endblock main %}

=== modified file 'src/postorius/templates/postorius/users/new.html'
--- src/postorius/templates/postorius/users/new.html	2013-10-05 16:17:33 +0000
+++ src/postorius/templates/postorius/users/new.html	2013-10-05 18:58:58 +0000
@@ -7,11 +7,44 @@
     {% if user.is_superuser %}
         {% users_nav 'user_new' 'Create User' %}
     {% endif %}
+ 
+    <form action="{% url 'user_new' %}" method="post" class="well form-horizontal"> {% csrf_token %}
+    {{ form.non_field_errors }}
+    <fieldset>
+	<legend>Create a New User</legend>
+	
+	<div class="control-group">
+	    {{ form.display_name.errors }}
+	    <label for="id_display_name" class="control-label">Username:</label> 
+	    <div class="controls">{{ form.display_name}}</div>
+	</div>
 
-    <form action="{% url 'user_new' %}" method="post" class="well"> {% csrf_token %}
-        <div class="field">
-	    {{ form.as_p }}
-            <button class="btn btn-success" type="submit">{% trans "Create User" %}</button>
-        </div>
-    </form>
+	<div class="control-group">
+	    {{ form.email.errors }}
+	    <label for="id_email" class="control-label">Email address:</label>
+	    <div class="controls">{{ form.email }}</div>
+	</div>
+	    
+	<div class="control-group">
+	    {{ form.password.errors }}
+	    <label for="id_password" class="control-label">Password:</label>
+	    <div class="controls">{{ form.password }}</div>
+	</div>
+	
+	<div class="control-group">
+	    {{ form.password_repeat.errors }}
+	    <label for="id_password_repeat" class="control-label">Repeat password:</label>
+	    <div class="controls">
+		{{ form.password_repeat }}
+		<p class="help-block">This must match the password typed above so we can be sure we've got the right password.</p>  
+	    </div>
+	</div>
+	
+	<div class="form-actions">
+	    <button class="btn btn-success btn-primary" type="submit">Create User</button>
+	</div>
+	
+    </fieldset>
+</form>
+    
 {% endblock main %}

_______________________________________________
Mailman-coders mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-coders

Reply via email to