1 <form id="permission-template-form" method="post" action="<%= ApplicationController.root_context -%>/permission_templates/<%= form_action %>">
2 <% if form_action == 'edit' %>
3 <input type="hidden" name="id" value="<%= @permission_template.id -%>">
6 <div class="modal-head">
7 <h2><%= message("permission_template.#{message_title}") -%></h2>
9 <div class="modal-body">
10 <div class="modal-error"/>
11 <div class="modal-field">
12 <label for="name"><%= h message('name') -%> <em class="mandatory">*</em></label>
13 <input id="name" name="name" type="text" maxlength="256" value="<%= @permission_template ? @permission_template.name : '' -%>" autofocus="autofocus" style="width: 330px;"/>
15 <div class="modal-field">
16 <label for="description"><%= h message('description') -%></label>
17 <textarea id="description" name="description" maxlength="4000" rows="10" style="width: 330px;"><%= @permission_template ? @permission_template.description : '' -%></textarea>
19 <div class="modal-field">
20 <label for="keyPattern"><%= h message('permission_template.key_pattern') -%></label>
21 <input id="keyPattern" name="pattern" type="text" maxlength="500" value="<%= @permission_template ? @permission_template.keyPattern : '' -%>" style="width: 330px;"/>
24 <div class="modal-foot">
25 <input type="submit" value="<%= h message("permission_template.#{message_submit}") -%>" id="submit-permission-template-<%= form_action %>"/>
26 <a href="#" onclick="return closeModalWindow()" id="cancel-<%= form_action %>-template"><%= h message('cancel') -%></a>
32 $j("#permission-template-form").modalForm({
33 success: function (data) {
34 window.location.reload();