<div id="edit-classe" v-cloak>

    <div class="container">
        <div class="display-3"><%= __('Edit Group') %></div>
        <em class="text-muted"><%= classe.id %></em>
        <hr>

        <div class="btn-group">

            <a href="/classe/edit-classe/new" class="btn btn-primary m-1"><%= __('Create new') %></a>
            <a href="/classe/search-classe" class="btn btn-primary m-1"><%= __('Cancel') %></a>
        </div>

        <message id="msg" v-on:close="cleanMessage()" :severity="message.severity" :summary="message.summary"
                 :details="message.details"></message>

        <label class="mt-2" for="name"><%= __(`Name`) %></label>
        <input type="text" id="name" name="name" class="form-control" v-model="classe.name">

        <label for="local"><%= __(`Local`) %></label>
        <input type="text" id="local" name="local" class="form-control" v-model="classe.local">

        <label for="church"><%= __(`This class/group belongs to`) %></label>
        <span id="church" class="form-control"><%= classe.church?.fullName %> (<%= classe.church?.tipo %>)</span>

        <button class="btn btn-primary mt-2"><%= __('Save') %></button>

        <hr>

        <div class="display-6"><%= __('Available') %> <%= __('Church') %>s</div>

        <ul class="list-group">
            <li class="list-group-item" v-for="church in churchs">
                <button class="btn btn-primary btn-sm" @click="selectChurch(church)"><em class="fa fa-plus"></em></button>
                {{church.fullName}} ({{church.tipo}})
            </li>
        </ul>


    </div>

</div>
<%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %>
