/[drupal]/contributions/modules/compact_forms/compact_forms.admin.inc
ViewVC logotype

Contents of /contributions/modules/compact_forms/compact_forms.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Wed Sep 30 03:52:36 2009 UTC (8 weeks ago) by sun
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -8 lines
File MIME type: text/x-php
by sun: Ported to Drupal 7.
1 <?php
2 // $Id: compact_forms.admin.inc,v 1.3 2009/05/03 20:08:05 sun Exp $
3
4 /**
5 * @file
6 * Compact Forms administration functions.
7 */
8
9 /**
10 * Form builder function for Compact Forms settings.
11 */
12 function compact_forms_admin_form($form, &$form_state) {
13 $form['compact_forms_ids'] = array(
14 '#type' => 'textarea',
15 '#title' => t('Form CSS ids'),
16 '#rows' => 3,
17 '#cols' => 40,
18 '#default_value' => variable_get('compact_forms_ids', 'user-login-form'),
19 '#description' => t('The CSS ids of forms that shall be displayed compact. One per line.'),
20 );
21 $form['compact_forms_stars'] = array(
22 '#type' => 'radios',
23 '#title' => t('Required field handling'),
24 '#options' => array(
25 0 => t('Remove star'),
26 1 => t('Leave star attached to label'),
27 2 => t('Append star after the field'),
28 ),
29 '#default_value' => variable_get('compact_forms_stars', 2),
30 '#description' => t('Defines how required field indicators should be altered.'),
31 );
32 $form['compact_forms_field_size'] = array(
33 '#type' => 'textfield',
34 '#title' => t('Textfield size'),
35 '#size' => 3,
36 '#default_value' => variable_get('compact_forms_field_size', ''),
37 '#description' => t("Optionally override the 'size' attribute (width) of all text fields in compact forms. Leave empty to use the default sizes defined by the original forms."),
38 );
39 $form['compact_forms_descriptions'] = array(
40 '#type' => 'checkbox',
41 '#title' => t('Show field descriptions'),
42 '#default_value' => variable_get('compact_forms_descriptions', 1),
43 '#description' => t('When enabled, form element descriptions will be hidden.'),
44 );
45
46 return system_settings_form($form);
47 }
48

  ViewVC Help
Powered by ViewVC 1.1.2