Skip to content

Commit

Permalink
improvement(restric negative values)
Browse files Browse the repository at this point in the history
- Added the minimum value property to the bhTextImput component to restrict the season of negative values (less than Zero)

closes #7452
  • Loading branch information
lomamech committed Feb 16, 2024
1 parent a380a90 commit 5400cf0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/src/js/components/bhInputText.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ angular.module('bhima.components')
isCurrency : '<?',
disabled : '<?',
maxLength : '@?',
min : '@?',
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
ng-if="!rubConfigured.is_monetary_value"
key="{{'ConfigPaiementForm_' + rubConfigured.label}}"
label="{{rubConfigured.label}}"
type="number"
text-value="ConfigPaiementModalCtrl.selectedRubrics[rubConfigured.id]"
required = "true"
min=0
on-change="$ctrl.onInputTextChange(key, value)">
</bh-input-text>
</div>
Expand Down
2 changes: 2 additions & 0 deletions client/src/modules/templates/bhInputText.tmpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
class="form-control"
ng-disabled="$ctrl.disabled"
ng-maxlength="{{$ctrl.maxLength}}"
ng-min="$ctrl.min"

ng-required="$ctrl.required"/>

<textarea
Expand Down

0 comments on commit 5400cf0

Please sign in to comment.