diff --git a/translators/tmgmt_file/src/FileTranslatorUi.php b/translators/tmgmt_file/src/FileTranslatorUi.php index a9fc252..a1633b5 100644 --- a/translators/tmgmt_file/src/FileTranslatorUi.php +++ b/translators/tmgmt_file/src/FileTranslatorUi.php @@ -88,14 +88,14 @@ class FileTranslatorUi extends TranslatorPluginUiBase { return parent::checkoutInfo($job); } $form = array( - '#type' => 'fieldset', + '#type' => 'item', '#title' => t('Import translated file'), ); $supported_formats = array_keys(\Drupal::service('plugin.manager.tmgmt_file.format')->getDefinitions()); $form['file'] = array( '#type' => 'file', - '#title' => t('File file'), + '#title' => t('File'), '#size' => 50, '#description' => t('Supported formats: @formats.', array('@formats' => implode(', ', $supported_formats))), ); diff --git a/translators/tmgmt_file/src/Tests/FileTranslatorTest.php b/translators/tmgmt_file/src/Tests/FileTranslatorTest.php index 54dfd32..95186a0 100644 --- a/translators/tmgmt_file/src/Tests/FileTranslatorTest.php +++ b/translators/tmgmt_file/src/Tests/FileTranslatorTest.php @@ -378,6 +378,12 @@ class FileTranslatorTest extends TMGMTTestBase { $messages = $job->getMessages(); $message = reset($messages); + $this->drupalGet('admin/tmgmt/jobs/'); + $this->clickLink(t('manage')); + + // Assert that the label field is only shown once in page. + $this->assertEqual((count($this->xpath('//div[@id="tmgmt-ui-label"]'))), 1); + $download_url = $message->variables->{'@link'}; $this->assertFalse((bool) strpos('< a', $download_url)); $this->drupalGet($download_url);