Minor changes to reporting forms
This commit is contained in:
parent
354bb0adba
commit
7a61f76a93
@ -1,6 +1,6 @@
|
||||
entity.opencase_report.add_form:
|
||||
route_name: entity.opencase_report.add_form
|
||||
title: 'Add OpenCase Report'
|
||||
title: 'New Report'
|
||||
appears_on:
|
||||
- entity.opencase_report.collection
|
||||
|
||||
|
@ -19,10 +19,9 @@ class OpenCaseReportForm extends EntityForm {
|
||||
$opencase_report = $this->entity;
|
||||
$form['label'] = [
|
||||
'#type' => 'textfield',
|
||||
'#title' => $this->t('Label'),
|
||||
'#title' => $this->t('Report Title'),
|
||||
'#maxlength' => 255,
|
||||
'#default_value' => $opencase_report->label(),
|
||||
'#description' => $this->t("Label for the OpenCase Report."),
|
||||
'#required' => TRUE,
|
||||
];
|
||||
|
||||
@ -49,13 +48,13 @@ class OpenCaseReportForm extends EntityForm {
|
||||
|
||||
switch ($status) {
|
||||
case SAVED_NEW:
|
||||
drupal_set_message($this->t('Created the %label OpenCase Report.', [
|
||||
drupal_set_message($this->t('Created report: %label.', [
|
||||
'%label' => $opencase_report->label(),
|
||||
]));
|
||||
break;
|
||||
|
||||
default:
|
||||
drupal_set_message($this->t('Saved the %label OpenCase Report.', [
|
||||
drupal_set_message($this->t('Saved report: %label.', [
|
||||
'%label' => $opencase_report->label(),
|
||||
]));
|
||||
}
|
||||
|
@ -14,8 +14,7 @@ class OpenCaseReportListBuilder extends ConfigEntityListBuilder {
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildHeader() {
|
||||
$header['label'] = $this->t('OpenCase Report');
|
||||
$header['id'] = $this->t('Machine name');
|
||||
$header['label'] = $this->t('Report');
|
||||
return $header + parent::buildHeader();
|
||||
}
|
||||
|
||||
@ -24,8 +23,6 @@ class OpenCaseReportListBuilder extends ConfigEntityListBuilder {
|
||||
*/
|
||||
public function buildRow(EntityInterface $entity) {
|
||||
$row['label'] = $entity->label();
|
||||
$row['id'] = $entity->id();
|
||||
// You probably want a few more properties here...
|
||||
return $row + parent::buildRow($entity);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user