'#description'=>t('Registering your Translation Server at the Directory server is optional, however highly recommended as your services will be automatically offered to the network of all the Translation Clients registered at the Directory Server.'),
);
// If we just registered or we have DS do not display radios to choose
// auth action.
if(!$new_registration&&empty($ds)){
$form['auth']['auth_action']=array(
'#type'=>'radios',
'#title'=>t('Directory server authentication'),
'#options'=>array(
'login'=>t('I already have an account at the Directory Server, I will authenticate with my login and password.'),
'register'=>t('I do not have an account at the Directory Server, need to register.'),
'none'=>t('I do not want to connect to the Directory server.'),
'#description'=>t('Please enter the URL of the Directory Server.'),
'#required'=>TRUE,
// When we have new registration, disable this field.
'#disabled'=>$new_registration,
);
// We are going for login action.
if($auth_action=='login'){
if($new_registration){
$form['auth']['info']=array(
'#markup'=>'<div class="messages status">'.
t('Your account at the Directory Server was created. To finish the registration process we have sent you an email with further instructions. Upon completion please authenticate your web site at the Directory server using your Directory Server user name and password that can be entered below.').'</div>'
);
}
$form['auth']['name']=array(
'#type'=>'textfield',
'#title'=>t('User name'),
'#required'=>TRUE,
'#description'=>t('Enter your Directory Server user name.'),
);
$form['auth']['pass']=array(
'#type'=>'password',
'#title'=>t('Password'),
'#required'=>TRUE,
'#description'=>t('Enter your Directory Server password.'),
'#description'=>t('This option provides possibility to setup Translation Server that works out of the box. The setup however is not suitable for production servers, so use it only to try things out.'),
// Note that we need this checked in default to be able to run tests.
'#default_value'=>TRUE,
);
$form['language_capabilities']=array(
'#type'=>'fieldset',
'#title'=>t('Translation Server language capabilities'),
'#description'=>t('Define your server language capabilities using the form below. The selected language pairs will be also added to the admin user account as its translation skills.'),