Skip to content

Commit

Permalink
MOSIP-38671 : PMS-Revamp - An incorrect error message, "Could not pro…
Browse files Browse the repository at this point in the history
…cess the request," appears when the Enter key is pressed after entering details in the Create Policy Group page. (#1069)

* MOSIP-38671 : An incorrect error message, 'Could not process the request' appears when the Enter key is pressed after entering details in the Create Policy Group page.

Signed-off-by: sudeep <sudeep.j7353@gmail.com>

* MOSIP-38671 : An incorrect error message, 'Could not process the request' appears when the Enter key is pressed after entering details in the Create Policy Group page.

Signed-off-by: sudeep <sudeep.j7353@gmail.com>

---------

Signed-off-by: sudeep <sudeep.j7353@gmail.com>
  • Loading branch information
Sudeep7353 authored Jan 8, 2025
1 parent 16e13ca commit 490e851
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function CreatePolicyGroup() {
</button>
<div className={`flex flex-row max-[450px]:flex-col space-x-3 max-[450px]:space-x-0 max-[450px]:space-y-2 w-full md:w-auto justify-end`}>
<button id="createPolicy_cancel_btn" onClick={() => clickOnCancel()} className={`${isLoginLanguageRTL ? "ml-2" : "mr-2"} w-11/12 md:w-40 h-10 border-[#1447B2] border rounded-md bg-white text-tory-blue text-sm font-semibold`}>{t('requestPolicy.cancel')}</button>
<button id="createPolicy_submit_btn" disabled={!isFormValid()} onClick={() => clickOnSubmit()} className={`${isLoginLanguageRTL ? "ml-2" : "mr-2"} w-11/12 md:w-40 h-10 border-[#1447B2] border rounded-md text-sm font-semibold ${isFormValid() ? 'bg-tory-blue text-white' : 'border-[#A5A5A5] bg-[#A5A5A5] text-white cursor-not-allowed'}`} tabIndex="0" onKeyDown={(e) => onPressEnterKey(e, () =>clickOnSubmit())}>
<button id="createPolicy_submit_btn" disabled={!isFormValid()} onClick={() => clickOnSubmit()} className={`${isLoginLanguageRTL ? "ml-2" : "mr-2"} w-11/12 md:w-40 h-10 border-[#1447B2] border rounded-md text-sm font-semibold ${isFormValid() ? 'bg-tory-blue text-white' : 'border-[#A5A5A5] bg-[#A5A5A5] text-white cursor-not-allowed'}`}>
{t('requestPolicy.submit')}
</button>
</div>
Expand Down
1 change: 1 addition & 0 deletions pmp-revamp-ui/src/utils/AppUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const getGrantTypes = (type, t) => {

export const onPressEnterKey = (e, action) => {
if (e.key === 'Enter') {
e.preventDefault();
return action();
}
}
Expand Down

0 comments on commit 490e851

Please sign in to comment.