diff options
author | tilly-Q <nattilypigeonfowl@gmail.com> | 2014-05-14 11:51:13 -0400 |
---|---|---|
committer | tilly-Q <nattilypigeonfowl@gmail.com> | 2014-05-14 11:51:13 -0400 |
commit | 0d6550fb05c25e230706c719e3a476d1b1e670b9 (patch) | |
tree | 535c2dc43c12f03ccc03efcf1330de523820a9ef /mediagoblin/templates | |
parent | 65f5714118f5b59bc7f51c67ffc6ef23f2c603cc (diff) | |
download | mediagoblin-0d6550fb05c25e230706c719e3a476d1b1e670b9.tar.lz mediagoblin-0d6550fb05c25e230706c719e3a476d1b1e670b9.tar.xz mediagoblin-0d6550fb05c25e230706c719e3a476d1b1e670b9.zip |
Tweaked the metadata edit screen to run jsonschema validators against the data.
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/edit/metadata.html | 5 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/utils/wtforms.html | 34 |
2 files changed, 18 insertions, 21 deletions
diff --git a/mediagoblin/templates/mediagoblin/edit/metadata.html b/mediagoblin/templates/mediagoblin/edit/metadata.html index b5a52e5f..21eb27b1 100644 --- a/mediagoblin/templates/mediagoblin/edit/metadata.html +++ b/mediagoblin/templates/mediagoblin/edit/metadata.html @@ -69,7 +69,7 @@ <form action="" method="POST" id="metadata_form"> <!-- This table holds all the information about the media entry's metadata --> - <h3>{% trans %}Data{% endtrans %}</h3> + <h3>{% trans %}MetaData{% endtrans %}</h3> <table class="metadata_editor" id="metadata_list" > {{ wtforms_util.render_fieldlist_as_table_rows(form.media_metadata) }} </table> @@ -77,16 +77,13 @@ <!-- These are the buttons you use to control the form --> <table class="metadata_editor" id="buttons_bottom"> <tr> - <th></th> <td><input type=button value="{% trans %}Add new Row{% endtrans %}" class="button_action" id="add_new_metadata_row" /> </td> - <th></th> <td><input type=submit value="{% trans %}Update Metadata{% endtrans %}" class="button_action_highlight" /></td> </tr> <tr> - <th></th> <td><input type=button value="{% trans %}Clear empty Rows{% endtrans %}" class="button_action" id="clear_empty_rows" /></td> </tr> diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html index c83d53f1..7e16708c 100644 --- a/mediagoblin/templates/mediagoblin/utils/wtforms.html +++ b/mediagoblin/templates/mediagoblin/utils/wtforms.html @@ -77,20 +77,21 @@ {% macro render_form_as_table_row(form) %} <tr> {%- for field in form %} - <th>{{ render_label_p(field) }}</th> <td class="form_field_input"> {{field}} - {%- if field.errors -%} - <br /> - <ul class="errors"> - {% for error in field.errors %} - <li>{{error}}</li> - {%- endfor %} - </ul> - {%- endif -%} </td> {%- endfor %} </tr> + <tr> + {%- for field in form %} + {% for error in field.errors %} + <tr> + <td> + <p class="form_field_error">{{error}}</p> + </td> + </tr> + {%- endfor %} + {%- endfor %} {%- endmacro %} {% macro render_field_as_table_row(field) %} @@ -98,16 +99,15 @@ <th>{{ field.label.text }}</th> <td> {{field}} - {% if field.errors %} - <br /> - <ul class="errors"> - {% for error in field.errors %} - <li>{{error}}</li> - {% endfor %} - </ul> - {% endif %} </td> </tr> + {% for error in field.errors %} + <tr> + <td> + <p class="form_field_error">{{error}}</p> + </td> + </tr> + {%- endfor %} {% endmacro %} {% macro render_fieldlist_as_table_rows(fieldlist) %} |