Commit c167d42
authored
OpenConceptLab/ocl_issues#2644 | fix Remove Resources by Reference dialog feedback and radio grouping (#40)
Fixes two bugs in the "Remove Resources by Reference" dialog reported by MSF:
1. onExecute hardcoded deleteReferences(referenceIds, false), so choosing
only "Remove reference(s)" (the recommended action for the common
single-reference case) suppressed all success/error feedback and never
closed the dialog or reloaded, even though the DELETE request succeeded
server-side. Replaced with a combined completion handler that always
surfaces success/error/queued-task status regardless of which action(s)
ran, and also fixes excludeReferences silently claiming success on a
202 (queued Celery task) response instead of surfacing it like
ReferenceForm.jsx already does for Add References.
2. Each resource row's RadioGroup used the literal name="reference-action",
shared across every row rendered in the same dialog. Native HTML radio
grouping is scoped by name across the whole page, not per React
component instance, so selecting more than one resource collapsed all
rows into a single mutually-exclusive group -- only one radio in the
entire dialog could end up checked, regardless of each row's own
recommendation. Scoped the name per row via resource.uuid.1 parent 3f48ae6 commit c167d42
1 file changed
Lines changed: 31 additions & 22 deletions
Lines changed: 31 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
87 | 96 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
96 | 104 | | |
97 | 105 | | |
| 106 | + | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
| |||
256 | 265 | | |
257 | 266 | | |
258 | 267 | | |
259 | | - | |
| 268 | + | |
260 | 269 | | |
261 | 270 | | |
262 | 271 | | |
| |||
0 commit comments