group-configuration-editor.underscore 4.07 KB
Newer Older
1
<form class="collection-edit-form group-configuration-edit-form">
2 3 4 5 6
    <% if (error && error.message) { %>
        <div class="group-configuration-edit-error message message-status message-status error is-shown" name="group-configuration-edit-error">
          <%= gettext(error.message) %>
        </div>
    <% } %>
7 8
    <div class="wrapper-form">
        <fieldset class="collection-fields group-configuration-fields">
9
            <legend class="sr"><%= gettext("Group Configuration information") %></legend>
10
            <div class="input-wrap field text required add-collection-name add-group-configuration-name <% if(error && error.attributes && error.attributes.name) { print('error'); } %>">
11 12 13 14 15 16 17 18
                <label for="group-configuration-name-<%= uniqueId %>"><%= gettext("Group Configuration Name") %></label><%
                if (!_.isUndefined(id)) {
                    %><span class="group-configuration-id">
                        <span class="group-configuration-label"><%= gettext('Group Configuration ID') %></span>
                        <span class="group-configuration-value"><%= id %></span>
                    </span><%
                }
                %>
19
                <input id="group-configuration-name-<%= uniqueId %>" class="collection-name-input input-text" name="group-configuration-name" type="text" placeholder="<%= gettext("This is the Name of the Group Configuration") %>" value="<%= name %>">
20 21 22 23 24 25 26 27
                <span class="tip tip-stacked"><%= gettext("Name or short description of the configuration") %></span>
            </div>
            <div class="input-wrap field text add-group-configuration-description">
                <label for="group-configuration-description-<%= uniqueId %>"><%= gettext("Description") %></label>
                <textarea id="group-configuration-description-<%= uniqueId %>" class="group-configuration-description-input text input-text" name="group-configuration-description" placeholder="<%= gettext("This is the Description of the Group Configuration") %>"><%= description %></textarea>
                <span class="tip tip-stacked"><%= gettext("Optional long description") %></span>
            </div>
        </fieldset>
28 29 30 31 32
        <fieldset class="groups-fields">
            <legend class="sr"><%= gettext("Group information") %></legend>
            <label class="groups-fields-label required"><%= gettext("Groups") %></label>
            <span class="tip tip-stacked"><%= gettext("Name of the groups that students will be assigned to, for example, Control, Video, Problems. You must have two or more groups.") %></span>
            <ol class="groups list-input enum"></ol>
33
            <button class="action action-add-group action-add-item"><i class="icon fa fa-plus"></i> <%= gettext("Add another group") %></button>
34
        </fieldset>
35
        <% if (!_.isEmpty(usage)) { %>
36
            <div class="wrapper-group-configuration-validation usage-validation">
37
                <i class="icon fa fa-warning"></i>
38 39 40 41 42
                <p class="group-configuration-validation-text">
                    <%= gettext('This configuration is currently used in content experiments. If you make changes to the groups, you may need to edit those experiments.') %>
                </p>
            </div>
        <% } %>
43 44 45 46
    </div>
    <div class="actions">
        <button class="action action-primary" type="submit"><% if (isNew) { print(gettext("Create")) } else { print(gettext("Save")) } %></button>
        <button class="action action-secondary action-cancel"><%= gettext("Cancel") %></button>
47 48 49 50 51 52 53
        <% if (!isNew) { %>
            <% if (_.isEmpty(usage)) { %>
                <span class="wrapper-delete-button">
                    <a class="button action-delete delete" href="#"><%= gettext("Delete") %></a>
                </span>
            <% } else { %>
                <span class="wrapper-delete-button" data-tooltip="<%= gettext('Cannot delete when in use by an experiment') %>">
54
                    <a class="button action-delete delete is-disabled" href="#" aria-disabled="true" ><%= gettext("Delete") %></a>
55 56 57
                </span>
            <% } %>
        <% } %>
58 59
    </div>
</form>