Skip to content

Commit acdaa53

Browse files
committed
Fixed #29 - Upgrade to 1.1.0 - high priority push
1 parent 489ccd3 commit acdaa53

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

js/DeleteSubmitSkip.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* I just found a problem with RIPS regarding clients being deleted
3+
* without warning. If you ever update a client's basic information
4+
* (on the Client Basic Information page), please make sure you save
5+
* the client by clicking the "Save" button in the top-left corner
6+
* of the page. DO NOT PRESS [ENTER] ON THE PAGE!! It seems that by
7+
* pressing enter, it's possible to see a popup that looks like this:
8+
*
9+
* [image]
10+
*
11+
* If you click "Ok", YOU WILL DELETE THE CLIENT!!! If you ever see
12+
* this popup, click "Cancel" or press the [Esc] key on your keyboard.
13+
*
14+
* If you accidentally press "Ok" or if you have done this in the
15+
* past, please send me the client details you were working on, as
16+
* your client was probably deleted.
17+
*
18+
* I am already sending this bug report to the developers, so I will
19+
* send an "all clear" once this has been fixed. Until then, PLEASE
20+
* DO NOT PRESS THE [ENTER] KEY ON THE CLIENT BASIC INFORMATION PAGE!!!
21+
*
22+
* Thank you very much, please let me know if there are any questions.
23+
*/
24+
console.log(
25+
'[DeleteSubmitSkip]: Note - remove code once devs fix bug!'
26+
);
27+
28+
// on keydown, handle key code
29+
document.addEventListener("keydown", function (e) {
30+
//
31+
switch (e.key) {
32+
case 'Enter':
33+
console.log('[DeleteSubmitSkip]: pressed [Enter]' +
34+
' - prevent default', e);
35+
// temporarily fix bug by not allowing 'enter' to trigger
36+
// form submit
37+
e.preventDefault();
38+
break;
39+
40+
default:
41+
// don't care about anything else
42+
break;
43+
}
44+
});

manifest.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "RIPS Extension - Validation",
4-
"version": "1.0.0",
4+
"version": "1.1.0",
55

66
"description": "RIPS Extension - Adds validation on UNHCR #, Phone #, and DOB",
77

@@ -40,7 +40,8 @@
4040
]
4141
}, {
4242
"matches": [ "http://rips.247lib.com/Stars/ClientDetails/ClientDetails" ],
43-
"css": [ "css/overrides/styles_CBI.css" ]
43+
"css": [ "css/overrides/styles_CBI.css" ],
44+
"js": [ "js/DeleteSubmitSkip.js" ]
4445
}, {
4546
"matches": [ "http://rips.247lib.com/Stars/Registration/Registration" ],
4647
"css": [ "css/overrides/styles_REG.css" ]

0 commit comments

Comments
 (0)