Example #1
0
 /**
  * Given the current wizard state, determines the next state.
  */
 public function processState()
 {
     $state = $_POST[LONGTAIL_KEY . "state"];
     if (isset($_POST["breadcrumb"]) && !empty($_POST["breadcrumb"])) {
         $state = $_POST["breadcrumb"];
     }
     switch ($state) {
         case BasicState::getID():
             $state = new BasicState($_POST[LONGTAIL_KEY . "config"]);
             break;
         case AdvancedState::getID():
             $state = new AdvancedState($_POST[LONGTAIL_KEY . "config"]);
             break;
         case LTASState::getID():
             $state = new LTASState($_POST[LONGTAIL_KEY . "config"]);
             break;
         case PluginState::getID():
             $state = new PluginState($_POST[LONGTAIL_KEY . "config"]);
             break;
         default:
             $state = new PlayerState($_POST[LONGTAIL_KEY . "config"]);
             break;
     }
     $this->processPost($state);
 }
Example #2
0
 protected function getBreadcrumbBar(&$form, $form_state)
 {
     $form["Breadcrumbs"] = array("#prefix" => "<div id='breadcrumbs'>", "#suffix" => "</div>");
     $form["Breadcrumbs"][LONGTAIL_KEY . BasicState::getID()] = array("#type" => "radio", "#id" => LONGTAIL_KEY . BasicState::getID(), "#printed" => true, "#name" => "breadcrumb", "#title" => BasicState::getTitle(), "#return_value" => BasicState::getID(), "#default_value" => $this->getID());
     $form["Breadcrumbs"][LONGTAIL_KEY . AdvancedState::getID()] = array("#type" => "radio", "#id" => LONGTAIL_KEY . AdvancedState::getID(), "#name" => "breadcrumb", "#title" => AdvancedState::getTitle(), "#return_value" => AdvancedState::getID(), "#default_value" => $this->getID());
     $form["Breadcrumbs"][LONGTAIL_KEY . LTASState::getID()] = array("#type" => "radio", "#id" => LONGTAIL_KEY . LTASState::getID(), "#name" => "breadcrumb", "#title" => LTASState::getTitle(), "#return_value" => LTASState::getID(), "#default_value" => $this->getID());
     $form["Breadcrumbs"][LONGTAIL_KEY . PluginState::getID()] = array("#type" => "radio", "#id" => LONGTAIL_KEY . PluginState::getID(), "#name" => "breadcrumb", "#title" => PluginState::getTitle(), "#return_value" => PluginState::getID(), "#default_value" => $this->getID());
 }
Example #3
0
 /**
  * @see FlashVarState::getButtonBar()
  * @param $form
  * @param bool $show_previous
  */
 protected function getButtonBar(&$form, $show_previous = true)
 {
     $this->buttonBar($form, BasicState::getID(), $show_previous);
 }
Example #4
0
    protected function getBreadcrumbBar()
    {
        ?>
    <script type="text/javascript">
      jQuery(function() {
        jQuery("#breadcrumbs").buttonset();
      });
    </script>
    <div id="breadcrumbs" style="padding: 14px 15px 3px 0;">
      <input type="radio" id="<?php 
        echo LONGTAIL_KEY . BasicState::getID();
        ?>
" name="breadcrumb" <?php 
        checked(BasicState::getID(), $this->getID());
        ?>
 value="<?php 
        echo BasicState::getID();
        ?>
" onchange="form.submit();"/>
      <label for="<?php 
        echo LONGTAIL_KEY . BasicState::getID();
        ?>
">
        <?php 
        echo BasicState::getTitle();
        ?>
      </label>
      <input type="radio" id="<?php 
        echo LONGTAIL_KEY . AdvancedState::getID();
        ?>
" name="breadcrumb" <?php 
        checked(AdvancedState::getID(), $this->getID());
        ?>
 value="<?php 
        echo AdvancedState::getID();
        ?>
" onchange="form.submit();" />
      <label for="<?php 
        echo LONGTAIL_KEY . AdvancedState::getID();
        ?>
">
        <?php 
        echo AdvancedState::getTitle();
        ?>
      </label>
      <input type="radio" id="<?php 
        echo LONGTAIL_KEY . LTASState::getID();
        ?>
" name="breadcrumb" <?php 
        checked(LTASState::getID(), $this->getID());
        ?>
 value="<?php 
        echo LTASState::getID();
        ?>
" onchange="form.submit();" />
      <label for="<?php 
        echo LONGTAIL_KEY . LTASState::getID();
        ?>
">
        <?php 
        echo LTASState::getTitle();
        ?>
      </label>
      <input type="radio" id="<?php 
        echo LONGTAIL_KEY . PluginState::getID();
        ?>
" name="breadcrumb" <?php 
        checked(PluginState::getID(), $this->getID());
        ?>
 value="<?php 
        echo PluginState::getID();
        ?>
" onchange="form.submit();" />
      <label for="<?php 
        echo LONGTAIL_KEY . PluginState::getID();
        ?>
">
        <?php 
        echo PluginState::getTitle();
        ?>
      </label>
    </div>
  <?php 
    }