original_string: public function AddPackageForm() {
          $sng=singleton('SnippetPackage');
          
          $fields=new FieldList(
                              new TabSet('Root',
                                      new Tab('Main', _t('PackageSelectionField.MAIN', '_Main'),
                                              new TextField('Title', _t('PackageSelectionField.TITLE', '_Title'), null, 300)
                                          )
                                  )
                          );
          
          $actions=new FieldList(
                                  FormAction::create('doAddPackage', _t('PackageSelectionField.CREATE', '_Create'))
                                                      ->addExtraClass('ss-ui-action-constructive')
                                                      ->setAttribute('data-icon', 'accept')
                                                      ->setUseButtonTag(true)
                              );
          
          $validator=new RequiredFields(
                                      'Title'
                                  );
          
          return Form::create($this, 'AddPackageForm', $fields, $actions, $validator)
                              ->addExtraClass('member-profile-form')
                              ->setFormAction($this->Link('AddPackageForm'));
      }
code: public function AddPackageForm() {
          $sng=singleton('SnippetPackage');
          
          $fields=new FieldList(
                              new TabSet('Root',
                                      new Tab('Main', _t('PackageSelectionField.MAIN', '_Main'),
                                              new TextField('Title', _t('PackageSelectionField.TITLE', '_Title'), null, 300)
                                          )
                                  )
                          );
          
          $actions=new FieldList(
                                  FormAction::create('doAddPackage', _t('PackageSelectionField.CREATE', '_Create'))
                                                      ->addExtraClass('ss-ui-action-constructive')
                                                      ->setAttribute('data-icon', 'accept')
                                                      ->setUseButtonTag(true)
                              );
          
          $validator=new RequiredFields(
                                      'Title'
                                  );
          
          return Form::create($this, 'AddPackageForm', $fields, $actions, $validator)
                              ->addExtraClass('member-profile-form')
                              ->setFormAction($this->Link('AddPackageForm'));
      }
code_tokens: public function AddPackageForm ( ) { $ sng = singleton ( 'SnippetPackage' ) ; $ fields = new FieldList ( new TabSet ( 'Root' , new Tab ( 'Main' , _t ( 'PackageSelectionField.MAIN' , '_Main' ) , new TextField ( 'Title' , _t ( 'PackageSelectionField.TITLE' , '_Title' ) , null , 300 ) ) ) ) ; $ actions = new FieldList ( FormAction :: create ( 'doAddPackage' , _t ( 'PackageSelectionField.CREATE' , '_Create' ) ) -> addExtraClass ( 'ss-ui-action-constructive' ) -> setAttribute ( 'data-icon' , 'accept' ) -> setUseButtonTag ( true ) ) ; $ validator = new RequiredFields ( 'Title' ) ; return Form :: create ( $ this , 'AddPackageForm' , $ fields , $ actions , $ validator ) -> addExtraClass ( 'member-profile-form' ) -> setFormAction ( $ this -> Link ( 'AddPackageForm' ) ) ; }
docstring: Generates the form for adding packages
  @return {Form} Form to be used
docstring_tokens: Generates the form for adding packages