Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
fix(ui):component merge wizzard check that components' ids are not same
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalle Soranko committed Apr 11, 2018
1 parent 3d33403 commit 9187bd5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
function submitChosenComponent($stepElement) {
var checkedList = $stepElement.find('input:checked');
if (checkedList.size() !== 1) {
$stepElement.find('.stepFeedback').html('<div class="alert">Please choose exactly one component!</div>');
if (checkedList.size() !== 1 || $(checkedList.get(0)).val() === $wizardRoot.data('componentTargetId')) {
$stepElement.find('.stepFeedback').html('<div class="alert">Please choose exactly one component, which is not the component itself!</div>');
$('html, body').stop().animate({ scrollTop: 0 }, 300, 'swing');
setTimeout(function() {
$stepElement.find('.stepFeedback').html('');
Expand Down

0 comments on commit 9187bd5

Please sign in to comment.