Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
18
app/views/sudo_mode/_new_modal.html.erb
Normal file
18
app/views/sudo_mode/_new_modal.html.erb
Normal file
|
@ -0,0 +1,18 @@
|
|||
<h3 class="title"><%= l(:label_password_required) %></h3>
|
||||
<%= form_tag({}, remote: true) do %>
|
||||
|
||||
<%= hidden_field_tag '_method', request.request_method %>
|
||||
<%= hash_to_hidden_fields @sudo_form.original_fields %>
|
||||
<%= render_flash_messages %>
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<label for="sudo_password"><%= l :field_password %><span class="required">*</span></label>
|
||||
<%= password_field_tag :sudo_password, nil, size: 25 %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_submit), onclick: "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), name: nil, onclick: "hideModal(this);", type: 'button' %>
|
||||
</p>
|
||||
<% end %>
|
15
app/views/sudo_mode/new.html.erb
Normal file
15
app/views/sudo_mode/new.html.erb
Normal file
|
@ -0,0 +1,15 @@
|
|||
<h2><%= l :label_password_required %></h2>
|
||||
<%= form_tag({}, method: :post, class: 'tabular', id: 'sudo-form') do %>
|
||||
|
||||
<%= hidden_field_tag '_method', request.request_method %>
|
||||
<%= hash_to_hidden_fields @sudo_form.original_fields %>
|
||||
|
||||
<div class="box">
|
||||
<p>
|
||||
<label for="sudo_password"><%= l :field_password %><span class="required">*</span></label>
|
||||
<%= password_field_tag :sudo_password, nil, size: 25 %>
|
||||
</p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<% end %>
|
||||
<%= javascript_tag "$('#sudo_password').focus();" %>
|
4
app/views/sudo_mode/new.js.erb
Normal file
4
app/views/sudo_mode/new.js.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
var sudo_modal = $('#sudo-modal').length ? $('#sudo-modal') : $("<div>", {id: "sudo-modal"}).appendTo($("body"));
|
||||
sudo_modal.hide().html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>');
|
||||
showModal('sudo-modal', '400px');
|
||||
$('#sudo_password').focus();
|
Loading…
Add table
Add a link
Reference in a new issue