Advertisement
DrupalCustom

incfunction

Jan 13th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.83 KB | None | 0 0
  1.  
  2. function freeway_dashboard(){
  3.   drupal_add_js(drupal_get_path('module', 'freeway') .'/js/dashboardscript.js');
  4.  
  5.   $statusValue = 'Draft';
  6.   $listOfProjectsIds = array();
  7.   $listOfProjectsDesc = array();
  8.   $node = node_load(arg(1));
  9.   $form = array();
  10.   $url_arg = trim($_GET['status']);
  11.   //echo($url_arg);
  12.  
  13.   $arrayStatus = array(1 =>'Draft',2=>'NotSpecified',3=>'Quote',4=>'Forecasted',5=>'InEvaluation',6=>'Cancelled',7=>'Booked',8=>'InProduction',9=>'Completed',10=>'Closed');
  14.                
  15.             $LoginClient = new SoapClient("https://freeway.demo.lionbridge.com/vojo/FreewayAuth.asmx?wsdl", array("trace"=>1));
  16.             $ServicesLink = new SoapClient("https://freeway.demo.lionbridge.com/vojo/Service.asmx?wsdl", array("trace"=>1));
  17.  
  18.  .....
  19.              
  20.               $form['status_list']=array(
  21.                 '#type'=>'select',
  22.                 '#title' => t('Freeway Project Statuses'),
  23.                 '#options' => $arrayStatus,
  24.                 '#default_value' => t('Select Status'),
  25.                 '#attributes'=> array('onselect' => "populateStatusTables();"),
  26.                 '#weight'=>0,
  27.             );
  28.                          
  29.               //i am guessing the div will be here ?
  30.              
  31.               for($m=0;$m <count($listOfProjectsIds);$m+=1){
  32.                $options[$listOfProjectsIds[$m]] = '';
  33.                $form[$listOfProjectsIds[$m]]['projectID'] = array('#value' =>  $listOfProjectsIds[$m]);
  34.                 $form[$listOfProjectsIds[$m]]['projectDesc'] = array('#value' =>  $listOfProjectsDesc[$m]);
  35.  
  36.               }
  37.              
  38.  
  39.              
  40.  
  41.             $form['featured'] = array(
  42.                     '#type' => 'checkboxes',
  43.                     '#options' => $options,
  44.                     '#multiple' => false,
  45.                    
  46.                 );
  47.                
  48.                
  49.                
  50.             $form['getProjectDetails'] = array(
  51.                     '#type' => 'submit',
  52.                     '#value' => t('Get Details'),
  53.                     '#weight'=>5,
  54.                 );
  55.              
  56.             $form['cancel'] = array(
  57.                     '#type' => 'markup',
  58.                     '#value' => l(t('Cancel'), 'dashboard'),
  59.                     '#weight'=>6,
  60.                 );
  61.  
  62. return $form;
  63.              
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement