<?php
/**
 * aheadWorks Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://ecommerce.aheadworks.com/LICENSE-M1.txt
 *
 * @category   AW
 * @package    AW_Referafriend
 * @copyright  Copyright (c) 2003-2010 aheadWorks Co. (http://www.aheadworks.com)
 * @license    http://ecommerce.aheadworks.com/LICENSE-M1.txt
 */
?>
<div id="raf-invite" class="a-left">
<div class="group-select"><form id="referafriend-form" method="post" action="<?php echo $this->getFormUrl() ?>">
    <h3 class="a-center"><?php echo $this->__('Refer a Friend') ?></h3>
    <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
	<div class="input-box">
	<ul>
		<li><div class="input-box">
    		<label for="invite:name"><?php echo $this->__('Friend\'s name') ?> <span class="required">*</span></label><br />
    		<input type="text" id="invite:name" name="invite[name]" value="<?php echo $this->htmlEscape($this->getFriendName()) ?>" title="<?php echo $this->__('Name') ?>" class="required-entry input-text" />
    	</div></li>
    	<li><div class="input-box">
    		<label for="invite:email"><?php echo $this->__('Friend\'s email') ?> <span class="required">*</span></label><br />
    		<input type="text" id="invite:email" name="invite[email]" value="<?php echo $this->htmlEscape($this->getEmail()) ?>" title="<?php echo $this->__('Email') ?>" class="required-entry input-text validate-email" />
    	</div></li>
    	<li><div class="input-box">
    		<label for="invite:subject"><?php echo $this->__('Message subject') ?> <span class="required">*</span></label><br />
    		<input type="text" id="invite:subject" name="invite[subject]" value="<?php echo $this->htmlEscape($this->getSubject()) ?>" title="<?php echo $this->__('Subject') ?>" class="required-entry input-text" />
    	</div></li>
        <li><div class="input-box">
    		<label for="invite:message"><?php echo $this->__('Message text') ?> <span class="required">*</span></label><br />
    		<textarea id="invite:message" name="invite[message]" title="<?php echo $this->__('Message') ?>" class="required-entry input-text" rows="5" style="height: 100px;"><?php echo $this->htmlEscape($this->getMessage()) ?></textarea>
            <div>You shouldn't insert any links in the text - they will be added automatically.</div>
    	</div></li>
    	<div id="invite-login-container" <?php echo $this->isLoggedIn()?'style="display:none;"':''?>>
    	<li><div class="input-box">
    		<label for="invite:login"><?php echo $this->__('Account login') ?> <span class="required">*</span></label><br />
    		<input type="text" id="invite:login" name="invite[login]" value="" title="<?php echo $this->__('Login') ?>" class="required-entry input-text" />
    	</div></li>
    	<li><div class="input-box">
    		<label for="invite:password"><?php echo $this->__('Account password') ?> <span class="required">*</span></label><br />
    		<input type="password" id="invite:password" name="invite[password]" value="" title="<?php echo $this->__('Password') ?>" class="required-entry input-text" />
    	</div></li>
    	</div>
    </ul>
	</div>
	<div id="invite-button-container" class="button-set">
    	<span id="invite-please-wait" style="display:none;" class="referafriend-please-wait">
            <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" class="v-middle" alt="" /> &nbsp; <?php echo $this->__('Sending...') ?> &nbsp;
        </span>
		<button class="form-button button" id="referafriend-cancel" type="button" onclick="return false;"><span id="span-referafriend-cancel"><?php echo  $this->__('Cancel') ?></span></button>&nbsp;<button class="form-button button" type="submit"><span><?php echo  $this->__('Submit') ?></span></button>
    </div>
</form>
</div>
</div>
<script type="text/javascript">
    var referafriendForm = new ReferafriendForm('referafriend-form');
</script>
