Skip to content

Commit ade9ff9

Browse files
authored
Print dialog related changes (#547)
Print dialog related changes (#547)
1 parent 2a6f5fd commit ade9ff9

File tree

3 files changed

+54
-23
lines changed

3 files changed

+54
-23
lines changed

forms-flow-rsbcservice/src/component/RSBCImage/PrintConfirmationDialog.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,26 @@ const PrintConfirmationDialog: React.FC<ConfirmationDialogProps> = ({
1919
return (
2020
<div className="modal-overlay">
2121
<div className="confirmation-dialog">
22-
<p>{message}</p>
23-
<button className="btn btn-primary" onClick={onConfirm}>
24-
{primaryBtnCaption}
25-
</button>
26-
<button className="btn btn-secondary" onClick={onCancel}>
27-
{secondaryBtnCaption}
28-
</button>
22+
<button className="dialog-close btn-secondary" onClick={onCancel}>
23+
×
24+
</button>
25+
<h2 className="dialog-header">Print Form</h2>
26+
<hr />
27+
<div className="dialog-message">
28+
<p>{message}</p>
29+
</div>
30+
<hr />
31+
<div className="dialog-actions">
32+
<button className="btn btn-secondary" onClick={onCancel}>
33+
{secondaryBtnCaption}
34+
</button>
35+
<button className="btn btn-primary" onClick={onConfirm}>
36+
{primaryBtnCaption}
37+
</button>
38+
</div>
2939
</div>
3040
</div>
3141
);
3242
};
3343

34-
export default PrintConfirmationDialog;
44+
export default PrintConfirmationDialog;

forms-flow-rsbcservice/src/component/RSBCImage/RSBCImage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ export default class RSBCImage extends ReactComponent {
135135
if (requireConfirmation && this.component.stage !== "stageTwo") {
136136
const proceedToPrint = await this.showConfirmationDialog(
137137
"If you print this form you cannot go back and edit it, please confirm you wish to proceed.",
138-
"Proceed",
139-
"Cancel"
138+
"Print",
139+
"Close"
140140
);
141141

142142
if (proceedToPrint) {

forms-flow-rsbcservice/src/component/RSBCImage/printConfirmationDialog.scss

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,54 @@
55
left: 0;
66
width: 100vw;
77
height: 100vh;
8-
background: rgba(0, 0, 0, 0.5);
98
display: flex;
109
justify-content: center;
1110
align-items: center;
12-
z-index: 1000;
11+
z-index: 1000;
12+
background-color: rgba(0, 0, 0, 0.3) !important;
1313
}
1414

1515
.confirmation-dialog {
16-
background: white;
16+
background-color: #fff;
1717
padding: 20px;
1818
border-radius: 8px;
19-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
20-
text-align: center;
21-
z-index: 1001;
19+
width: 400px;
20+
max-width: 90%;
21+
word-wrap: break-word;
22+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
23+
position: relative;
2224
}
2325

24-
.confirmation-dialog p {
25-
margin-bottom: 15px;
26+
.dialog-header {
27+
margin: 0;
28+
font-size: 1.25rem;
29+
font-weight: bold;
30+
padding-right: 25px;
2631
}
2732

28-
.confirmation-dialog button {
29-
margin: 10px;
30-
padding: 8px 16px;
33+
.dialog-close {
34+
position: absolute;
35+
top: 10px;
36+
right: 10px;
37+
background: none;
3138
border: none;
39+
font-size: 1.2rem;
3240
cursor: pointer;
33-
border-radius: 4px;
34-
font-size: 14px;
41+
line-height: 1;
42+
color: var(--secondary-btn-bg-color);
43+
}
44+
45+
.dialog-message {
46+
margin: 20px 0;
47+
}
48+
49+
.dialog-actions {
50+
display: flex;
51+
justify-content: flex-end;
52+
text-align: right;
53+
gap: 10px;
54+
margin-top: 20px;
55+
flex-wrap: wrap;
3556
}
3657

3758
.confirmation-dialog .yes-button {

0 commit comments

Comments
 (0)