You are here

function _scs_get_sorting_form in Simplenews Content Selection 7

Helper form: get the sorting form for the provided nodes

Parameters

$form:

$nodes:

Return value

mixed

2 calls to _scs_get_sorting_form()
scs_node_selection in ./scs.module
Page callback: Node selection page also known as the first way to use this module
scs_views_create_newsletter_action_form in simplenews_content_selection_views/scs_views.module
Configuration form for tis action. Not used as form, but used as a step to go to the node sorter.

File

./scs.module, line 311
Select Drupal content to create a newsletter

Code

function _scs_get_sorting_form($form, $nodes) {
  $form['nodes']['#tree'] = TRUE;

  // Create elements for the tablesort
  foreach ($nodes as $nid) {
    $form['nodes'][$nid] = array(
      'weight' => array(
        '#type' => 'weight',
        '#attributes' => array(
          'class' => array(
            'node-weight',
          ),
        ),
      ),
    );
  }
  $form['#theme'] = 'scs_sortable_table';
  return $form;
}