Problem/Motivation

When submitting a new job, the UI is usable, but glitchy. In the "Provider" dropdown menu, when selecting "Gengo translator", the current "Checkout settings" collapsible area is changed to Gengo's, which is fine, but everytime the "Quality" option is changed, a new "Provider" dropdown menu and Gengo logo is appended to the area, which can lead to this kind of UI :

Glitchy UI screenshot.

Proposed resolution

The form is constructed in checkoutSettingsForm() of Drupal\tmgmt_mygengo\MyGengoTranslatorUi. The AJAX callback function for the "Quality" dropdown menu looks wrong :

    $settings['quality'] = array(
      '#type' => 'select',
      '#title' => t('Quality'),
      '#options' => $this->getAvailableTiersOptions($job),
      '#default_value' => $job->getSetting('quality'),
      '#description' => t('Choose the level of quality for this translation job.'),
      '#ajax' => array(
        'callback' => '::ajaxTranslatorSelect',
        'wrapper' => 'tmgmt-ui-translator-settings',
      ),
    );

The callback function is defined in Drupal\tmgmt\Form\JobForm.

Remaining tasks

Most likely implement a different callback function, as ajaxTranslatorSelect looks fine.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Bambell created an issue. See original summary.

miro_dietiker’s picture

Priority: Normal » Major
Bambell’s picture

Assigned: Unassigned » Bambell
Status: Active » Needs review
FileSize
534 bytes

The content returned by the Ajax callback was not properly placed, leading to duplication of part of it.

  • miro_dietiker committed fb02953 on 8.x-1.x authored by Bambell
    Issue #2747531 by Bambell: Selecting quality setting duplicates provider...
miro_dietiker’s picture

Status: Needs review » Fixed

Committed. :-)

Status: Fixed » Closed (fixed)

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