project_form_generic.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {% extends "layout.html" %}
  2. {% import "form_macros.html" as fm %}
  3. {% block container %}
  4. {% if isp %}
  5. <ul class="nav nav-tabs">
  6. <li role="presentation" class="active"><a href="#">{{ _("Manual updates") }}</a></li>
  7. <li role="presentation"><a href="{{ url_for('.edit_project_auto_update', projectid=isp.id) }}">{{ _("Automatic updates (isp.json)") }}</a></li>
  8. </ul>
  9. {% endif %}
  10. <div class="row">
  11. <div class="span11 well">
  12. <form method="post" class="form-horizontal">
  13. {{ form.csrf_token }}
  14. <fieldset>
  15. <legend>{{ page_title }}</legend>
  16. {{ fm.render_field(form.tech_email) }}
  17. <hr />
  18. {{ fm.render_field(form.name) }}
  19. {{ fm.render_field(form.shortname) }}
  20. {{ fm.render_field(form.description) }}
  21. {{ fm.render_field(form.logo_url) }}
  22. {{ fm.render_field(form.website) }}
  23. <div class="control-group{% if form.other_websites.errors %} error{% endif %}">
  24. <label class="control-label" for="coordinates">{{ form.other_websites.label.text }}</label>
  25. <div class="controls">
  26. <ul class="fieldlist">
  27. {% for c in form.other_websites -%}
  28. <li>{{ c() }}{{ fm.display_errors(c.flattened_errors) }}</li>
  29. {%- endfor %}
  30. </ul>
  31. {% if form.other_websites.description.1 -%}
  32. <span class="help-block">{{ form.other_websites.description.1|safe }}</span>
  33. {%- endif %}
  34. </div>
  35. </div>
  36. {{ fm.render_field(form.contact_email) }}
  37. {{ fm.render_field(form.main_ml) }}
  38. {{ fm.render_field(form.creation_date) }}
  39. {{ fm.render_field(form.step) }}
  40. {{ fm.render_field(form.member_count, class_="input-small") }}
  41. {{ fm.render_field(form.subscriber_count, class_="input-small") }}
  42. {{ fm.render_field(form.chatrooms, class="fieldlist") }}
  43. <div class="control-group required{% if form.covered_areas.errors %} error{% endif %}">
  44. <label class="control-label" for="coordinates">{{ form.covered_areas.label.text }}</label>
  45. <div class="controls">
  46. <ul class="fieldlist">
  47. {% for c in form.covered_areas -%}
  48. <li>{{ c() }}{{ fm.display_errors(c.flattened_errors) }}</li>
  49. {%- endfor %}
  50. </ul>
  51. {% if form.covered_areas.description.1 -%}
  52. <span class="help-block">{{ form.covered_areas.description.1|safe }}</span>
  53. {%- endif %}
  54. </div>
  55. </div>
  56. <div class="control-group{% if form.latitude.errors or form.longitude.errors %} error{% endif %}">
  57. <label class="control-label" for="coordinates">{{ _("Coordinates") }}</label>
  58. <div class="controls">
  59. <div class="input-prepend input-append input-middle">
  60. {{ form.latitude(class="input-small", placeholder=form.latitude.label.text|capitalize) }}
  61. <span class="add-on">:</span>
  62. {{ form.longitude(class="input-small", placeholder=form.longitude.label.text|capitalize) }}
  63. </div>
  64. {{ fm.display_errors(form.latitude.errors+form.longitude.errors) }}
  65. {%- if form.latitude.description.1 -%}
  66. <span class="help-block">{{ form.latitude.description.1|safe }}</span>
  67. {%- endif %}
  68. </div>
  69. </div>
  70. <div class="form-actions">
  71. <input type="submit" class="btn btn-primary" value="{{ _("Submit") }}" />
  72. <input type="reset" class="btn" value="{{ _("Cancel") }}" />
  73. </div>
  74. </fieldset>
  75. </form>
  76. </div>
  77. </div>
  78. {%- endblock %}