Projet

Général

Profil

0001-wcs-fix-custom-field-template-display-when-not-defin.patch

Lauréline Guérin, 17 décembre 2021 18:37

Télécharger (1,87 ko)

Voir les différences:

Subject: [PATCH] wcs: fix custom field template display when not defined
 (#59595)

 combo/manager/static/js/combo.manager.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
combo/manager/static/js/combo.manager.js
550 550
    let schema_field = _self.field_with_varname(schema_cell.varname);
551 551
    let cell_text = "";
552 552
    if (schema_field || schema_cell.varname == '@custom@') {
553
      const cell_content = schema_cell.varname == '@custom@' ? schema_cell.template + ' (' + gettext('Custom') + ')' : schema_field.label;
553
      const cell_content = schema_cell.varname == '@custom@' ? (schema_cell.template || '') + ' (' + gettext('Custom') + ')' : schema_field.label;
554 554
      cell_text += $('<span/>').addClass(schema_cell.display_mode).text(cell_content).html();
555 555
      cell_text += '<span class="cell-meta">';
556 556
      let cell_display_mode_label = $(this.grid_cell_form).find('select[name="display_mode"] option[value="' + schema_cell.display_mode + '"]').text();
......
582 582
  grid_cell__edit: function(grid_cell) {
583 583
    const _self = this;
584 584
    this.grid_cell_form.varname.value = grid_cell.dataset.varname;
585
    this.grid_cell_form.template.value = grid_cell.dataset.template;
585
    this.grid_cell_form.template.value = grid_cell.dataset.template || '';
586 586
    this.grid_cell_form.size.value = grid_cell.dataset.cell_size;
587 587
    this.grid_cell_form.display_mode.value = grid_cell.dataset.display_mode;
588 588
    const cell_id = $(grid_cell).index();
589
-