server/templates/delete_persona_tmpl.php
author Ryan Doherty <rdoherty@mozilla.com>
Thu, 28 May 2009 09:16:31 -0700
changeset 965 beb5d013a799f5134fb2edb17e03e546659d9f05
parent 952 6d930b1e2f9c9beddc5bc309e8dbf0a94b1c84f3
child 1114 117d9501f8675c03537e08e8a473e1feaf1d57e4
permissions -rw-r--r--
Bug 494002 - Website: Allow existing users to edit their user display name and description

<?php 
	error_log($persona['author']);
	error_log($auth_user);
	$delete_require = $persona['author'] != $auth_user ? "onsubmit=\"if ($('#formreason').val() == '') {alert('Please provide a reason for deletion'); return false;}\"" : "";
	$title = "Delete your Persona"; include 'header.php'; 
?>
<body>
    <div id="outer-wrapper">
        <div id="inner-wrapper">
<?php include 'nav.php'; ?>
            <div id="header">
                <h2>Delete Your Persona</h2>
                <h3>Thanks for sharing your persona with us.</h3>
            </div>
            <div id="maincontent">
                <p id="breadcrumbs"><a href="http://www.getpersonas.com">Personas Home</a> : Delete Your Persona</p>
                
<?php include 'persona_detail.php' ?>
<?php if(!$override_error && $persona) { ?>
                <form method="POST" action="/delete/<?= $persona['id'] ?>" enctype='multipart/form-data' <?= $delete_require ?>>
					<input type="hidden" name="id" value="<?= htmlspecialchars($persona['id']) ?>">
					<input type="hidden" name="confirm" value="1">
					<p class="continue">
<?php 	if($persona['author'] != $auth_user) { ?>
						Delete Reason: <input type="text" name="dreason" id=formreason> 
<?php 	} ?>
						<button type="submit" class="button"><span>confirm deletion</span><span class="arrow">&nbsp;</span></button>
					</p>
            	</form>
<?php } ?>
            </div>
            <div id="secondary-content">
              <ol id="upload-steps">
                <li class="current">
                    <div class="wrapper">
                        <h3>Step 1:</h3>
                        <h4><?= $title ?></h4>
                    </div>
                </li>
                <li>
                    <h3>Step 2:</h3>
                    <h4>Finish</h4>
                </li>
              </ol>
            </div>
        </div>
    </div>
<?php include 'footer.php'; ?>
    <script type="text/javascript" charset="utf-8">
        $(document).ready(function () {
            $("#header").ie6Warning({"message":'<div id="ie6">Upgrade your browser to get the most out of this website. <a href="%LINK%">Download Firefox for free</a>.</div>'});
            $("#try-button").personasButton({
                                        'hasPersonas':'<span>wear this</span><span>&nbsp;</span>',
                                        'hasFirefox':'<span>get personas now!</span><span>&nbsp;</span>',
                                        'noFirefox':'<span>get personas with firefox</span><span>&nbsp;</span>'
                                        });
        });
    </script>
</body>
</html>