/[drupal]/contributions/modules/l10n_server/l10n_packager/l10n_packager.admin.inc
ViewVC logotype

Diff of /contributions/modules/l10n_server/l10n_packager/l10n_packager.admin.inc

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

revision 1.1.2.1 by goba, Wed Nov 11 18:21:01 2009 UTC revision 1.1.2.2 by goba, Thu Nov 19 22:57:43 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: l10n_packager.admin.inc,v 1.1.2.1 2009/11/11 18:21:01 goba Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 108  function l10n_packager_admin_projects_fo Line 108  function l10n_packager_admin_projects_fo
108      '#title' => t('Project translations'),      '#title' => t('Project translations'),
109      '#description' => t('Repackage all translations of a single project or release.'),      '#description' => t('Repackage all translations of a single project or release.'),
110    );    );
111    
112      $projects = l10n_community_get_projects();
113    $form['projects']['project'] = array(    $form['projects']['project'] = array(
114      '#title' => t('Project'),      '#title' => t('Project'),
     '#type' => 'textfield',  
     '#autocomplete_path' => 'translate/projects/autocomplete',  
     '#description' => t('Type the name of a project, eg. Drupal.'),  
115      '#required' => TRUE,      '#required' => TRUE,
116    );    );
117      if (($count = count($projects)) <= 30) {
118        // Radio box widget for as much as 5 projects, select widget for 5-30 projects.
119        $form['projects']['project']['#type'] = ($count <= 5 ? 'radios' : 'select');
120        $form['projects']['project']['#options'] = array();
121        foreach ($projects as $project) {
122          // Title used to conform to the autocomplete behavior.
123          $form['projects']['project']['#options'][$project->title] = $project->title;
124        }
125      }
126      else {
127        // Autocomplete field for more then 30 projects.
128        $form['projects']['project'] += array(
129          '#type' => 'textfield',
130          '#autocomplete_path' => 'translate/projects/autocomplete',
131        );
132      }
133    
134    $form['projects']['release'] = array(    $form['projects']['release'] = array(
135      '#title' => t('Release'),      '#title' => t('Release'),
136      '#type' => 'textfield',      '#type' => 'textfield',

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.3