<?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
 * @package     default_iphone
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php
/**
 * Ship to multiple address template
 *
 * @see Mage_Checkout_Block_Multishipping_Addresses
 */
?>
<div class="in-page">
    <form id="checkout_multishipping_form" action="<?php echo $this->getPostActionUrl() ?>" method="post">
    <div class="page-head col2-set">
        <div class="col-1" style="width:60%;">
            <h3><?php echo $this->__('Ship to Multiple Addresses') ?></h3>
        </div>
        <div class="col-2 a-right" style="width:38%;">
            <button class="form-button-alt" type="button" onclick="$('add_new_address_flag').value=1; $('checkout_multishipping_form').submit();"><span><?php echo $this->__('New Address') ?></span></button>
        </div><div class="clear" />
    </div><br />
    <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
    <fieldset>
        <input type="hidden" name="continue" value="0" id="can_continue_flag"/>
        <input type="hidden" name="new_address" value="0" id="add_new_address_flag" />
        <table cellspacing="0" id="multiship-addresses-table" class="shopping-cart multicheckout">
            <tbody>
            <?php foreach ($this->getItems() as $_index => $_item): ?>
                <tr style="background:#D2D3D3;">
                    <td class="a-right v-top"><strong><?php echo $this->__('Product: ') ?></strong></td>
                    <td class="v-top">
                        <?php echo $this->getItemHtml($_item->getQuoteItem())?>
                    </td>
                    <td class="v-top"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>"><img src="<?php echo $this->getSkinUrl('images/btn_trash.gif') ?>" width="16" height="16" alt="<?php echo $this->__('Remove Item') ?>" /></a></td>
                </tr>
                <tr>
                    <td class="a-right v-top" style="padding-top:8px;"><strong><?php echo $this->__('Qty: ') ?></strong></td>
                    <td class="v-top" colspan="2"><input name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->htmlEscape($_item->getQty()) ?>" size="2" class="input-text qty" /></td>
                </tr>
                <tr>
                    <td class="a-right v-top" style="padding-top:8px;"><strong><?php echo $this->__('Send to: ') ?></strong></td>
                    <td class="v-top select250inner" colspan="2"><?php echo $this->getAddressesHtmlSelect($_item, $_index) ?></td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
        <script type="text/javascript">decorateTable('multiship-addresses-table')</script>
        <div class="col2-set" style="margin:10px 0;">
            <div class="col-1" style="padding:8px 0;"><a href="<?php echo $this->getBackUrl() ?>" class="left"><?php echo $this->__('&laquo; Back to Shopping Cart') ?></a></div>
            <div class="col-2 a-right"><button class="form-button-alt" type="submit" onclick="$('can_continue_flag').value=0"><span><?php echo $this->__(' Update ') ?></span></button></div><div class="clear"></div>
        </div>
        <div class="a-center" style="margin:15px 0;">
            <button class="form-button" type="submit" onclick="$('can_continue_flag').value=1"><span><?php echo $this->__('Continue to Shipping Information') ?></span></button>
        </div>
        <div style="margin:20px 0;"></div>
    </fieldset>
    </form>
</div>
