| <form method="{{method}}" action="{{action}}" enctype="multipart/form-data" id="new_forum_form"> |
| <input type="hidden" name="add_forum.app_id" value="{{app and app.config._id}}"> |
| <div class="grid-6"> |
| <label class="cr">Title:</label> |
| <input type="text" name="add_forum.name" style="width:90%"/> |
| </div> |
| <div class="grid-6"> |
| <label class="cr">Short Name:</label> |
| <input type="text" name="add_forum.shortname" style="width:90%"/> |
| </div> |
| <div class="grid-7"> |
| <label class="cr">Summary:</label> |
| <input type="text" name="add_forum.description" style="width:90%"/> |
| </div> |
| <div class="grid-6"> |
| <label class="cr">Monitoring Email:</label> |
| <input type="text" name="add_forum.monitoring_email" style="width:90%"/> |
| </div> |
| <div class="grid-6"> |
| <label class="cr">Developer Only:</label> |
| <input type="checkbox" name="add_forum.members_only"{% if value and value['members_only'] %} checked{% endif %}> |
| </div> |
| <div class="grid-7"> |
| <label class="cr">Anonymous Posts:</label> |
| <input type="checkbox" name="add_forum.anon_posts"{% if value and value['anon_posts'] %} checked{% endif %}> |
| </div> |
| <div style="clear:both"> </div> |
| <div class="grid-19"> |
| <input type="submit" id="new_forum.create" name="new_forum.create" value="Save"> |
| <a id="add_forum_cancel" class="btn link">Cancel</a> |
| </div> |
| </form> |
| <script type="text/javascript"> |
| {% for field in widget.fields %} |
| {% set ctx=widget.context_for(field) %} |
| {% if ctx.errors and field.show_errors -%} |
| window.onload = function(){$('#messages').notify("{{ctx.errors}}", { |
| title: 'Error', |
| status: 'error' |
| });}; |
| {%- endif %} |
| {% endfor %} |
| </script> |