зеркало из https://github.com/mozilla/gecko-dev.git
Fixed css and templates for login/comment/logout/createaccount.
Probably missed a couple of items, but will get to that tomorrow night. Stored CSS in forms.css so we can reuse it for other forms.
This commit is contained in:
Родитель
16694bbe3b
Коммит
475fdad335
|
@ -110,7 +110,7 @@ $website_value = array_key_exists('website', $_POST) ? $_POST['website'] :
|
|||
|
||||
// Assign template variables.
|
||||
$tpl->assign(
|
||||
array( 'title' => 'Create a Mozilla Addons Account',
|
||||
array( 'title' => 'Create an Account',
|
||||
'currentTab' => null,
|
||||
'account_created' => $account_created,
|
||||
'bad_input' => $_bad_input,
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
.amo-form div {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.amo-submit {
|
||||
background-color: #cfc;
|
||||
border: 2px #999 outset;
|
||||
}
|
||||
|
||||
.amo-submit:hover {
|
||||
background-color: #fff;
|
||||
border: 2px #999 inset;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.amo-cancel {
|
||||
}
|
||||
|
||||
.amo-label-large, .amo-label-medium, .amo-label-small {
|
||||
border-bottom: 1px dashed #eee;
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.amo-label-large {
|
||||
width: 14em;
|
||||
}
|
||||
|
||||
.amo-label-medium {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.amo-label-small {
|
||||
width: 8em;
|
||||
}
|
||||
|
||||
.amo-label-xsmall {
|
||||
width: 6em;
|
||||
}
|
||||
|
||||
.amo-form-error {
|
||||
background-color: #eee;
|
||||
border: 1px dashed #c66;
|
||||
color: #c00;
|
||||
margin: 5px 0;
|
||||
padding: .5em;
|
||||
}
|
|
@ -1,42 +1,56 @@
|
|||
<h2><strong>{$addon->Name}</strong> » Add a Comment</h2>
|
||||
|
||||
<p class="first">
|
||||
<strong><a href="{$config.webpath}/{$app}/{$addon->ID}/">{$addon->Name} {$addon->Version}</a></strong>,
|
||||
by <a href="{$config.webpath}/{$app}/{$addon->UserID}/author/">{$addon->UserName}</a>,
|
||||
released on {$addon->VersionDateAdded|date_format}
|
||||
</p>
|
||||
|
||||
<h1>{$addon->Name|escape} - Firefox Extension</h1>
|
||||
<p>{$addon->Name|escape} {$addon->Version|escape}, by {$addon->UserName|escape} released on {$addon->DateUpdated|date_format:"%B %d, %Y"}</p>
|
||||
<h2 class="first">Your comments about {$addon->Name|escape}</h2>
|
||||
<div class="front-section">
|
||||
{if $c_added_comment}
|
||||
<p>You comment has been added successfully.</p>
|
||||
<ul>
|
||||
<li><a href="addon.php?id={$addon->ID}">Return to {$addon->Name|escape}</a></li>
|
||||
</ul>
|
||||
{else}
|
||||
<form id="commentform" name="commentform" method="post" action="">
|
||||
<label for="c_rating">Rating:</label>
|
||||
<form id="commentform" class="amo-form" name="commentform" method="post" action="">
|
||||
|
||||
<p>All fields are required.</p>
|
||||
|
||||
<div>
|
||||
<label class="amo-label-small" for="c_rating">Rating:</label>
|
||||
<select id="c_rating" name="c_rating">
|
||||
{html_options values=$rate_select_value output=$rate_select_name selected=$c_rating_value}
|
||||
</select>
|
||||
{if $c_errors.c_rating}
|
||||
<div>
|
||||
<p>Please choose a rating.</p>
|
||||
<div class="amo-form-error">
|
||||
Please choose a rating.
|
||||
</div>
|
||||
{/if}
|
||||
<label for="c_title">Title:</label>
|
||||
<input type="text" id="c_title" name="c_title" value="{$c_title_value|escape}"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="amo-label-small" for="c_title">Title:</label>
|
||||
<input type="text" id="c_title" name="c_title" value="{$c_title_value|escape}" size="36" maxlength="255"/>
|
||||
{if $c_errors.c_title}
|
||||
<div>
|
||||
<p>Please provide a title with your comments.</p>
|
||||
<div class="amo-form-error">
|
||||
Please provide a title with your comments.
|
||||
</div>
|
||||
{/if}
|
||||
<label for="c_comments">Comments:</label>
|
||||
<textarea id="c_comments" name="c_comments">{$c_comments_value|escape}</textarea>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="amo-label-small" for="c_comments">Comments:</label>
|
||||
<textarea id="c_comments" name="c_comments" cols="31" rows="7">{$c_comments_value|escape}</textarea>
|
||||
{if $c_errors.c_comments}
|
||||
<div>
|
||||
<p>Please include some valid comments.</p>
|
||||
<div class="amo-form-error">
|
||||
Please include some valid comments.
|
||||
</div>
|
||||
{/if}
|
||||
<input type="submit" id="c_submit" name="c_submit" value="Post" />
|
||||
<p>All fields are required.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input class="amo-submit" type="submit" id="c_submit" name="c_submit" value="Submit Comment »" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<h1 class="first">{$title}</h1>
|
||||
<div class="front-section">
|
||||
<div id="mBody">
|
||||
<h1>{$title}</h1>
|
||||
{if $account_created}
|
||||
<p>Your account has been created successfully. An e-mail has been sent to you
|
||||
with instructions on how to activate your account so you can begin using it.</p>
|
||||
|
@ -7,70 +7,86 @@
|
|||
{else}
|
||||
|
||||
{if $bad_input}
|
||||
<p>Errors were found with your input. Please review the messages below.</p>
|
||||
{else}
|
||||
<p>Joining Mozilla Update is easy! Just fill out the form below and click the join button.</p>
|
||||
<div class="amo-form-error">Errors were found with your input. Please review the messages below.</div>
|
||||
{/if}
|
||||
|
||||
<form name="createaccount" method="post" action="">
|
||||
<form name="createaccount" method="post" action="" class="amo-form">
|
||||
|
||||
<p>Your e-mail address is used as your username to login. You'll also receive a
|
||||
confirmation e-mail to this address. In order for your account to be activated
|
||||
succesfully, you must specify a valid e-mail address.</p>
|
||||
|
||||
{if $error_email_empty}
|
||||
<p>E-Mail address is a required field.</p>
|
||||
<div class="amo-form-error">E-Mail address is a required field.</div>
|
||||
{/if}
|
||||
{if $error_email_malformed}
|
||||
<p>A valid E-Mail address is required.</p>
|
||||
<div class="amo-form-error">A valid E-Mail address is required.</div>
|
||||
{/if}
|
||||
{if $error_emailconfirm_nomatch}
|
||||
<p>The E-Mail addresses do not match.</p>
|
||||
<div class="amo-form-error">The E-Mail addresses do not match.</div>
|
||||
{/if}
|
||||
{if $error_email_duplicate}
|
||||
<p>The E-Mail address you entered is already in use. If this is your
|
||||
<div class="amo-form-error">The E-Mail address you entered is already in use. If this is your
|
||||
account, you can <a href="{$config.webpath}/recoverpassword.php?email={$email_value|escape:"url"}">
|
||||
send yourself a password recovery e-mail</a>.</p>
|
||||
send yourself a password recovery e-mail</a>.</div>
|
||||
{/if}
|
||||
<label for="email">E-Mail Address:</label>
|
||||
<input id="email" name="email" type="text" value="{$email_value|escape}"/>
|
||||
|
||||
<label for="emailconfirm">Confirm E-Mail:</label>
|
||||
<div>
|
||||
<label class="amo-label-large" for="email">E-Mail Address:</label>
|
||||
<input id="email" name="email" type="text" value="{$email_value|escape}"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="amo-label-large" for="emailconfirm">Confirm E-Mail:</label>
|
||||
<input id="emailconfirm" name="emailconfirm" type="text" value="{$emailconfirm_value|escape}"/>
|
||||
</div>
|
||||
|
||||
<p>How do you want to be known to visitors of Mozilla Update? This is your "author
|
||||
name" and it will be shown with your extension/theme listings on the Mozilla Update
|
||||
web site.</p>
|
||||
|
||||
{if $error_name_empty}
|
||||
<p>Name is a required field.</p>
|
||||
<div class="amo-form-error">Name is a required field.</div>
|
||||
{/if}
|
||||
<label for="name">Your Name</label>
|
||||
|
||||
<div>
|
||||
<label class="amo-label-large" for="name">Your Name:</label>
|
||||
<input id="name" name="name" type="text" value="{$name_value|escape}"/>
|
||||
</div>
|
||||
|
||||
<p>If you have a website, enter the URL here. (including the http:// ) Your website
|
||||
will be shown to site visitors on your author profile page. This field is optional;
|
||||
if you don't have a website or don't want it linked to from Mozilla Update, leave
|
||||
this box blank.</p>
|
||||
<label for="website">Your Website</label>
|
||||
<input id="website" name="website" type="text" value="{$website_value|escape}"/>
|
||||
|
||||
<p>Your desired password. This along with your e-mail will allow you to login, so
|
||||
make it something memorable but not easy to guess. Type it in both fields below. The
|
||||
two fields must match.</p>
|
||||
<div>
|
||||
<label class="amo-label-large" for="website">Your Website:</label>
|
||||
<input id="website" name="website" type="text" value="{$website_value|escape}"/>
|
||||
</div>
|
||||
|
||||
{if $error_password_empty}
|
||||
<p>Password is a required field.</p>
|
||||
<div class="amo-form-error">Password is a required field.</div>
|
||||
{/if}
|
||||
{if $error_passwordconfirm_nomatch}
|
||||
<p>The passwords do not match.</p>
|
||||
<div class="amo-form-error">The passwords do not match.</div>
|
||||
{/if}
|
||||
<label for="password">Password:</label>
|
||||
|
||||
<div>
|
||||
<label class="amo-label-large" for="password">Password:</label>
|
||||
<input id="password" name="password" type="password" />
|
||||
</div>
|
||||
|
||||
<label for="passwordconfirm">Confirm Password:</label>
|
||||
<div>
|
||||
<label class="amo-label-large" for="passwordconfirm">Confirm Password:</label>
|
||||
<input id="passwordconfirm" name="passwordconfirm" type="password" />
|
||||
</div>
|
||||
|
||||
<p>Review what you entered above. If everything's correct, click the "Join Mozilla
|
||||
Update" button. If you want to start over, click "Clear Form".</p>
|
||||
<input name="submit" type="submit" value="Join Mozilla Update" />
|
||||
<input name="reset" type="reset" value="Clear Form" />
|
||||
|
||||
<div>
|
||||
<input name="submit" type="submit" value="Join Mozilla Update »" class="amo-submit"/>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="{$config.webpath}/css/cavendish/content.css" title="Cavendish" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="{$config.webpath}/css/base/template.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="{$config.webpath}/css/cavendish/template.css" title="Cavendish" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="{$config.webpath}/css/forms.css" media="screen">
|
||||
<link rel="home" title="Home" href="https://addons.mozilla.org/">
|
||||
<link rel="alternate" type="application/rss+xml" title="New Firefox Extensions Additions" href="{$config.webpath}/rss/?app=firefox&type=E&list=newest">
|
||||
<link rel="icon" href="{$config.webpath}/images/favicon.ico" type="image/png">
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="{$config.webpath}/css/cavendish/content.css" title="Cavendish" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="{$config.webpath}/css/base/template.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="{$config.webpath}/css/cavendish/template.css" title="Cavendish" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="{$config.webpath}/css/forms.css" media="screen">
|
||||
<link rel="home" title="Home" href="https://addons.mozilla.org/">
|
||||
<link rel="icon" href="{$config.webpath}/images/favicon.ico" type="image/png">
|
||||
<script src="{$config.webpath}/js/install.js" type="text/javascript"></script>
|
||||
|
|
|
@ -1,20 +1,28 @@
|
|||
|
||||
<div id="mBody">
|
||||
<h1 class="first">Login</h1>
|
||||
<div class="front-section">
|
||||
{if $login_error}
|
||||
<div>
|
||||
<p>You were not successfully logged in. Check your e-mail address and
|
||||
password and try again.</p>
|
||||
</div>
|
||||
{/if}
|
||||
<form id="front-login" method="post" action="" title="Login to Firefox Add-ons">
|
||||
<form id="front-login" class="amo-form" method="post" action="" title="Login to Firefox Add-ons">
|
||||
|
||||
<div>
|
||||
<label for="username" title="E-Mail Address">E-Mail Address:</label>
|
||||
<input id="username" name="username" type="text" accesskey="u" size="40">
|
||||
<label for="password" title="Password">Password:</label>
|
||||
<input id="password" name="password" type="password" accesskey="p" size="40">
|
||||
<input type="submit" value="Go">
|
||||
</div><a href="createaccount.php">Create an account</a>
|
||||
<label class="amo-label-large" for="username" title="E-Mail Address">E-Mail Address:</label>
|
||||
<input id="username" name="username" type="text" accesskey="u" size="40"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="amo-label-large" for="password" title="Password">Password:</label>
|
||||
<input id="password" name="password" type="password" accesskey="p" size="40"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input class="amo-submit" type="submit" value="Go »"/>
|
||||
</div>
|
||||
|
||||
<p><strong><a href="createaccount.php">Create an account »</a></strong></p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
<div id="mBody">
|
||||
<h1 class="first">Logout</h1>
|
||||
<div class="front-section">
|
||||
Your login information has been forgotten.
|
||||
<p>Your login information has been forgotten.</p>
|
||||
<p><strong><a href="{$config.webpath}/{$app}/">Return to Home »</a></strong></p>
|
||||
</div>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче