Skip to content

Commit 167ebad

Browse files
committed
break publishing step into a partial template
1 parent 6f4b74a commit 167ebad

File tree

10 files changed

+258
-319
lines changed

10 files changed

+258
-319
lines changed

gateway/sds_gateway/api_methods/models.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,11 +1334,6 @@ def user_has_access_to_item(user: "User", item_uuid: uuid.UUID, item_type: str)
13341334
"""
13351335
return UserSharePermission.user_can_view(user, item_uuid, item_type)
13361336

1337-
def get_user_permission_level(user, item_uuid, item_type):
1338-
"""
1339-
Get the permission level for a user on a specific item.
1340-
"""
1341-
return UserSharePermission.get_user_permission_level(user, item_uuid, item_type)
13421337

13431338
def get_user_permission_level(
13441339
user: "User", item_uuid: uuid.UUID, item_type: str

gateway/sds_gateway/static/js/dataset/DatasetEditingHandler.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,26 +1242,23 @@ class DatasetEditingHandler {
12421242
}
12431243

12441244
// Disable author inputs if dataset is final
1245-
if (
1246-
window.datasetModeManager &&
1247-
window.datasetModeManager.isExistingFinalDataset()
1248-
) {
1245+
if (window.datasetModeManager?.isExistingFinalDataset()) {
12491246
const authorInputs = authorsList.querySelectorAll(
12501247
".author-name-input, .author-orcid-input",
12511248
);
1252-
authorInputs.forEach((input) => {
1249+
for (const input of authorInputs) {
12531250
input.disabled = true;
12541251
input.setAttribute("readonly", "readonly");
12551252
input.classList.add("form-control-plaintext");
1256-
});
1253+
}
12571254
// Also disable remove buttons for authors
12581255
const removeButtons = authorsList.querySelectorAll(
12591256
".remove-author, .cancel-remove-author",
12601257
);
1261-
removeButtons.forEach((button) => {
1258+
for (const button of removeButtons) {
12621259
button.disabled = true;
12631260
button.classList.add("disabled-element");
1264-
});
1261+
}
12651262
// Disable add button if not already disabled
12661263
if (addAuthorBtn) {
12671264
addAuthorBtn.disabled = true;

0 commit comments

Comments
 (0)