Skip to content

Commit

Permalink
Fixed #29 - Upgrade to 1.1.0 - high priority push
Browse files Browse the repository at this point in the history
  • Loading branch information
Beamanator committed Jun 5, 2018
1 parent 489ccd3 commit acdaa53
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
44 changes: 44 additions & 0 deletions js/DeleteSubmitSkip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* I just found a problem with RIPS regarding clients being deleted
* without warning. If you ever update a client's basic information
* (on the Client Basic Information page), please make sure you save
* the client by clicking the "Save" button in the top-left corner
* of the page. DO NOT PRESS [ENTER] ON THE PAGE!! It seems that by
* pressing enter, it's possible to see a popup that looks like this:
*
* [image]
*
* If you click "Ok", YOU WILL DELETE THE CLIENT!!! If you ever see
* this popup, click "Cancel" or press the [Esc] key on your keyboard.
*
* If you accidentally press "Ok" or if you have done this in the
* past, please send me the client details you were working on, as
* your client was probably deleted.
*
* I am already sending this bug report to the developers, so I will
* send an "all clear" once this has been fixed. Until then, PLEASE
* DO NOT PRESS THE [ENTER] KEY ON THE CLIENT BASIC INFORMATION PAGE!!!
*
* Thank you very much, please let me know if there are any questions.
*/
console.log(
'[DeleteSubmitSkip]: Note - remove code once devs fix bug!'
);

// on keydown, handle key code
document.addEventListener("keydown", function (e) {
//
switch (e.key) {
case 'Enter':
console.log('[DeleteSubmitSkip]: pressed [Enter]' +
' - prevent default', e);
// temporarily fix bug by not allowing 'enter' to trigger
// form submit
e.preventDefault();
break;

default:
// don't care about anything else
break;
}
});
5 changes: 3 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "RIPS Extension - Validation",
"version": "1.0.0",
"version": "1.1.0",

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

Expand Down Expand Up @@ -40,7 +40,8 @@
]
}, {
"matches": [ "http://rips.247lib.com/Stars/ClientDetails/ClientDetails" ],
"css": [ "css/overrides/styles_CBI.css" ]
"css": [ "css/overrides/styles_CBI.css" ],
"js": [ "js/DeleteSubmitSkip.js" ]
}, {
"matches": [ "http://rips.247lib.com/Stars/Registration/Registration" ],
"css": [ "css/overrides/styles_REG.css" ]
Expand Down

0 comments on commit acdaa53

Please sign in to comment.