{{/*
This file is part of SystemTestPortal.
Copyright (C) 2017  Institute of Software Technology, University of Stuttgart

SystemTestPortal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

SystemTestPortal is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with SystemTestPortal.  If not, see <http://www.gnu.org/licenses/>.
*/}}

{{define "remove-abort-modal"}}
<div class="modal fade" id="remove-abort-modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Removal Warning</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>

            <div class="modal-body">
                <p>{{T "You have selected a member with active assignments." .}}</p>
                <p>{{T "Do you really wish to remove them from the project?" .}}</p>
                <p>{{T "Members with active assignments:" .}} </p>
                <ul>
                    {{range .DangerousUserNames}}
                            <li> {{.}} </li>
                    {{end}}
                </ul>
            </div>
            <div class="modal-footer">
                <button id="buttonRemoveConfirm" type="button" class="btn btn-danger" data-dismiss="modal">{{T "Remove" .}}</button>
                <button id="buttonRemoveCancel" type="button" class="btn btn-secondary" data-dismiss="modal">{{T "Cancel" .}}</button>
            </div>
        </div>
    </div>
</div>

<script>
 dangerousMembers = [
 {{range $index, $name := .DangerousUserNames}}
    {{if eq $index 0}}
        {{$name}}
    {{else}}
        ,  {{$name}}
    {{end}}
 {{end}}
 ];

</script>

{{end}}