New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added validation to currency update. #17256
base: developer
Are you sure you want to change the base?
Conversation
App.Fields.Date.register('#datepicker', false, {}); | ||
let form = container.find('.js-currency-update'); | ||
let bank = form.find('#bank'); | ||
container.on('click', '.js-download', function (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
</td> | ||
<td class="fieldValue"> | ||
<div class="row"> | ||
<div class="col-md-5"> | ||
<select name="bank" id="bank" class="select2 form-control"> | ||
<select name="bank" id="bank" class="select2 form-control" required="true" data-validation-engine="validate[required]"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one required
@@ -16,27 +16,26 @@ | |||
<strong>{\App\Language::translate('LBL_WARNING', $QUALIFIED_MODULE)}</strong> {\App\Language::translate('MSG_NO_NET_CONN', $QUALIFIED_MODULE)} | |||
</div> | |||
{/if} | |||
<form class="form-horizontal" method="post" action="index.php?module={$MODULENAME}&view=Index&parent=Settings"> | |||
<form class="form-horizontal js-currency-update" method="post" action="index.php?module={$MODULENAME}&view=Index&parent=Settings" data-js="container"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<form class="form-horizontal js-currency-update" method="post" action="index.php?module={$MODULENAME}&view=Index&parent=Settings" data-js="container"> | |
<form class="form-horizontal js-currency-update_form" method="post" action="index.php?module={$MODULENAME}&view=Index&parent=Settings" data-js="container"> |
</td> | ||
<td class="fieldValue"> | ||
<div class="row"> | ||
<div class="col-md-5"> | ||
<select name="bank" id="bank" class="select2 form-control"> | ||
<option value="0" {if !$ACTIVE_BANK}selected{/if}>{\App\Language::translate('LBL_SELECT_OPTION', $QUALIFIED_MODULE)}</option> | ||
<select name="bank" id="bank" class="select2 form-control" data-validation-engine="validate[required]"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you set this field as mandatory if you want to be able to delete a bank
Added validation to currency update.