• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

Révision36f02a9f3e7b31282bb74732481af7b0aa425441 (tree)
l'heure2011-03-01 01:00:36
AuteurJenny Steele <jsteele@geek...>
CommiterJenny Steele

Message de Log

[#1528] Cleanup for oauth page

Signed-off-by: Jenny Steele <jsteele@geek.net>

Change Summary

Modification

--- a/Allura/allura/lib/widgets/forms.py
+++ b/Allura/allura/lib/widgets/forms.py
@@ -17,6 +17,7 @@ class ForgeForm(ew.SimpleForm):
1717 defaults=dict(
1818 ew.SimpleForm.defaults,
1919 submit_text='Save',
20+ style='standard',
2021 method='post',
2122 enctype=None)
2223
--- a/Allura/allura/lib/widgets/oauth_widgets.py
+++ b/Allura/allura/lib/widgets/oauth_widgets.py
@@ -11,6 +11,7 @@ from .forms import ForgeForm
1111
1212 class OAuthApplicationForm(ForgeForm):
1313 submit_text='Register new applicaiton'
14+ style='wide'
1415 class fields(ew_core.NameList):
1516 application_name =ew.TextField(label='Application Name',
1617 validator=V.UniqueOAuthApplicationName())
--- a/Allura/allura/templates/widgets/forge_form.html
+++ b/Allura/allura/templates/widgets/forge_form.html
@@ -1,27 +1,31 @@
11 <form method="{{method}}"
22 {% if enctype %}enctype="{{enctype}}"{% endif %}
33 action="{{action}}">
4+ {% set extra_width = 0 %}
5+ {% if style == 'wide' %}
6+ {% set extra_width = 4 %}
7+ {% endif %}
48 {% 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>
610 {% endif %}
711 {% for field in widget.fields %}
812 {% set ctx=widget.context_for(field) %}
913 {% if field.field_type != 'hidden' %}
1014 {% 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>
1216 {%- endif %}
1317 {% if field.show_label and field.label %}
1418 <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>
1620 {% else %}
17- <div class="grid-19">{{field.display(**ctx)}}</div>
21+ <div class="grid-{{19 + extra_width}}">{{field.display(**ctx)}}</div>
1822 {% endif %}
1923 {% else %}
2024 {{field.display(**ctx)}}
2125 {% endif %}
2226 {% endfor %}
2327 <label class="grid-4">&nbsp;</label>
24- <div class="grid-15">
28+ <div class="grid-{{15 + extra_width}}">
2529 {% for b in buttons %}
2630 {{b.display()}}
2731 {% endfor %}