allura
Révision | 36f02a9f3e7b31282bb74732481af7b0aa425441 (tree) |
---|---|
l'heure | 2011-03-01 01:00:36 |
Auteur | Jenny Steele <jsteele@geek...> |
Commiter | Jenny Steele |
[#1528] Cleanup for oauth page
Signed-off-by: Jenny Steele <jsteele@geek.net>
@@ -17,6 +17,7 @@ class ForgeForm(ew.SimpleForm): | ||
17 | 17 | defaults=dict( |
18 | 18 | ew.SimpleForm.defaults, |
19 | 19 | submit_text='Save', |
20 | + style='standard', | |
20 | 21 | method='post', |
21 | 22 | enctype=None) |
22 | 23 |
@@ -11,6 +11,7 @@ from .forms import ForgeForm | ||
11 | 11 | |
12 | 12 | class OAuthApplicationForm(ForgeForm): |
13 | 13 | submit_text='Register new applicaiton' |
14 | + style='wide' | |
14 | 15 | class fields(ew_core.NameList): |
15 | 16 | application_name =ew.TextField(label='Application Name', |
16 | 17 | validator=V.UniqueOAuthApplicationName()) |
@@ -1,27 +1,31 @@ | ||
1 | 1 | <form method="{{method}}" |
2 | 2 | {% if enctype %}enctype="{{enctype}}"{% endif %} |
3 | 3 | action="{{action}}"> |
4 | + {% set extra_width = 0 %} | |
5 | + {% if style == 'wide' %} | |
6 | + {% set extra_width = 4 %} | |
7 | + {% endif %} | |
4 | 8 | {% if errors and not errors.iteritems and show_errors %} |
5 | - <div class="grid-19"><span {{widget.j2_attrs({'class':error_class})}}>{{errors}}</span></div> | |
9 | + <div class="grid-{{19 + extra_width}}"><span {{widget.j2_attrs({'class':error_class})}}>{{errors}}</span></div> | |
6 | 10 | {% endif %} |
7 | 11 | {% for field in widget.fields %} |
8 | 12 | {% set ctx=widget.context_for(field) %} |
9 | 13 | {% if field.field_type != 'hidden' %} |
10 | 14 | {% if ctx.errors and field.show_errors -%} |
11 | - <div class="grid-19"><span {{widget.j2_attrs({'class':error_class})}}>{{ctx.errors}}</span></div> | |
15 | + <div class="grid-{{19 + extra_width}}"><span {{widget.j2_attrs({'class':error_class})}}>{{ctx.errors}}</span></div> | |
12 | 16 | {%- endif %} |
13 | 17 | {% if field.show_label and field.label %} |
14 | 18 | <label for="{{ctx.id}}" class="grid-4">{{field.label}}:</label> |
15 | - <div class="grid-15">{{field.display(**ctx)}}</div> | |
19 | + <div class="grid-{{15 + extra_width}}">{{field.display(**ctx)}}</div> | |
16 | 20 | {% else %} |
17 | - <div class="grid-19">{{field.display(**ctx)}}</div> | |
21 | + <div class="grid-{{19 + extra_width}}">{{field.display(**ctx)}}</div> | |
18 | 22 | {% endif %} |
19 | 23 | {% else %} |
20 | 24 | {{field.display(**ctx)}} |
21 | 25 | {% endif %} |
22 | 26 | {% endfor %} |
23 | 27 | <label class="grid-4"> </label> |
24 | - <div class="grid-15"> | |
28 | + <div class="grid-{{15 + extra_width}}"> | |
25 | 29 | {% for b in buttons %} |
26 | 30 | {{b.display()}} |
27 | 31 | {% endfor %} |