diff --git a/src/cljs/rems/administration/catalogue_items.cljs b/src/cljs/rems/administration/catalogue_items.cljs index 5352564a5..d6b6205e2 100644 --- a/src/cljs/rems/administration/catalogue_items.cljs +++ b/src/cljs/rems/administration/catalogue_items.cljs @@ -84,12 +84,14 @@ (text :t.administration/create-catalogue-item)]) (defn- update-catalogue-item-button [items] - [:button.btn.btn-primary - {:disabled (when (empty? items) :disabled) + [atoms/rate-limited-action-button + {:id :update-catalogue-item + :class "btn-primary" + :disabled (when (empty? items) :disabled) :on-click (fn [] (rf/dispatch [:rems.administration.update-catalogue-item/enter-page items]) - (navigate! "/administration/catalogue-items/update-catalogue-item"))} - (text :t.administration/update-catalogue-item)]) + (navigate! "/administration/catalogue-items/update-catalogue-item")) + :label (text :t.administration/update-catalogue-item)}]) (defn- categories-button [] [atoms/link {:class "btn btn-primary" :id :manage-categories} diff --git a/src/cljs/rems/administration/update_catalogue_item.cljs b/src/cljs/rems/administration/update_catalogue_item.cljs index 3160103f5..b138c1adf 100644 --- a/src/cljs/rems/administration/update_catalogue_item.cljs +++ b/src/cljs/rems/administration/update_catalogue_item.cljs @@ -140,12 +140,13 @@ items)) (defn- update-catalogue-item-button [items {:keys [form workflow]}] - [:button.btn.btn-primary - {:type :button + [atoms/rate-limited-button + {:id :update-catalogue-item + :class "btn-primary" :on-click (fn [] (item-update-loop items form workflow)) :disabled (or (empty? items) - (all-items-have-the-form-and-workflow-already? items form workflow))} - (text :t.administration/update-catalogue-item)]) + (all-items-have-the-form-and-workflow-already? items form workflow)) + :label (text :t.administration/update-catalogue-item)}])