function adci_contact_info_block_configure in Multipurpose Corporate Profile 7
Implements hook_block_configure().
File
- modules/
adci_contact_info/ adci_contact_info.module, line 117 - Info, view, save functions for ADCI Solutions contact info block.
Code
function adci_contact_info_block_configure($delta = '') {
if ($delta !== 'adci_contact_info_block') {
return;
}
$form['info'] = [
'#type' => 'textarea',
'#title' => t('Information'),
'#default_value' => variable_get('adci_contact_info_info', 'The website is using Drupal @version'),
'#description' => t('You can use @version placeholder to print the version of Drupal core.'),
];
$form['site'] = [
'#type' => 'fieldset',
'#title' => t('Site link'),
];
$form['site']['link'] = [
'#type' => 'textfield',
'#title' => t('Link'),
'#default_value' => variable_get('adci_contact_info_site_link', 'https://www.adcisolutions.com/'),
'#attributes' => [
'id' => 'adci-info-block-site-link',
],
];
$form['site']['text'] = [
'#type' => 'textfield',
'#title' => t('Link text'),
'#default_value' => variable_get('adci_contact_info_site_text', 'ADCI Solutions'),
'#states' => [
'disabled' => [
':input[id="adci-info-block-site-link"]' => [
'empty' => TRUE,
],
],
],
];
$form['site']['site_title'] = [
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => variable_get('adci_contact_info_site_title', 'Supported by'),
'#states' => [
'disabled' => [
':input[id="adci-info-block-site-link"]' => [
'empty' => TRUE,
],
],
],
];
$form['email'] = [
'#type' => 'fieldset',
'#title' => t('Email'),
];
$form['email']['email'] = [
'#type' => 'textfield',
'#title' => t('Email'),
'#default_value' => variable_get('adci_contact_info_email', 'hello@adcillc.com'),
'#attributes' => [
'id' => 'adci-info-block-email-email',
'type' => 'email',
],
];
$form['email']['email_title'] = [
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => variable_get('adci_contact_info_email_title', 'Email'),
'#states' => [
'disabled' => [
':input[id="adci-info-block-email-email"]' => [
'empty' => TRUE,
],
],
],
];
return $form;
}