<?php
/**
 * Maho
 *
 * @category    design
 * @package     default_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2022-2024 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/**
 * Install mysql database configuration template
 *
 * @see Mage_Install_Block_Config
 * @var Mage_Install_Block_Config $this
 */
?>
<li>
    <div class="input-box">
        <label for="host"><?= $this->__('Host') ?> <span class="required">*</span></label><br />
        <input type="text" name="connection[<?= $this->getIdPrefix()?>][db_host]" id="host" value="<?= $this->getFormData()->getDbHost() ?>" title="<?= Mage::helper('core')->quoteEscape($this->__('Database host')) ?>" class="required-entry input-text" />
        <p style="margin-top:4px; line-height:1.3em; color:#666;">
            <small><?= $this->__('You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock') ?></small>
        </p>
    </div>
    <div class="input-box">
        <label for="dbname"><?= $this->__('Database Name') ?> <span class="required">*</span></label><br />
        <input type="text" name="connection[<?= $this->getIdPrefix()?>][db_name]" id="dbname" value="<?= $this->getFormData()->getDbName() ?>" title="<?= Mage::helper('core')->quoteEscape($this->__('Database Name')) ?>" class="required-entry input-text" />
    </div>
</li>
<li>
    <div class="input-box">
        <label for="user"><?= $this->__('User Name') ?> <span class="required">*</span></label><br />
        <input type="text" name="connection[<?= $this->getIdPrefix()?>][db_user]" id="user" value="<?= $this->getFormData()->getDbUser() ?>" title="<?= Mage::helper('core')->quoteEscape($this->__('Database user name')) ?>" class="required-entry input-text" />
    </div>
    <div class="input-box">
        <label for="password"><?= $this->__('User Password') ?></label><br />
        <input type="password" name="connection[<?= $this->getIdPrefix()?>][db_pass]" id="password" value="" title="<?= Mage::helper('core')->quoteEscape($this->__('Database user password')) ?>" class="input-text" />
    </div>
</li>
<li>
    <div class="input-box">
        <label for="prefix"><?= $this->__('Tables Prefix') ?></label><br />
        <input type="text" name="connection[<?= $this->getIdPrefix()?>][db_prefix]" id="prefix" value="<?= $this->getFormData()->getDbPrefix() ?>" title="<?= Mage::helper('core')->quoteEscape($this->__('Tables Prefix')) ?>" class="validate-data input-text" />
        <p style="margin-top:4px; line-height:1.3em; color:#666;">
            <small><?= $this->__('(Optional. Leave blank for no prefix)') ?></small>
        </p>
    </div>
</li>
