<?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@magentocommerce.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.magentocommerce.com for more information.
 *
 * @category   design_default
 * @package    Mage
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php if($this->canDisplayGiftmessage()): ?>
<div id="<?php echo $this->getHtmlId() ?>" class="giftmessage-whole-order-container">
    <div class="entry-edit">
        <div class="entry-edit-head">
            <h4><?php echo Mage::helper('sales')->__('Gift Message for Entire Order') ?></h4>
        </div>
        <form id="<?php echo $this->getFieldId('form') ?>" action="<?php echo $this->getSaveUrl() ?>">
          <fieldset>
              <input type="hidden" id="<?php echo $this->getFieldId('type') ?>" name="<?php echo $this->getFieldName('type') ?>" value="order" />
              <table width="100%" cellspacing="0">
                <tbody>
                  <tr>
                      <td class="label"><label><?php echo Mage::helper('sales')->__('From Name') ?></label></td>
                      <td class="input-ele"><input class="input-text" type="text" id="<?php echo $this->getFieldId('sender') ?>" name="<?php echo $this->getFieldName('sender') ?>" value="<?php echo $this->htmlEscape($this->getMessage()->getSender()) ?>" /></td>
                      <td>&nbsp;</td>
                      <td class="label"><label><?php echo Mage::helper('sales')->__('To Name') ?></label></td>
                      <td class="input-ele"><input class="input-text" type="text" id="<?php echo $this->getFieldId('recipient') ?>" name="<?php echo $this->getFieldName('recipient') ?>"  value="<?php echo $this->htmlEscape($this->getMessage()->getRecipient()) ?>" /></td>
                  </tr>
                  <tr>
                      <td class="label" colspan="6"><label for="<?php echo $this->getFieldId('message') ?>"><?php echo Mage::helper('sales')->__('Gift Message') ?></label></td>
                  </tr>
                  <tr>
                      <td colspan="5"><textarea style="height:8em;" id="<?php echo $this->getFieldId('message') ?>" onchange="giftMessagesController.toogleRequired('<?php echo $this->getFieldId('message') ?>', ['<?php echo $this->getFieldId('sender') ?>','<?php echo $this->getFieldId('recipient') ?>']);" name="<?php echo $this->getFieldName('message') ?>" rows="2" cols="15"><?php echo $this->htmlEscape($this->getMessage()->getMessage()) ?></textarea></td>
                  </tr>
                  <tr>
                      <td colspan="5" class="a-right" style="padding-top:5px;"><?php echo $this->getSaveButtonHtml(); ?></td>
                  </tr>
                </tbody>
              </table>
          </fieldset>
        </form>
    </div>
</div>
<?php endif ?>
