canvas-lms/app/views/groups/edit.html.erb

45 lines
1.8 KiB
Plaintext

<% content_for :page_title do %><%= join_title t(:group_settings_title, "%{group_name} Settings", :group_name => @group.name), @context.full_name %><% end %>
<% content_for :right_side do %>
<a href="<%= context_url(@context, :context_url) %>" class="button button-sidebar delete_group_link"><%= image_tag "delete.png" %> <%= t 'buttons.delete_group', 'Delete this Group' %></a>
<% end %>
<% form_for :group, :url => context_url(@context, :context_url), :html => {:method => :put} do |f| %>
<table class="formtable">
<tr>
<td><%= f.blabel :name, :en => "Group Name" %></td>
<td><%= f.text_field :name %></td>
</tr><tr>
<td colspan="2">
<div class="button-container">
<button type="submit" class="button"><%= t 'buttons.update', 'Update Group' %></button>
<a href="<%= context_url(@context, :context_url) %>" class="button button-secondary"><%= t '#buttons.cancel', 'Cancel' %></a>
</div>
</td>
</tr>
</table>
<% end %>
<div id="delete_group_dialog" style="display: none;">
<%= t('confirm.delete', 'Are you sure you want to delete this group?') %>
<div class="button-container">
<%= link_to(t('buttons.delete', "Delete Group"), context_url(@context, :context_url), :method => :delete, :class => "button") %>
<button type="button" class="button button-secondary cancel_button"><%= t '#buttons.cancel', 'Cancel' %></button>
</div>
</div>
<% js_block do %>
<script>
$(document).ready(function() {
$(".delete_group_link").click(function(event) {
event.preventDefault();
$("#delete_group_dialog").dialog('close').dialog({
autoOpen: false,
title: '<%= t 'title.confirm_delete', "Confirm Group Delete" %>',
modal: true
}).dialog('open');
});
$("#delete_group_dialog .cancel_button").click(function() {
$("#delete_group_dialog").dialog('close');
});
});
</script>
<% end %>