<?php
$options = array(
    ''           =>  '',
    'VIRTUAL'    => 'VIRTUAL',
);
$serverType = PMA_Util::getServerType();
if ($serverType == 'MariaDB') {
    $options['PERSISTENT'] = 'PERSISTENT';
} else {
    $options['STORED'] = 'STORED';
}

$expression = '';
if (isset($columnMeta['Expression'])) {
    $expression = $columnMeta['Expression'];
}
?>

<select name="field_virtuality[<?php echo $columnNumber; ?>]"
        id="field_<?php echo $columnNumber; ?>_<?php echo($ci - $ci_offset); ?>"
        class="virtuality">
    <?php foreach ($options as $key => $value): ?>
        <option value="<?php echo $key; ?>"
                <?php if (isset($columnMeta['Extra'])
                    && $key != ''
                    && strpos($columnMeta['Extra'], $key) === 0): ?>
                    selected="selected"
                <?php endif; ?>>
            <?php echo $value; ?>
        </option>
    <?php endforeach; ?>
</select>
<br />
<?php if ($GLOBALS['cfg']['CharEditing'] == 'textarea'): ?>
    <textarea name="field_expression[<?php echo $columnNumber; ?>]"
              cols="15"
              class="textfield
              expression">
        <?php echo htmlspecialchars($expression); ?>
    </textarea>
<?php else: ?>
    <input type="text"
           name="field_expression[<?php echo $columnNumber; ?>]"
           size="12"
           value="<?php echo htmlspecialchars($expression); ?>"
           placeholder="<?php echo __('Expression'); ?>"
           class="textfield expression" />
<?php endif; ?>