Loading src/Form/BlockClassBulkOperationsForm.php +21 −1 Original line number Diff line number Diff line Loading @@ -102,6 +102,9 @@ class BlockClassBulkOperationsForm extends ConfigFormBase { */ public function buildForm(array $form, FormStateInterface $form_state) { // Get config object. $config = $this->configFactory->getEditable('block_class.settings'); $form['operation'] = [ '#title' => $this->t("Operation"), '#type' => 'select', Loading @@ -114,10 +117,27 @@ class BlockClassBulkOperationsForm extends ConfigFormBase { ], ]; // Default field type. $field_type = 'textfield'; // Default value for maxlength. $maxlength_block_class_field = 255; // Get the field type if exists. if (!empty($config->get('field_type'))) { $field_type = $config->get('field_type'); } // Get maxlength if exists. if (!empty($config->get('maxlength_block_class_field'))) { $maxlength_block_class_field = $config->get('maxlength_block_class_field'); } $form['classes_to_be_added'] = [ '#title' => $this->t("Classes to be added"), '#type' => 'textfield', '#type' => $field_type, '#description' => $this->t("Customize the styling of all blocks by adding CSS classes. Separate multiple classes by spaces."), '#maxlength' => $maxlength_block_class_field, '#states' => [ 'visible' => [ ':input[name="operation"]' => [ Loading Loading
src/Form/BlockClassBulkOperationsForm.php +21 −1 Original line number Diff line number Diff line Loading @@ -102,6 +102,9 @@ class BlockClassBulkOperationsForm extends ConfigFormBase { */ public function buildForm(array $form, FormStateInterface $form_state) { // Get config object. $config = $this->configFactory->getEditable('block_class.settings'); $form['operation'] = [ '#title' => $this->t("Operation"), '#type' => 'select', Loading @@ -114,10 +117,27 @@ class BlockClassBulkOperationsForm extends ConfigFormBase { ], ]; // Default field type. $field_type = 'textfield'; // Default value for maxlength. $maxlength_block_class_field = 255; // Get the field type if exists. if (!empty($config->get('field_type'))) { $field_type = $config->get('field_type'); } // Get maxlength if exists. if (!empty($config->get('maxlength_block_class_field'))) { $maxlength_block_class_field = $config->get('maxlength_block_class_field'); } $form['classes_to_be_added'] = [ '#title' => $this->t("Classes to be added"), '#type' => 'textfield', '#type' => $field_type, '#description' => $this->t("Customize the styling of all blocks by adding CSS classes. Separate multiple classes by spaces."), '#maxlength' => $maxlength_block_class_field, '#states' => [ 'visible' => [ ':input[name="operation"]' => [ Loading