_position_form_modal.html 3.16 KB
Newer Older
Nicolas Joyard's avatar
Nicolas Joyard committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{% load i18n %}
{% load bootstrap3 %}

<div class="modal fade" id="add-position-form" tabindex="-1" role="dialog" aria-labelledby="btn-position">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <form method="post" action="">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="{% trans 'Close' %}"><span aria-hidden="true">&times;</span></button>

          <h4 class="modal-title">{% trans "Add a representative public position" %}</h4>

        </div>

        <div class="modal-body">
          <div class="row">
            <div class="col-sm-12">
              <div class="well well-sm text-justify">{% include "text/position_info.html" %}</div>
19
            </div>
Nicolas Joyard's avatar
Nicolas Joyard committed
20
21
22
23
          </div>

          <div class="row">
            <div class="col-sm-6">
24
              {% bootstrap_field position_form.representatives layout='horizontal' %}
Nicolas Joyard's avatar
Nicolas Joyard committed
25
26
              {% bootstrap_field position_form.datetime layout='horizontal' %}
              {% bootstrap_field position_form.link layout='horizontal' %}
27
              {% bootstrap_field position_form.title layout='horizontal'  %}
28
            </div>
Nicolas Joyard's avatar
Nicolas Joyard committed
29
30

            <div class="col-sm-6">
31
              {% bootstrap_field position_form.kind layout='horizontal' %}
Nicolas Joyard's avatar
Nicolas Joyard committed
32
              {% bootstrap_field position_form.themes layout='horizontal' %}
33
            </div>
Nicolas Joyard's avatar
Nicolas Joyard committed
34
35
36
37
          </div>

          <div class="row">
            <div class="col-sm-12">
38

Nicolas Joyard's avatar
Nicolas Joyard committed
39
40
41
42
43
44
45
46
47
48
49
              <div class="col-sm-12">
                {% bootstrap_field position_form.text %}
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          {% bootstrap_form_errors position_form %}

          <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
          <button type="submit" class="btn btn-primary">{% trans "Submit public position" %}</button>
50
        </div>
Nicolas Joyard's avatar
Nicolas Joyard committed
51
      </form>
52
    </div>
Nicolas Joyard's avatar
Nicolas Joyard committed
53
  </div>
54
</div>
Nicolas Joyard's avatar
Nicolas Joyard committed
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95

{% if position_form.errors %}
  <script>
    $(function() {
       $("#add-position-form").modal("show");
    });
  </script>
{% endif %}

{% if position_created %}
  <div class="modal fade" id="add-position-success" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="{% trans 'Close' %}"><span aria-hidden="true">&times;</span></button>

          <h4 class="modal-title">{% trans "Add a representative public position" %}</h4>
        </div>

        <div class="modal-body">
        </div>

        <div class="modal-footer">

          <div class="row">
            <div class="col-sm-12">
              <div role="alert" class="alert alert-success text-justify">{% trans "Thanks! The position was submitted and will be reviewed shortly." %}</div>
            </div>
          </div>

          <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
        </div>
      </div>
    </div>
  </div>

  <script>
    $(function() {
       $("#add-position-success").modal("show");
    });
  </script>
96
{% endif %}