Skip to content

Commit

Permalink
use radios
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredgalanis committed Oct 19, 2023
1 parent a62820b commit 750462d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
6 changes: 5 additions & 1 deletion app/components/workflow-review/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@ table td {

.comment-text-area {
resize: none;
min-height: 38px!important;
min-height: 38px !important;
}

.swal2-radio {
flex-direction: column !important;
}
16 changes: 12 additions & 4 deletions app/components/workflow-review/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,25 @@ export default class WorkflowReview extends Component {

const result = yield swal
.mixin({
input: 'checkbox',
inputPlaceholder:
"I agree to the above statement on today's date. I understand that if I proceed and do not check this box, my submission will not be deposited to above repository.",
confirmButtonText: 'Next →',
input: 'radio',
inputOptions: {
agree: `I agree to the above statement on today's date.`,
noAgree:
'I do not agree to the above statement and I understand that if I proceed and do not check this box, my submission will not be deposited to above repository.',
},
inputValidator: (value) => {
if (!value) {
return 'You need to choose something!';
}
},
progressSteps: reposWithAgreementText.map((repo, index) => index + 1),
})
.queue(reposWithAgreementText);
if (result.value) {
let reposThatUserAgreedToDeposit = reposWithAgreementText.filter((repo, index) => {
// if the user agreed to depost to this repo === 1
if (result.value[index] === 1) {
if (result.value[index] === 'agree') {
return repo;
}
});
Expand Down
12 changes: 12 additions & 0 deletions app/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,18 @@ input[type='date']::-webkit-outer-spin-button {
z-index: 99999 !important;
}

.swal2-radio {
display: block !important;
}

.swal2-radio label .swal2-label {
font-size: 1rem !important;
}

.swal2-radio label:not(:last-child) {
margin-bottom: 4px !important;
}

/*
* End Alpaca
*/
Expand Down

0 comments on commit 750462d

Please sign in to comment.