diff --git a/hosting_sync/hosting_sync.tasks.inc b/hosting_sync/hosting_sync.tasks.inc index 4c9c2f5..d890219 100644 --- a/hosting_sync/hosting_sync.tasks.inc +++ b/hosting_sync/hosting_sync.tasks.inc @@ -230,10 +230,6 @@ function hosting_task_sync_form($node) { $parents = array('parameters', 'source'); - if (!empty($sites)) { - $form['source'] = array_merge($form['source'], _hosting_sync_sites_elements($node, $sites, $parents)); - } - // TODO setting or access control? if (1) { $form['source']['custom_alias'] = array( @@ -259,12 +255,20 @@ function hosting_task_sync_form($node) { ), ); } - elseif (empty($sites)) { + + if (!empty($sites)) { + $form['source'] = array_merge($form['source'], _hosting_sync_sites_elements($node, $sites, $parents)); + } else { $elements['none'] = array( '#type' => 'item', '#markup' => t('No sources are currently available.'), ); } + $form['destination'] = array( + '#type' => 'value', + '#value' => '@' . $node->hosting_name, + ); + $form['destination'] = array( '#type' => 'value',