1 <form id="default-templates-form" method="post" action="<%= ApplicationController.root_context -%>/permission_templates/update_default_templates">
3 <div class="modal-head">
4 <h2><%= message('permission_template.set_default_templates') -%></h2>
6 <div class="modal-body">
7 <div id="permission-template-error" class="permission-template error errors" style="display:none;" />
8 <% @root_qualifiers.each do |qualifier| %>
9 <div class="modal-field">
10 <%= label_tag("default_template_#{qualifier}", "#{message('qualifier.' + qualifier)}(s):") %>
11 <%= select_tag("default_template_#{qualifier}", options_for_select(@permission_templates_options, @default_templates[qualifier])) %>
15 <div class="modal-foot">
16 <input type="submit" value="<%= h message('permission_template.update_permissions') -%>" id="submit-default-templates"/>
17 <a href="#" onclick="return closeModalWindow()" id="cancel-default-templates"><%= h message('cancel') -%></a>
23 $j("#default-templates-form").modalForm({
24 success: function (data) {
25 window.location.reload();
27 error: function (xhr, textStatus, errorThrown) {
28 var htmlClass = 'permission-template';
29 $j('input[id^="submit-default-templates"]').removeAttr('disabled');
30 $j('.' + htmlClass + '.errors').show();
31 $j('.' + htmlClass + '.errors').html(xhr.responseText);