Skip to content

Commit

Permalink
Bug #157854: If user is adding new T&C for same page with same T&C co…
Browse files Browse the repository at this point in the history
…de & version, message 'Item saved successfully' displayed but T&C not get added in the list
  • Loading branch information
“Shivani” committed Feb 24, 2020
1 parent 056614a commit 6eee93d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function checkDuplicateAndLatestVersionTC()
if ($getMaxTCVersion == 'newVersion')
{
// If T&C is first new version[new TC]
echo 1;
echo 0;
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ function(response) {
}
).done(
function(data) {
if (data == 1) {
if (data === 0) {
// this T&C has first version
valid = true;
}
else if (tcVersion <= data) {
alert('<?php echo JText::_('COM_TC_VALIDATION_FORM_LATEST_VERSION_TC', ); ?>'+ tcClient +' - '+ data +
alert('<?php echo JText::_('COM_TC_VALIDATION_FORM_LATEST_VERSION_TC'); ?>'+ tcClient +' - '+ data +
'<?php echo JText::_('COM_TC_VALIDATION_FORM_GREATER_VERSION_TC'); ?>');
jQuery('#jform_version').val('');

Expand Down

0 comments on commit 6eee93d

Please sign in to comment.