<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/**
 * Customer login form template
 *
 * @var $this Mage_Oauth_Block_Authorize
 */

$rejectJs = "document.location.href='{$this->getRejectUrl()}';";
?>
<div class="account-login">
    <?php echo $this->getMessagesBlock()->toHtml() ?>
    <?php if (!$this->getHasException()): ?>
        <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
            <?php echo $this->getBlockHtml('formkey'); ?>
            <div class="col1-set">
                <div class="col-1 registered-users">
                    <div class="content" style="margin: 0 auto; padding-bottom: 13px;">
                        <h2><?php echo $this->__('Log in as a customer') ?></h2>
                        <p class="description"><?php echo $this->__('Log in to use <strong>%s</strong>', $this->getConsumer()->getName()) ?></p>
                        <ul class="form-list">
                            <li>
                                <label for="email"><?php echo $this->__('Email Address') ?></label>
                                <div class="input-box">
                                    <input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
                                </div>
                            </li>
                            <li>
                                <label for="pass"><?php echo $this->__('Password') ?></label>
                                <div class="input-box">
                                    <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
                                </div>
                            </li>
                        </ul>
                        <div class="buttons-set" style="margin-top: 20px; padding: 0;">
                            <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2">
                                <span><span><?php echo $this->__('Login') ?></span></span></button>
                            <button type="submit" class="button" onclick="<?php echo $rejectJs; ?>"
                                    title="<?php echo $this->__('Reject') ?>" name="send">
                                <span><span><?php echo $this->__('Reject') ?></span></span></button>
                        </div>
                    </div>
                </div>
            </div>
            <input type="hidden" name="oauth_token" value="<?php echo $this->escapeHtml($this->getToken()) ?>"/>
        </form>
        <script type="text/javascript">
        //<![CDATA[
            var dataForm = new VarienForm('login-form', true);
        //]]>
        </script>
    <?php endif; ?>
</div>
