<?php
if ( ! defined( 'ABSPATH' ) ) exit;

// variables defined in author_edit_view.php
/** @var array $author_data */

?>

    <form action="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>">
        <?php wp_nonce_field('scholar_sync_update_directory_link'); ?>
        <table class="form-table" role="presentation">
            <tbody>
            <input type="hidden" name="page" value="scholar-sync-actions-slug" />
            <input type="hidden" name="action" value="update-author-directory-link" />
            <input type="hidden" name="author-id" value="<?php echo esc_attr(scholar_sync_get_param('author-id')) ?>" />

            <tr class="form-field form-required">
                <th><label for="name">Directory link</label></th>
                <td>
                    <input type="text" name="directory_link" id="directory_link" class="regular-text" value="<?php echo esc_attr($author_data->directory_link)  ?>">
                    <p class="description">This link is required only if the Authors Directory is used, to connect this author to their profile page.</p>
                </td>
            </tr>
            <tr>
                <td>
                    <input type="submit" id="update-author" class="button" value="Save" />
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
