2025-07-03 15:58:43 +02:00

56 lines
2.5 KiB
Plaintext

<%
# Redmine plugin for Document Management System "Features"
#
# Karel Pičman <karel.picman@kontron.com>
#
# This file is part of Redmine DMSF plugin.
#
# Redmine DMSF plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# Redmine DMSF plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with Redmine DMSF plugin. If not, see
# <https://www.gnu.org/licenses/>.
%>
<h3 class="title"><%= l(:field_label_dmsf_workflow) %></h3>
<%= form_tag({ controller: 'dmsf_workflows', action: 'new_action'}, method: :post, id: 'new-action-form') do %>
<%= hidden_field_tag :dmsf_workflow_step_assignment_id, params[:dmsf_workflow_step_assignment_id] %>
<%= hidden_field_tag :dmsf_file_revision_id, params[:dmsf_file_revision_id] %>
<%= hidden_field_tag :back_url, params[:back_url] %>
<p>
<label>
<%= radio_button_tag 'step_action', DmsfWorkflowStepAction::ACTION_APPROVE, true, onclick: 'noteMandatory(false);' %>
<%= l(:label_dmsf_wokflow_action_approve) %>
</label>
</p>
<p>
<label>
<%= radio_button_tag 'step_action', DmsfWorkflowStepAction::ACTION_REJECT, false, onclick: 'noteMandatory(true);' %>
<%= l(:label_dmsf_wokflow_action_reject) %>
</label>
<br>
<%= text_area_tag :note, '', placeholder: l(:message_dmsf_wokflow_note), style: 'width: 90%' %>
</p>
<div>
<%= label_tag 'delegate', l(:label_dmsf_wokflow_action_delegate) %><br>
<%= text_field_tag 'user_search', nil %>
<%= javascript_tag "observeSearchfield('user_search', null, '#{escape_javascript autocomplete_for_user_dmsf_workflow_path(@dmsf_workflow, dmsf_workflow_step_assignment_id: params[:dmsf_workflow_step_assignment_id], dmsf_file_revision_id: params[:dmsf_file_revision_id])}')" %>
<div id="dmsf_users_for_delegate">
<%= render_principals_for_new_dmsf_workflow_users(
@dmsf_workflow, params[:dmsf_workflow_step_assignment_id], params[:dmsf_file_revision_id]) %>
</div>
</div>
<p class="buttons">
<%= submit_tag l(:button_submit), name: 'commit' %>
<%= submit_tag l(:button_cancel), name: 'cancel', onclick: 'hideModal(this);' %>
</p>
<% end %>