function oauthconnector_presets_form in OAuth Connector 7
1 string reference to 'oauthconnector_presets_form'
- oauthconnector_list_provider in ./
oauthconnector.admin.inc - Output a list of providers.
File
- ./
oauthconnector.admin.inc, line 832 - Administrative functions for the OAuth Connector module.
Code
function oauthconnector_presets_form($form, &$form_state) {
$presets = oauthconnector_presets();
$options = array();
foreach ($presets as $key => $preset) {
$options[$key] = $preset['name'];
}
$form['wrapper'] = array(
'#type' => 'fieldset',
'#title' => t('Add provider from preset'),
'#attributes' => array(
'class' => array(
'container-inline',
),
),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['wrapper']['preset'] = array(
'#type' => 'select',
'#options' => $options,
'#title' => t('Preset'),
);
$form['wrapper']['actions'] = array(
'#type' => 'actions',
);
$form['wrapper']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Add provider'),
);
return $form;
}