Skip to content

Commit

Permalink
Merge pull request #143 from acmsigsoft/presubmission_style_fix
Browse files Browse the repository at this point in the history
Fix styling issue on presubmission checklist
  • Loading branch information
drpaulralph authored Nov 5, 2024
2 parents cc67cc4 + 6fa2671 commit 1fce008
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 6 additions & 2 deletions form_generator/css/appearance.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ form:active {
border: 2px solid red;
}

.yes_no_block {
.author_yes_no_block {
flex: 0 0 100%;
display: none;
}

.reviewer_yes_no_block {
padding-left: 2.4em;
display: none;
flex: 0 0 100%;
}

.type_block {
Expand Down
14 changes: 8 additions & 6 deletions form_generator/js/read_standards.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,13 @@ function generate_question_block_with_yes_no_radio_answers(id, class_name, quest
var question_block = document.createElement("div");

question_block.id = id + ":" + checklistItem_id;
question_block.className = "question_block yes_no_block";
question_block.className = "question_block";

var deviation_block = document.createElement("div");
deviation_block.innerHTML = "   ";

if (role == "\"author\"") {
if (role == "\"author\"") {
question_block.classList.add("author_yes_no_block");
var questiontext_container = document.createElement("span");
questiontext_container.innerHTML = "↳  " + question;
questiontext_container.className = "question_text_container";
Expand All @@ -571,10 +572,11 @@ function generate_question_block_with_yes_no_radio_answers(id, class_name, quest
question_block.appendChild(location_container);
question_block.appendChild(unjustified_container);

var deviation_not_justified = generate_message("deviation_not_justified:" + checklistItem_id, " Your manuscript should justify any deviations from essential attributes.", "message_style_1 unjustified_warning");
var deviation_not_justified = generate_message("deviation_not_justified:" + checklistItem_id, " Your manuscript should justify any deviations from essential attributes.", "unjustified_warning");

question_block.appendChild(deviation_not_justified);
} else {
question_block.classList.add("reviewer_yes_no_block");
question_block.innerHTML = "↳  " + question;

// For reviewers, create yes-no radio buttons
Expand Down Expand Up @@ -922,8 +924,8 @@ function convert_MD_standard_checklists_to_html_standard_checklists(standardName
var checklistItemText = document.createElement("span");

if (role == "\"author\"") {
checklistItemLI.className = "author_list_item";
checklistItemText.className = "item_text";
checklistItemLI.classList.add("author_list_item");
checklistItemText.classList.add("item_text");
}

if(IMRaD_line_break) {
Expand Down Expand Up @@ -992,7 +994,7 @@ function convert_MD_standard_checklists_to_html_standard_checklists(standardName
checklistItem_id = standardName + "-" + checklistName + ":" + i;
}

checklistItemLI.className = checklistItem_class;
checklistItemLI.classList.add(checklistItem_class);

// Change the text to the string held in line_text
checklistItemLI.setAttribute("text", line_text);
Expand Down

0 comments on commit 1fce008

Please sign in to comment.