Revision 06c2b3e2
Added by Andreas Kohlbecker about 8 years ago
modules/cdm_dataportal/settings.php | ||
---|---|---|
1248 | 1248 |
'#default_value' => $aggregate_by_taxon_relationships['invers'], |
1249 | 1249 |
); |
1250 | 1250 |
|
1251 |
// ---------------------- |
|
1251 |
$form['drupal_integration'] = array( |
|
1252 |
'#type' => 'fieldset', |
|
1253 |
'#attributes' => array('class'=>array('clearfix')), |
|
1254 |
'#title' => t('Drupal integration'), |
|
1255 |
'#collapsible' => FALSE, |
|
1256 |
'#collapsed' => FALSE, |
|
1257 |
'#tree' => FALSE |
|
1258 |
); |
|
1259 |
|
|
1260 |
$form['drupal_integration'][CDM_DRUPAL_NODE_CREATION] = array( |
|
1261 |
'#type' => 'checkbox', |
|
1262 |
'#title' => 'Create drupal nodes', |
|
1263 |
'#default_value' => variable_get(CDM_DRUPAL_NODE_CREATION, FALSE), |
|
1264 |
'#description' => 'The content of the pages created by the cdm_dataportal module is directly retrieved from the |
|
1265 |
CDM webservice configured above. In order to use other drupal modules like the "Comments" module together with the |
|
1266 |
cdm pages it is required that drupal nodes are created and stored in the database.' |
|
1267 |
); |
|
1268 |
|
|
1269 |
|
|
1270 |
|
|
1271 |
$form['drupal_integration']['drop_all_cdm_nodes_warning_pre'] = array( |
|
1272 |
'#markup' => '<h6 style="color:red;">WARNING:</h6> |
|
1273 |
<div class="description">Using this button, you will lose all content associated with the cdm drupal nodes which is stored in the drupal data base.</div>', |
|
1274 |
); |
|
1275 |
$form['drupal_integration']['drop_all_cdm_nodes'] = array( |
|
1276 |
'#type' => 'submit', |
|
1277 |
'#value' => t('Drop all cdm nodes'), |
|
1278 |
'#submit' => array('drop_all_cdm_nodes_submit') |
|
1279 |
); |
|
1280 |
|
|
1281 |
$form['drupal_integration']['drop_all_cdm_nodes_warning_post'] = array( |
|
1282 |
'#markup' => '<div class="description">All Drupal nodes created for cdm content can be deleted at once using this button.</div>', |
|
1283 |
); |
|
1284 |
|
|
1285 |
// ---------------------- |
|
1252 | 1286 |
$form['cdm_js_devel_mode'] = array( |
1253 | 1287 |
'#type' => 'checkbox', |
1254 | 1288 |
'#title' => 'Java-script developer mode', |
... | ... | |
1285 | 1319 |
return system_settings_form($form); |
1286 | 1320 |
} |
1287 | 1321 |
|
1322 |
/** |
|
1323 |
* Submit callback; drops all cdm nodes. |
|
1324 |
* |
|
1325 |
* @ingroup forms |
|
1326 |
*/ |
|
1327 |
function drop_all_cdm_nodes_submit($form, &$form_state) { |
|
1328 |
cdm_delete_all_cdm_nodes(); |
|
1329 |
drupal_set_message(t('All cdm nodes dropped.')); |
|
1330 |
} |
|
1331 |
|
|
1288 | 1332 |
|
1289 | 1333 |
/** |
1290 | 1334 |
* LAYOUT settings |
Also available in: Unified diff
creation of cdm drupal nodes now optional