@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When workflow dialog buttons are clicked, disable the button

Summary:
Depends on D19245. Fixes T11145. Ref T13108. See PHI488. Disable workflow buttons when they're clicked to prevent accidental client-side double submission.

This might have some weird side effects but we should normally never need to re-use a workflow dialog form so it's not immediately obvious that this can break anything.

Test Plan:
- Added `sleep(1)` to the Mute controller and the Maniphest task controller.
- Added `phlog(...)` to the Mute controller.
- Opened the mute dialog, mashed the button a thousand times.
- Before: Saw a bunch of logs.
- After: Button immediately disables, saw only one log.

Maniphest Tasks: T13108, T11145

Differential Revision: https://secure.phabricator.com/D19246

+18 -14
+14 -14
resources/celerity/map.php
··· 10 10 'conpherence.pkg.css' => 'e68cf1fa', 11 11 'conpherence.pkg.js' => '15191c65', 12 12 'core.pkg.css' => '6da3c0e5', 13 - 'core.pkg.js' => 'b305dbe2', 13 + 'core.pkg.js' => '27f3489f', 14 14 'differential.pkg.css' => '113e692c', 15 15 'differential.pkg.js' => 'f6d809c0', 16 16 'diffusion.pkg.css' => 'a2d17c7d', ··· 253 253 'rsrc/externals/javelin/lib/URI.js' => 'c989ade3', 254 254 'rsrc/externals/javelin/lib/Vector.js' => '2caa8fb8', 255 255 'rsrc/externals/javelin/lib/WebSocket.js' => '3ffe32d6', 256 - 'rsrc/externals/javelin/lib/Workflow.js' => '33fea02f', 256 + 'rsrc/externals/javelin/lib/Workflow.js' => '7dd6653c', 257 257 'rsrc/externals/javelin/lib/__tests__/Cookie.js' => '5ed109e8', 258 258 'rsrc/externals/javelin/lib/__tests__/DOM.js' => 'c984504b', 259 259 'rsrc/externals/javelin/lib/__tests__/JSON.js' => '837a7d68', ··· 739 739 'javelin-workboard-card' => 'c587b80f', 740 740 'javelin-workboard-column' => '758b4758', 741 741 'javelin-workboard-controller' => '26167537', 742 - 'javelin-workflow' => '33fea02f', 742 + 'javelin-workflow' => '7dd6653c', 743 743 'maniphest-report-css' => '9b9580b7', 744 744 'maniphest-task-edit-css' => 'fda62a9b', 745 745 'maniphest-task-summary-css' => '11cc5344', ··· 1097 1097 'javelin-util', 1098 1098 'javelin-magical-init', 1099 1099 ), 1100 - '33fea02f' => array( 1101 - 'javelin-stratcom', 1102 - 'javelin-request', 1103 - 'javelin-dom', 1104 - 'javelin-vector', 1105 - 'javelin-install', 1106 - 'javelin-util', 1107 - 'javelin-mask', 1108 - 'javelin-uri', 1109 - 'javelin-routable', 1110 - ), 1111 1100 '358b8c04' => array( 1112 1101 'javelin-install', 1113 1102 'javelin-util', ··· 1537 1526 'javelin-util', 1538 1527 'javelin-request', 1539 1528 'javelin-router', 1529 + ), 1530 + '7dd6653c' => array( 1531 + 'javelin-stratcom', 1532 + 'javelin-request', 1533 + 'javelin-dom', 1534 + 'javelin-vector', 1535 + 'javelin-install', 1536 + 'javelin-util', 1537 + 'javelin-mask', 1538 + 'javelin-uri', 1539 + 'javelin-routable', 1540 1540 ), 1541 1541 '7e41274a' => array( 1542 1542 'javelin-install',
+4
webroot/rsrc/externals/javelin/lib/Workflow.js
··· 151 151 // NOTE: Don't remove the current dialog yet because additional 152 152 // handlers may still want to access the nodes. 153 153 154 + // Disable whatever button the user clicked to prevent duplicate 155 + // submission mistakes when you accidentally . See T11145. 156 + button.disabled = true; 157 + 154 158 active 155 159 .setURI(form.getAttribute('action') || active.getURI()) 156 160 .setDataWithListOfPairs(data)