fix hidden label (#4500)

pull/4502/head
ulferts 9 years ago committed by Oliver Günther
parent e881ab5ffd
commit 9fb2f68675
  1. 10
      frontend/app/components/work-packages/wp-display-attr/wp-display-attr.directive.ts

@ -41,7 +41,7 @@ export class WorkPackageDisplayAttributeController {
public workPackage: any;
public customSchema: HalResource;
public field: DisplayField;
public label: string;
public labelOptional: string;
private __d__hiddenForSighted: JQuery;
private __d__cell: JQuery;
@ -69,6 +69,12 @@ export class WorkPackageDisplayAttributeController {
return this.placeholderOptional || (this.field && this.field.placeholder);
};
public get label() {
return this.labelOptional ||
(this.schema[this.attribute] && this.schema[this.attribute].name) ||
this.attribute;
};
public isEditable() {
return this.wpEditField && this.wpEditField.isEditable;
};
@ -154,7 +160,7 @@ function wpDisplayAttrDirective() {
workPackage: '=',
customSchema: '=?',
attribute: '=',
label: '=',
labelOptional: '=label',
placeholderOptional: '=placeholder'
},

Loading…
Cancel
Save