function OnPageLoad()
    {
        echo new XhtmlElement('h1', Html::Encode('Delete category: ' . $this->data_object->GetName()));
        if ($this->deleted) {
            ?>
			<p>The category has been deleted.</p>
			<p><a href="/yesnosorry/categorylist.php">View all categories</a></p>
			<?php 
        } else {
            if ($this->has_permission) {
                ?>
				<p>Deleting a category cannot be undone.</p>
				<ul>
					<li>Its competitions will not be listed in a category</li>
				</ul> 
					
				<p>Are you sure you want to delete this category?</p>
				<form action="<?php 
                echo Html::Encode($this->data_object->GetDeleteCategoryUrl());
                ?>
" method="post" class="deleteButtons">
				<div>
				<input type="submit" value="Delete category" name="delete" />
				<input type="submit" value="Cancel" name="cancel" />
				</div>
				</form>
				<?php 
            } else {
                ?>
				<p>Sorry, you're not allowed to delete this category.</p>
				<p><a href="/yesnosorry/categorylist.php">Go back to the list of categories</a></p>
				<?php 
            }
        }
    }