{*<!--

+---------------------------------------------------------------------------+
| OpenX v2.8                                                                |
| =========                                                                 |
|                                                                           |
| Copyright (c) 2003-2009 OpenX Limited                                     |
| For contact details, see: http://www.openx.org/                           |
|                                                                           |
| This program is free software; you can redistribute it and/or modify      |
| it under the terms of the GNU General Public License as published by      |
| the Free Software Foundation; either version 2 of the License, or         |
| (at your option) any later version.                                       |
|                                                                           |
| This program is distributed in the hope that it will be useful,           |
| but WITHOUT ANY WARRANTY; without even the implied warranty of            |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
| GNU General Public License for more details.                              |
|                                                                           |
| You should have received a copy of the GNU General Public License         |
| along with this program; if not, write to the Free Software               |
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |
+---------------------------------------------------------------------------+
$Id: adsense-create.html 62345 2010-09-14 21:16:38Z chris.nutting $

-->

<table border='0' width='100%' cellpadding='0' cellspacing='0'>
*}

<div id="adsense-create-form" {if $hide}style="display: none"{/if}>
  {*
    Information message, do not display when the error messages below are displayed.
  *}
  {if true}
  <div class="infomessage">
    Please provide an address to which Google will send an email requesting a bit more
    information from you to get your Google AdSense account set up. Also, provide a name for
    this account within OpenX.
  </div>
  {/if}

  {*
    Error message to be shown when there already is an AdSense account
    associated with the provided email.
  *}
  {if false}
  <div class="errormessageicon">
    There is already an AdSense account associated with email: <b>test@test.com</b>. Please
    provide a different e-mail address or <a href="adsense-link.php?email=test@test.com">link OpenX to this existing AdSense account</a>.
    {*
      TODO: It would be good to prefill the Email field on the adsense-link screen reachable
      from the link above with the Email address the user has typed.
    *}
  </div>
  {/if}

  <form id="adsense-create" class="validate" action="adsense-accounts.php">
    <input type="hidden" name="info" value="linked" />
    {include file=edit-table/create.html from=$fields}

    <div class="terms" style="margin-top: 30px">
      {include file=adsense-terms.html}
    </div>

    <input type="checkbox" id="termsconsent" />
    <label class="cb" for="termsconsent">I have read and understood Google AdSense terms of service</label>

    <div class="controls">
      <input id="submit" value="Create AdSense Account" class="main-submit" type="submit" {tabindex}>
      <span id="termshint" class="hint">To create AdSense account, you must agree to terms of service above</span>
    </div>
  </form>
</div>

<script>
{literal}
  $(document).ready(function() {
    var checkTerms = function() {
      var checkbox = $("#termsconsent")[0];
      if (checkbox.checked) {
        $("#termshint").fadeOut();
        $("#submit").attr("disabled", false);
      }
      else {
        $("#termshint").fadeIn();
        $("#submit").attr("disabled", true);
      }
    };
    $("#termsconsent").click(checkTerms);
    checkTerms();
  });
{/literal}
</script>

{*
</table>
*}
