diff --git a/app/views/dmsf_workflows/_new_step_form.html.erb b/app/views/dmsf_workflows/_new_step_form.html.erb
index 86db36d7..afd20f26 100644
--- a/app/views/dmsf_workflows/_new_step_form.html.erb
+++ b/app/views/dmsf_workflows/_new_step_form.html.erb
@@ -38,3 +38,11 @@
<%= text_field_tag 'name', nil, maxlength: 30, style: 'max-width: 40%' %>
+
+<%= late_javascript_tag do %>
+ $("div#users input:checkbox").on("change", function(){
+ let n = $("div#users input[type='checkbox']:checked").length;
+ $("#add-step-and:submit").prop("disabled", n < 1);
+ $("#add-step-or:submit").prop("disabled", n < 2);
+ });
+<% end %>
diff --git a/app/views/dmsf_workflows/_new_step_modal.html.erb b/app/views/dmsf_workflows/_new_step_modal.html.erb
index a231c6bf..ed8aa112 100644
--- a/app/views/dmsf_workflows/_new_step_modal.html.erb
+++ b/app/views/dmsf_workflows/_new_step_modal.html.erb
@@ -22,11 +22,12 @@
<%= l(:dmsf_new_step) %>
-<%= labelled_form_for(@dmsf_workflow, { url: edit_dmsf_workflow_path(@dmsf_workflow), method: :post}) do |f| %>
+<%= labelled_form_for(@dmsf_workflow, { url: edit_dmsf_workflow_path(@dmsf_workflow), method: :post }) do |f| %>
<%= render partial: 'new_step_form' %>
- <%= f.submit l(:dmsf_and), id: 'add-step-and' %>
- <%= f.submit l(:dmsf_or), id: 'add-step-or' %>
- <%= f.submit l(:button_cancel), name: nil, onclick: 'hideModal(this);', type: 'button', class: 'button' %>
+ <%= l(:label_add_width) %>
+ <%= f.submit l(:dmsf_and), id: 'add-step-and', disabled: true %>
+ <%= f.submit l(:dmsf_or), id: 'add-step-or', disabled: true %>
+ <%= link_to_function l(:button_cancel), 'hideModal(this);' %>
<% end %>
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
index 8f3bb641..f8a837a0 100644
--- a/config/locales/cs.yml
+++ b/config/locales/cs.yml
@@ -408,6 +408,8 @@ cs:
field_last_at: Poslední
field_size: Velikost
+ label_add_width: Přidat s
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 7a209a4a..1de45166 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -409,6 +409,8 @@ de:
field_last_at: Letzte
field_size: Größe
+ label_add_width: Zugeben mit
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 0f050a81..2d6a7583 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -408,6 +408,8 @@ en:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 5bd40858..7b0c5a06 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -408,6 +408,8 @@ es:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index a60f0af2..4d0a2fcc 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -408,6 +408,8 @@ fr:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/hu.yml b/config/locales/hu.yml
index 564092d0..03ed1677 100644
--- a/config/locales/hu.yml
+++ b/config/locales/hu.yml
@@ -407,6 +407,8 @@ hu:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/it.yml b/config/locales/it.yml
index b5a45a13..d42bfd51 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -408,6 +408,8 @@ it: # Italian strings thx 2 Matteo Arceci!
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index ac64d1ba..836cceaf 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -408,6 +408,8 @@ ja:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: 自分がロック中の文書
diff --git a/config/locales/ko.yml b/config/locales/ko.yml
index 745b1405..19d19bbf 100644
--- a/config/locales/ko.yml
+++ b/config/locales/ko.yml
@@ -407,6 +407,8 @@ ko:
field_last_at: 마지막
field_size: 크기
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: 내 잠긴 파일
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index 570e81e2..3fb41784 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -408,6 +408,8 @@ nl:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/pl.yml b/config/locales/pl.yml
index da714759..c6b49e9d 100644
--- a/config/locales/pl.yml
+++ b/config/locales/pl.yml
@@ -408,6 +408,8 @@ pl:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
index 75437577..13f59d16 100644
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -408,6 +408,8 @@ pt-BR:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index fb5038b2..79cbbabd 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -408,6 +408,8 @@ ru:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/sl.yml b/config/locales/sl.yml
index 0ac696e2..9adad3a1 100644
--- a/config/locales/sl.yml
+++ b/config/locales/sl.yml
@@ -408,6 +408,8 @@ sl:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml
index b5e01aee..9faeb279 100644
--- a/config/locales/zh-TW.yml
+++ b/config/locales/zh-TW.yml
@@ -408,6 +408,8 @@ zh-TW:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 8a16f326..44598872 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -408,6 +408,8 @@ zh:
field_last_at: Last
field_size: Size
+ label_add_width: Add with
+
easy_pages:
modules:
dmsf_locked_documents: My locked documents