Skip to content

Commit

Permalink
fix: re-enable virtual topup modal when balance is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
henry-deriv committed Aug 1, 2024
1 parent 22d4967 commit f542283
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/config/pages.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const TopUpVirtualPopup = (() => {
showPopup({
form_id,
popup_id,
// url : urlFor('user/top_up_virtual_pop_up'), // Unused in pages.js.
url : urlFor('user/top_up_virtual_pop_up'), // Unused in pages.js.
// TODO: Uncomment/update popup logic when restoring TopUpVirtualPopup. Removed JSX can be found in PR#592 (4f8e0ff)
content_id : '#top_up',
additionalFunction: () => {
Expand Down
28 changes: 28 additions & 0 deletions src/templates/app/user/top_up_virtual/pop_up.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';

const TopUpVirtualPopup = () => (
<React.Fragment>
<div id='top_up' className='gr-padding-10 gr-gutter'>
<h1>{it.L('Top up Virtual Account')}</h1>
<p id='top_up_message' />
<p>{it.L('Do you want to top up for another [_1]? If not, you can do this later on the [_2]Cashier page[_3], too.', '$10,000.00', `<a id='top_up_cashier_redirect'>`, '</a>')}</p>

Check failure on line 8 in src/templates/app/user/top_up_virtual/pop_up.jsx

View workflow job for this annotation

GitHub Actions / build_and_deploy_preview_link

Strings must use singlequote

Check failure on line 8 in src/templates/app/user/top_up_virtual/pop_up.jsx

View workflow job for this annotation

GitHub Actions / Build and Test

Strings must use singlequote
<form id='frm_confirm'>
<div className='hint no-margin gr-padding-20 gr-parent'>
<input id='chk_hide_top_up' type='checkbox' />
&nbsp;
<label htmlFor='chk_hide_top_up'>{it.L('Don\'t show again')}</label>
</div>
<div className='gr-row'>
<div className='gr-6'>
<a className='button button-secondary' id='btn_cancel' href='javascript:;'><span>{it.L('Continue trading')}</span></a>
</div>
<div className='gr-6 gr-no-gutter-left'>
<button className='button' type='submit' id='btn_ok'>{it.L('Top up')}</button>
</div>
</div>
</form>
</div>
</React.Fragment>
);

export default TopUpVirtualPopup;

0 comments on commit f542283

Please sign in to comment.