Skip to content

Commit

Permalink
move mix field around (closes #3041)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanLondon committed Mar 26, 2019
1 parent 014393f commit 509bd72
Showing 1 changed file with 23 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ function SourceDestFields (props: Props) {
const {className, focusHandlers, prefix} = props
const addFieldNamePrefix = makeAddFieldNamePrefix(prefix)

const mixFields = (
<CheckboxRowField
name={addFieldNamePrefix('mix_checkbox')}
label={i18n.t('form.step_edit_form.field.mix.label')}
className={styles.small_field}>
<TextField
name={addFieldNamePrefix('mix_volume')}
units={i18n.t('application.units.microliter')}
className={styles.small_field}
{...focusHandlers} />
<TextField
name={addFieldNamePrefix('mix_times')}
units={i18n.t('application.units.times')}
className={styles.small_field}
{...focusHandlers} />
</CheckboxRowField>
)

return (
<div className={className}>
<div className={styles.form_row}>
Expand All @@ -48,6 +66,7 @@ function SourceDestFields (props: Props) {
label={i18n.t('form.step_edit_form.field.preWetTip.label')}
className={styles.small_field}
/>
{mixFields}
<CheckboxRowField
disabled
tooltipComponent={i18n.t('tooltip.not_in_beta')}
Expand All @@ -64,6 +83,9 @@ function SourceDestFields (props: Props) {
</CheckboxRowField>
</React.Fragment>
}

{prefix === 'dispense' && mixFields}

<CheckboxRowField
name={addFieldNamePrefix('touchTip_checkbox')}
tooltipComponent={i18n.t(`tooltip.step_fields.${addFieldNamePrefix('touchTip_checkbox')}`)}
Expand All @@ -72,21 +94,7 @@ function SourceDestFields (props: Props) {
>
<TipPositionField fieldName={addFieldNamePrefix('touchTip_mmFromBottom')} />
</CheckboxRowField>
<CheckboxRowField
name={addFieldNamePrefix('mix_checkbox')}
label={i18n.t('form.step_edit_form.field.mix.label')}
className={styles.small_field}>
<TextField
name={addFieldNamePrefix('mix_volume')}
units={i18n.t('application.units.microliter')}
className={styles.small_field}
{...focusHandlers} />
<TextField
name={addFieldNamePrefix('mix_times')}
units={i18n.t('application.units.times')}
className={styles.small_field}
{...focusHandlers} />
</CheckboxRowField>

{prefix === 'dispense' &&
<CheckboxRowField
name='blowout_checkbox'
Expand Down

0 comments on commit 509bd72

Please sign in to comment.