Contributions API

l10n_client_form

Definition

l10n_client_form($form_id, $strings)
contributions/l10n_client/l10n_client.module, line 202

Description

String editing form. Source & selection moved to UI components outside the form. Backed with jquery magic on the client.

@todo This form has nothing to do with different plural versions yet.

Code

<?php
function l10n_client_form($form_id, $strings) {
  global $language;

  // Selector and editing form.
  $form = array();
  $form['#action'] = url('l10n_client/save');

  $form['target'] = array(
    '#type' => 'textarea',
    '#resizable' => false,
    '#rows' => 6,
  );
  $form['save'] = array(
    '#value' => t('Save translation'),
    '#type' => 'submit',
  );
  $form['copy'] = array(
    '#value' => "<input id='edit-copy' class='form-submit' type='button' value='". t('Copy Source') ."'/>",
  );
  $form['clear'] = array(
    '#value' => "<input id='edit-clear' class='form-submit' type='button' value='". t('Clear') ."'/>",
  );
  
  return $form;
}
?>