Problem/Motivation

In the JobItemFor, or Job item view there is a label area for the import file under the translator information which is not being used ever and is currently breaking the way the lables are stored for jobs.

Proposed resolution

Remove the extra label field and test.

Remaining tasks

create patch, Review and commit.

User interface changes

Data model changes

Original report by [username]

Comments

juanse254 created an issue. See original summary.

juanse254’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new1.06 KB

This is fixing the issue aparently, some tests needed.

juanse254’s picture

Okay, tests added

Status: Needs review » Needs work

The last submitted patch, 3: Label_under_fieldset-2557933-3-TEST_ONLY.patch, failed testing.

juanse254’s picture

Status: Needs work » Needs review
berdir’s picture

Status: Needs review » Needs work
Issue tags: -Needs tests
+++ b/translators/tmgmt_file/src/FileTranslatorUi.php
@@ -88,14 +88,14 @@ class FileTranslatorUi extends TranslatorPluginUiBase {
     $form = array(
-      '#type' => 'fieldset',
+      '#type' => '#markup',
       '#title' => t('Import translated file'),
     );

That makes no sense at all ;) There is no such thing...

juanse254’s picture

Status: Needs work » Needs review
StatusFileSize
new416 bytes
new1.65 KB

Okay, this has more sense.

juanse254’s picture

StatusFileSize
new837 bytes
new1.94 KB

Okay, this is the right way

juanse254’s picture

StatusFileSize
new531 bytes
new1.94 KB

Deleted / :).

LKS90’s picture

Basically, looks good now.
I'm just wondering about this:

+++ b/src/Form/JobForm.php
@@ -317,7 +317,7 @@ class JobForm extends TmgmtFormBase {
     if (!$job->isSubmittable() && empty($form['translator_wrapper']['info'])) {

On the following line as well. Shouldn't we edit that to checkout_info as well?

LKS90’s picture

Status: Needs review » Needs work

As discussed, that text should appear in case the translator plugin returns, for example, an empty array. So update those as well.

LKS90’s picture

Double Post, pls ignore.

miro_dietiker’s picture

Can you please provide a test-only patch that shows the bug happens?

The last submitted patch, 3: Label_under_fieldset-2557933-3-TEST_ONLY.patch, failed testing.

juanse254’s picture

StatusFileSize
new2.25 KB
new619 bytes

The uploaded Test-Only from comment has not changed. Uploading the new patch with suggestions.

juanse254’s picture

Status: Needs work » Needs review
LKS90’s picture

Status: Needs review » Reviewed & tested by the community

A test with a translator that doesn't supply any checkout information is probably unnecessary. I'd say this patch is ready for commit.

berdir’s picture

Title: Label under fieldset in JobForm not being used » Label form element is duplicated due to #group naming overlap
berdir’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

  • Berdir committed f653fa8 on 8.x-1.x authored by juanse254
    Issue #2557933 by juanse254: Fixed Label form element is duplicated due...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.