Commit 2cd2740e authored by JonBob's avatar JonBob

Clean up ID tags and file descriptions.

parent 2e8fd297
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function content_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
......
......@@ -548,43 +548,48 @@ function _content_admin_field_add($type_name) {
$output .= drupal_get_form('_content_admin_field_add_existing', $form);
}
$form = array();
$form['new'] = array(
'#type' => 'fieldset',
'#title' => t('Create new field'),
);
$form['new']['widget']['label'] = array(
'#title' => t('Label'),
'#type' => 'textfield',
'#default_value' => '',
'#description' => t('The human-readable name of this field.'),
'#required' => TRUE,
);
$options = array();
$field_type_options = array();
foreach ($field_types as $field_name => $field_type) {
foreach ($widget_types as $widget_name => $widget_type) {
if (in_array($field_name, $widget_type['field types'])) {
$options[$field_name .'-'. $widget_name] = $widget_type['label'];
$field_type_options[$field_name .'-'. $widget_name] = $widget_type['label'];
}
}
}
$form['new']['field_widget_type'] = array(
'#type' => 'radios',
'#title' => t('Field type'),
'#required' => TRUE,
'#options' => $options,
'#theme' => 'content_admin_field_add_new_field_widget_type',
);
if (count($field_type_options) > 0) {
$form = array();
$form['new'] = array(
'#type' => 'fieldset',
'#title' => t('Create new field'),
);
$form['new']['widget']['label'] = array(
'#title' => t('Label'),
'#type' => 'textfield',
'#default_value' => '',
'#description' => t('The human-readable name of this field.'),
'#required' => TRUE,
);
$form['new']['field_widget_type'] = array(
'#type' => 'radios',
'#title' => t('Field type'),
'#required' => TRUE,
'#options' => $field_type_options,
'#theme' => 'content_admin_field_add_new_field_widget_type',
);
$form['new']['submit'] = array(
'#type' => 'submit',
'#value' => t('Create field'),
);
$form['new']['type_name'] = array(
'#type' => 'value',
'#value' => $type_name,
);
$output .= drupal_get_form('_content_admin_field_add_new', $form);
$form['new']['submit'] = array(
'#type' => 'submit',
'#value' => t('Create field'),
);
$form['new']['type_name'] = array(
'#type' => 'value',
'#value' => $type_name,
);
$output .= drupal_get_form('_content_admin_field_add_new', $form);
}
else {
drupal_set_message(t('No field modules are enabled. You need to <a href="%modules_url">enable one</a>, such as text.module, before you can add new fields.', array('%modules_url' => url('admin/modules'))), 'error');
}
return $output;
}
......
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function date_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
......
......@@ -3,7 +3,7 @@
/**
* @file
* Defines standard simple field types.
* Defines a date/time field type.
*/
/**
......
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function nodereference_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
......
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function number_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
......
......@@ -3,7 +3,7 @@
/**
* @file
* Defines standard simple field types.
* Defines numeric field types.
*/
/**
......
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function text_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
......
......@@ -3,7 +3,7 @@
/**
* @file
* Defines standard simple field types.
* Defines simple text field types.
*/
/**
......
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function userreference_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
......
<?php
// $Id$
/**
* Implementation of hook_install().
*/
function weburl_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
......
<?php
// $Id:
// $Id$
/**
* @file
* Defines standard simple field types.
* Defines simple weburl field types.
*/
/**
......
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