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 :
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | selecting_quality-2747531-3.patch | 534 bytes | Bambell |
| |||
gengo-change-quality-ui-bug.png | 51.71 KB | Bambell |
Comments
Comment #2
miro_dietikerComment #3
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedThe content returned by the Ajax callback was not properly placed, leading to duplication of part of it.
Comment #5
miro_dietikerCommitted. :-)