<form id="notes-form" action="<?php echo $form_url; ?>" method="post">
    <?php if (isset($updateMessage))
    {
        ?>
        <div id="message-update" class="error alert alert-error"> <?php echo $updateMessage; ?>  </div>
    <?php } ?>
    <?php if (isset($successMessage))
    {
        ?>
        <div id="message-update" class="success alert alert-success"> <?php echo $successMessage; ?>  </div>
<?php } ?>

    <div class="control-group">
        <div class="controls">
            <textarea class="field span6"  name="Message"></textarea>
        </div>
    </div>

    <input type="hidden" name="nid" value="<?= htmlspecialchars($nid) ?>"/>
    <input type="hidden" name="hostkey" value="<?= htmlspecialchars($hostkey) ?>"/>
    <div class="pull-right">
        <button type="button" id="closeNotes" class="btn btn-large">Cancel</button>
        <button type="submit" name="submitButton" class="btn btn-primary btn-large" value="Add note">Add note</button>
    </div>

</form>

<script type="text/javascript">


        $('.ui-icon-closethick').html('×');

        $('#closeNotes').click(function(event) {
            $(this).closest('.ui-dialog-content').dialog('close');
            event.preventDefault();
        });

</script>
