Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hkorpi committed Jun 15, 2015
2 parents 80d26de + 6515f54 commit da04619
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/scripts/components/avustuskohde/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h5>{{name}}</h5>
</label>


<p class="help-block ng-invalid-sallittu-arvo-haettavaavustus">Arvon tulee olla välillä 0 - 999 999 999.</p>
<p class="help-block ng-invalid-sallittu-arvo-haettavaavustus">Arvon tulee olla välillä 0 - 999 999 999,99 € (sis. ALV).</p>

</div>
</div>
Expand All @@ -41,7 +41,7 @@ <h5>{{name}}</h5>
</div>
</label>

<p class="help-block ng-invalid-sallittu-arvo-omarahoitus">Arvon tulee olla välillä 0 - 999 999 999.</p>
<p class="help-block ng-invalid-sallittu-arvo-omarahoitus">Arvon tulee olla välillä 0 - 999 999 999,99 € (sis. ALV).</p>

<p class="help-block ng-invalid-omarahoitus-riittava">Oma rahoitusosuus tulee olla vähintään
{{100-avustusprosentti}}% kokonaiskuluista.</p>
Expand Down
9 changes: 5 additions & 4 deletions app/scripts/components/avustuskohde/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ module.exports = function () {
$scope.sallittuArvo = function (value) {
if (typeof value === 'undefined') {
return false;
}
var floatarvo;
if (typeof value === 'string') {
} else if (typeof value === 'string') {
var floatarvo;
floatarvo = $scope.euroSyoteNumeroksi(value);
return (floatarvo >= 0 && floatarvo <= 999999999.00);
return (floatarvo >= 0 && floatarvo <= 999999999.99);
} else if (typeof value === 'number') {
return (value >= 0 && value <= 999999999.99);
}
return true;
};
Expand Down

0 comments on commit da04619

Please sign in to comment.