<?php

/**
* Provide a admin area view for the plugin
*
* This file is used to markup the admin-facing aspects of the plugin.
*
* @link       http://www.exapartners.com/
* @since      1.0.0
*
* @package    Esi_Management
* @subpackage Esi_Management/admin/partials
*/
global $wpdb;

$item = esi_get_investment_type( $id );

add_thickbox();
?>

<div class="wrap">
    <h1><?php _e( 'Add Investment Type', 'esi' ); ?></h1>

    <form action="" method="post">

        <table class="form-table">
            <tbody>
                <tr class="row-name">
                    <th scope="row">
                        <label for="name"><?php _e( 'Name', 'esi' ); ?></label>
                    </th>
                    <td>
                        <input type="text" name="name" id="name" class="regular-text" placeholder="<?php echo esc_attr( 'Add type name', 'esi' ); ?>" value="<?php echo ($item)?esc_attr( $item->name ):''; ?>" required="required" />
                    </td>
                </tr>
                <tr class="row-description">
                    <th scope="row">
                        <label for="description"><?php _e( 'Description', 'esi' ); ?></label>
                    </th>
                    <td>
                        <textarea name="description" id="description"placeholder="<?php echo esc_attr( '', 'esi' ); ?>" rows="5" cols="30" required="required"><?php echo ($item)?esc_attr( $item->description ):''; ?></textarea>
                    </td>
                </tr>
            </tbody>
        </table>

        <input type="hidden" name="field_id" value="<?php echo ($item)?$item->id:0; ?>">

        <?php wp_nonce_field( '' ); ?>
        <?php submit_button( __( 'Add investment type', 'esi' ), 'primary', 'submit investment type' ); ?>

    </form>
</div>
