File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
wp1-frontend/src/components Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 109
109
v-on:input =" validateInput('longDescription', maxLongDescriptionLength)"
110
110
rows =" 6"
111
111
class =" form-control"
112
- :class =" {'is-invalid': isLongDescriptionInvalid }"
112
+ :class =" {'is-invalid': !isLongDescriptionValid }"
113
113
placeholder =" ZIM file created from a WP1 Selection"
114
114
></textarea >
115
115
<small class =" form-text" :class =" {'text-muted': graphemeCount(longDescription) < maxLongDescriptionLength, 'text-warning': graphemeCount(longDescription) === maxLongDescriptionLength}" >
@@ -345,15 +345,15 @@ export default {
345
345
this.status === 'ENDED'
346
346
);
347
347
},
348
- isLongDescriptionInvalid : function() {
349
- if (!this.longDescription || !this.description) return false ;
348
+ isLongDescriptionValid : function() {
349
+ if (!this.longDescription || !this.description) return true ;
350
350
const longCount = this.graphemeCount(this.longDescription);
351
351
const descCount = this.graphemeCount(this.description);
352
- return longCount < descCount || this.longDescription = == this.description;
352
+ return longCount >= descCount && this.longDescription ! == this.description;
353
353
},
354
354
hasLengthErrors: function() {
355
355
// Prevent empty required fields and invalid long description
356
- return !this.zimTitle || !this.description || this.isLongDescriptionInvalid ;
356
+ return !this.zimTitle || !this.description || ! this.isLongDescriptionValid ;
357
357
}
358
358
},
359
359
watch: {
You can’t perform that action at this time.
0 commit comments