render()

in widgets/agile-charts/src/app/burn-down-chart-form.js [308:346]


  render() {
    const {
      report, disabled
    } = this.state;

    const getReportFormTitle = () => {
      if (disabled) {
        return `${i18n('Report')} ${report.name}`;
      }
      return BurnDownChartForm.isNewReport(report)
        ? i18n('New report')
        : i18n('Edit report');
    };

    return (
      <div className="ring-form">
        <span className="ring-form__title">
          { getReportFormTitle() }
        </span>
        {
          !disabled &&
          <Input
            size={InputSize.FULL}
            value={report.name}
            placeholder={i18n('Report name')}
            onChange={this.changeReportName}
          />
        }
        {this.renderProjectsSelectorBlock()}
        {this.renderAggregationPolicyBlock()}
        {
          this.renderFilterIssuesBlock()
        }
        {
          this.renderVisibilityBlock()
        }
      </div>
    );
  }