Skip to content

Commit

Permalink
Merge branch 'master' into fix-roles-after-delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Macroz authored Jan 15, 2024
2 parents ecc76d6 + 8c52b4a commit 25c1c09
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changes since v2.35

### Fixes
- Fix issue with user roles after deletion. This was introduced in the previous release that optimizes cache updates. (#3243)
- Mark form as optional in catalogue item creation. Also consider categories optional unless the catalogue tree is enabled. (#3244)

## v2.35 "Selkämerenkatu" 2023-12-13

Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions src/cljs/rems/administration/create_catalogue_item.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@
item-selected? #(= (:form/id %) (:form/id selected-form))
language @(rf/subscribe [:language])]
[:div.form-group
[:label.administration-field-label {:for form-dropdown-id} (text :t.administration/form)]
[:label.administration-field-label {:for form-dropdown-id}
(text :t.administration/form)
" "
(text :t.administration/optional)]
(if editing?
(let [form (item-by-id forms :form/id (:form/id selected-form))]
[fields/readonly-field {:id form-dropdown-id
Expand All @@ -251,9 +254,13 @@
(defn- catalogue-item-categories-field []
(let [categories @(rf/subscribe [::categories])
selected-categories @(rf/subscribe [::selected-categories])
item-selected? (set selected-categories)]
item-selected? (set selected-categories)
config @(rf/subscribe [:rems.config/config])]
[:div.form-group
[:label.administration-field-label {:for categories-dropdown-id} (text :t.administration/categories)]
[:label.administration-field-label {:for categories-dropdown-id}
(text :t.administration/categories)
(when-not (:enable-catalogue-tree config)
(str " " (text :t.administration/optional)))]
[dropdown/dropdown
{:id categories-dropdown-id
:items categories
Expand Down
4 changes: 2 additions & 2 deletions test/clj/rems/test_browser.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@
"More info URL (optional) (EN)" ""
"More info URL (optional) (FI)" ""
"More info URL (optional) (SV)" ""
"Form" "test-edit-catalogue-item form"
"Form (optional)" "test-edit-catalogue-item form"
"Categories" "No categories"
"Workflow" "test-edit-catalogue-item workflow"
"Resource" "test-edit-catalogue-item resource"}
Expand Down Expand Up @@ -1655,7 +1655,7 @@
"More info URL (optional) (EN)" "http://google.com"
"More info URL (optional) (FI)" ""
"More info URL (optional) (SV)" ""
"Form" "test-edit-catalogue-item form"
"Form (optional)" "test-edit-catalogue-item form"
"Categories" "No categories"
"Workflow" "test-edit-catalogue-item workflow"
"Resource" "test-edit-catalogue-item resource"}
Expand Down

0 comments on commit 25c1c09

Please sign in to comment.