Commit c04e878b authored by frjo's avatar frjo
Browse files

Issue #2771213: Cant change "Device with" for the "Mobile detection"

parent 46aa6911
......@@ -243,14 +243,14 @@ class ColorboxSettingsForm extends ConfigFormBase {
'#title' => $this->t('Mobile detection'),
'#options' => array(1 => $this->t('On'), 0 => $this->t('Off')),
'#default_value' => $config->get('advanced.mobile_detect'),
'#description' => $this->t('If on (default) Colorbox will not be active for devices with a the max width set below.'),
'#description' => $this->t('If on (default) Colorbox will not be active for devices with the max width set below.'),
);
$form['colorbox_advanced_settings']['colorbox_mobile_device_width'] = array(
'#type' => 'textfield',
'#title' => $this->t('Device with'),
'#title' => $this->t('Device width'),
'#default_value' => $config->get('advanced.mobile_device_width'),
'#size' => 30,
'#description' => $this->t('Set the mobile device max with. Default: 480px.'),
'#description' => $this->t('Set the mobile device max width. Default: 480px.'),
'#states' => array(
'visible' => array(
':input[name="colorbox_mobile_detect"]' => array('value' => '1'),
......@@ -319,7 +319,7 @@ class ColorboxSettingsForm extends ConfigFormBase {
->set('custom.slideshow.text_stop', $form_state->getValue('colorbox_text_stop'))
->set('advanced.unique_token', $form_state->getValue('colorbox_unique_token'))
->set('advanced.mobile_detect', $form_state->getValue('colorbox_mobile_detect'))
->set('advanced.mobile_detect_width', $form_state->getValue('colorbox_mobile_device_width'))
->set('advanced.mobile_device_width', $form_state->getValue('colorbox_mobile_device_width'))
->set('advanced.caption_trim', $form_state->getValue('colorbox_caption_trim'))
->set('advanced.caption_trim_length', $form_state->getValue('colorbox_caption_trim_length'))
->set('advanced.compression_type', $form_state->getValue('colorbox_compression_type'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment