예제 #1
0
 /**
  * @see AdminState::render()
  * @param $form
  * @param $form_state
  */
 public function render(&$form, $form_state)
 {
     $ltas = LongTailFramework::getLTASConfig();
     parent::getBreadcrumbBar($form, $form_state);
     $this->selectedPlayer($form, $form_state);
     $form["LTAS"] = array("#type" => "fieldset", "#title" => t("LongTail AdSolution Settings"));
     $value = $form_state["storage"][LONGTAIL_KEY . "plugin_ltas_enable"] ? $form_state["storage"][LONGTAIL_KEY . "plugin_ltas_enable"] : $ltas["enabled"];
     $form["LTAS"][LONGTAIL_KEY . "plugin_ltas_enable"] = array("#type" => "checkbox", "#name" => LONGTAIL_KEY . "plugin_ltas_enable", "#title" => t("Enable LongTail AdSolution"), "#default_value" => $value);
     $form["LTAS"]["description"] = array("#type" => "item", "#description" => JW_PLAYER_LTAS_DESC);
     $value = $_POST[LONGTAIL_KEY . "plugin_ltas_cc"] ? $_POST[LONGTAIL_KEY . "plugin_ltas_cc"] : $ltas["channel_code"];
     $form["LTAS"][LONGTAIL_KEY . "plugin_ltas_cc"] = array("#type" => "textfield", "#name" => LONGTAIL_KEY . "plugin_ltas_cc", "#title" => t("ltas.cc"), "#default_value" => $value, "#description" => "Your LTAS channel code.  Obtained from the <a href=https://dashboard.longtailvideo.com/" . JW_PLAYER_GA_VARS . " target=_blank>AdSolution Dashboard.</a>");
     $this->buttonBar($form, LTASState::getID());
 }
예제 #2
0
    /**
     * @see AdminState::render()
     */
    public function render()
    {
        $ltas = LongTailFramework::getLTASConfig();
        ?>
    <div class="wrap">
      <form name="<?php 
        echo LONGTAIL_KEY . "form";
        ?>
" method="post" action="">
        <?php 
        parent::getBreadcrumbBar();
        ?>
        <?php 
        $this->selectedPlayer();
        ?>
        <p/>
        <div id="poststuff">
          <div id="post-body">
            <div id="post-body-content">
              <div class="stuffbox">
                <h3 class="hndle"><span><?php 
        echo "LongTail AdSolution Settings";
        ?>
</span></h3>
                <div class="inside" style="margin: 15px;">
                  <table class="form-table">
                    <tr>
                      <?php 
        $value = isset($_POST["jwplayermodule_plugin_ltas_enable"]) ? $_POST["jwplayermodule_plugin_ltas_enable"] : isset($ltas["enabled"]) ? $ltas["enabled"] : false;
        ?>
                      <?php 
        unset($_POST["jwplayermodule_plugin_ltas_enable"]);
        ?>
                      <td><input name="jwplayermodule_plugin_ltas_enable" type="checkbox" value="1" <?php 
        checked(true, $value);
        ?>
 />
                      <span>Enable LongTail AdSolution</span>
                      </td>
                    </tr>
                    <tr>
                      <td colspan="2"><span class="description"><?php 
        echo JW_PLAYER_LTAS_DESC;
        ?>
</span></td>
                    </tr>
                    <tr>
                      <?php 
        $value = isset($_POST["jwplayermodule_plugin_ltas_cc"]) ? $_POST["jwplayermodule_plugin_ltas_cc"] : $ltas["channel_code"];
        ?>
                      <?php 
        unset($_POST["jwplayermodule_plugin_ltas_cc"]);
        ?>
                      <th>ltas.cc</th>
                      <td>
                        <input type="text" value="<?php 
        echo $value;
        ?>
" name="jwplayermodule_plugin_ltas_cc" />
                        <span class="description"><?php 
        echo "Your LTAS channel code.  Obtained from the <a href=https://dashboard.longtailvideo.com/" . JW_PLAYER_GA_VARS . " target=_blank>AdSolution Dashboard.</a>";
        ?>
</span>
                      </td>
                    </tr>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
        <?php 
        $this->buttonBar(LTASState::getID());
        ?>
      </form>
    </div>
    <?php 
    }