Verify comment is not null
This commit is contained in:
parent
e918dbccb0
commit
2de03383f6
@ -63,7 +63,7 @@ export default class PositionDialogModel extends ViewModel {
|
||||
<div style="clear: both; padding-bottom: 1em;"></div>
|
||||
<form id="positionForm">
|
||||
<label><b>${$._('comment')}</b></label><br>
|
||||
<textarea style="width:100%;" maxlength="255" rows="5" placeholder="${$._('comment')}" name="comment" data-bind="comment">${uUtils.htmlEncode(this.position.comment)}</textarea>
|
||||
<textarea style="width:100%;" maxlength="255" rows="5" placeholder="${$._('comment')}" name="comment" data-bind="comment">${this.position.hasComment() ? uUtils.htmlEncode(this.position.comment) : ''}</textarea>
|
||||
<div class="buttons">
|
||||
<button class="button-reject" data-bind="onCancel" type="button">${$._('cancel')}</button>
|
||||
<button class="button-resolve" data-bind="onPositionUpdate" type="submit">${$._('submit')}</button>
|
||||
@ -106,9 +106,6 @@ export default class PositionDialogModel extends ViewModel {
|
||||
* @return {boolean} True if valid
|
||||
*/
|
||||
validate() {
|
||||
if (this.model.comment === this.position.comment) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return this.model.comment !== this.position.comment;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user