<div id="{% block modal_id %}{% endblock %}" class="{% block modal_class %}{% if hide %}modal hide{% else %}static_page{% endif %}{% endblock %}">
  <div class="modal-header">
    {% if hide %}<a href="#" class="close" data-dismiss="modal">&times;</a>{% endif %}
    <h3>{% block modal-header %}{% endblock %}</h3>
  </div>
  {% if table %}
  <div class="modal-body">
  {{ table.render }}
  </div>
  <hr />
  {% endif %}
  <form id="{% block form_id %}{% endblock %}"
        ng-controller="{% block ng_controller %}DummyCtrl{% endblock %}"
        name="{% block form_name %}{% endblock %}"
        autocomplete="{% block autocomplete %}{% endblock %}"
        class="{% block form_class %}{% endblock %}"
        action="{% block form_action %}{% endblock %}"
        method="{% block form-method %}POST{% endblock %}"
        {% if add_to_field %}data-add-to-field="{{ add_to_field }}"{% endif %} {% block form_attrs %}{% endblock %}>{% csrf_token %}
    <div class="modal-body clearfix">
    {% block modal-body %}
        <fieldset>
        {% include "horizon/common/_form_fields.html" %}
        </fieldset>
    {% endblock %}
    </div>
    <div class="modal-footer">{% block modal-footer %}{% endblock %}</div>
  </form>
</div>
{% block modal-js %}
{% endblock %}
<div id="{% block modal_id %}{% endblock %}" class="{% block modal_class %}{% if hide %}modal hide{% else %}static_page{% endif %}{% endblock %}">
  <div class="modal-header">
    {% if hide %}<a href="#" class="close" data-dismiss="modal">&times;</a>{% endif %}
    <h3>{% block modal-header %}{% endblock %}</h3>
  </div>
  {% if table %}
  <div class="modal-body">
  {{ table.render }}
  </div>
  <hr />
  {% endif %}
  <form id="{% block form_id %}{% endblock %}"
        ng-controller="{% block ng_controller %}DummyCtrl{% endblock %}"
        name="{% block form_name %}{% endblock %}"
        autocomplete="{% block autocomplete %}{% endblock %}"
        class="{% block form_class %}{% endblock %}"
        action="{% block form_action %}{% endblock %}"
        method="{% block form-method %}POST{% endblock %}"
        {% if add_to_field %}data-add-to-field="{{ add_to_field }}"{% endif %} {% block form_attrs %}{% endblock %}>{% csrf_token %}
    <div class="modal-body clearfix">
    {% block modal-body %}
        <fieldset>
        {% include "horizon/common/_form_fields.html" %}
        </fieldset>
    {% endblock %}
    </div>
    <div class="modal-footer">{% block modal-footer %}{% endblock %}</div>
  </form>
{% block modal-js %}
{% endblock %}
</div>

Fix adding members to a group
Fix adding members to a group

Somehow data string equal to '<div class="modal hide">...</div>
<script>...</script>' is not appended correctly to '<div
id="modal_wrapper">...</div>', but works fine if <script> node is
placed into '<div class="modal hide">...</div>'.

Change-Id: I0f4ecca740e86f9e328843ba39b2bc1b5ce35565
Closes-Bug: #1338522
