Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
indicate required files on Edit Listing page for Marketplace (bug 738…
Browse files Browse the repository at this point in the history
…725)
  • Loading branch information
cvan committed Mar 28, 2012
1 parent b070e64 commit db809be
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 59 deletions.
21 changes: 20 additions & 1 deletion media/css/devreg/devhub-forms.less
Expand Up @@ -363,6 +363,9 @@ button.loading-submit:after,
th {
padding-right: 20px;
width: 130px;
.req {
vertical-align: top;
}
}
td {
color: @medium-gray;
Expand Down Expand Up @@ -413,12 +416,28 @@ button.loading-submit:after,
}
}

.login, .modal {
.html-rtl, .login, .modal {
.listing-footer {
text-align: left;
}
}

.html-rtl {
.listing-footer {
button, .button {
margin: 0 0 0 6px;
}
a {
margin: 0 4px 0 0;
}
}
.login, .modal {
.listing-footer {
text-align: right;
}
}
}

.island {
.listing-footer {
margin: 0 -15px -15px -15px;
Expand Down
2 changes: 1 addition & 1 deletion media/css/devreg/manage.less
Expand Up @@ -201,8 +201,8 @@ span.hint {
font-weight: normal;
}
.devhub-form th label {
display: inline-block;
font-weight: bold;
display: inline;
}

form .char-count,
Expand Down
54 changes: 23 additions & 31 deletions mkt/developers/templates/developers/apps/edit/basic.html
@@ -1,4 +1,5 @@
{% from "developers/includes/macros.html" import tip, empty_unless, select_cats, trans_readonly %}
{% from 'developers/includes/macros.html' import empty_unless, required, select_cats, tip, trans_readonly %}
{% set req_if_edit = required() if editable %}
<form method="post" action="{{ url('mkt.developers.apps.section', valid_slug, 'basic', 'edit') }}"
id="addon-edit-basic"
data-baseurl="{{ url('mkt.developers.apps.edit', valid_slug) }}">
Expand All @@ -15,7 +16,9 @@ <h2>
<caption>{{ _('Basic Information for {0}')|f(addon.name) }}</caption>
<tbody>
<tr>
<th><label data-for="name">{{ _("Name") }}</label></th>
<th>
<label data-for="name">{{ _('Name') }}</label> {{ req_if_edit }}
</th>
<td>
{% if editable %}
{{ form.name }}
Expand All @@ -27,14 +30,9 @@ <h2>
</tr>
<tr>
<th>
{% if webapp %}
{# TODO(apps): Finalize copy. #}
{{ tip('App URL',
'Choose a short, unique URL slug for your app.') }}
{% else %}
{{ tip(_("Add-on URL"),
_("Choose a short, unique URL slug for your add-on.")) }}
{% endif %}
{{ tip(_('App URL'),
_('Choose a short, unique URL slug for your app.')) }}
{{ req_if_edit }}
</th>
<td id="slug_edit">
{% if editable %}
Expand Down Expand Up @@ -77,10 +75,10 @@ <h2>
{% if webapp %}
{# TODO(apps): Finalize copy. #}
{{ tip(None,
"A short explanation of your app's basic
functionality that is displayed in search and browse
listings, as well as at the top of your app's
details page.") }}
_("A short explanation of your app's basic
functionality that is displayed in search and browse
listings, as well as at the top of your app's
details page.")) }}
{% else %}
{{ tip(None,
_("A short explanation of your add-on's basic
Expand All @@ -104,18 +102,11 @@ <h2>
</tr>
<tr>
<th>
{% if webapp %}
{# TODO(apps): Finalize copy. #}
{{ tip('Categories',
"Categories are the primary way users browse through apps.
{{ tip(_('Categories'),
_("Categories are the primary way users browse through apps.
Choose any that fit your app's functionality for the
most exposure.") }}
{% else %}
{{ tip(_("Categories"),
_("Categories are the primary way users browse through add-ons.
Choose any that fit your add-on's functionality for the most
exposure.")) }}
{% endif %}
most exposure.")) }}
{{ req_if_edit }}
</th>
<td id="addon-categories-edit"
data-max-categories="{{ amo.MAX_CATEGORIES }}">
Expand All @@ -125,7 +116,9 @@ <h2>
{% for form in cat_form.initial_forms %}
{% if form.disabled %}
<p class="addon-app-cats addon-app-cats-inline">
<b>{{ form.app.pretty }}:</b>
{% if form.app %}
<b>{{ form.app.pretty }}:</b>
{% endif %}
{% set cats = dict(addon.app_categories).get(form.app, []) %}
{{ cats|join(' &middot; ')|safe }}
</p>
Expand Down Expand Up @@ -168,12 +161,12 @@ <h2>
{% endif %}
</td>
</tr>
{% if webapp and waffle.switch('marketplace') %}
<tr>
<th>
{{ tip(loc('Device Types'),
loc('Indicate support for desktop, mobile and tablet
devices.')) }}
{{ tip(_('Device Types'),
_('Indicate support for desktop, mobile and tablet
devices.')) }}
{{ req_if_edit }}
</th>
<td id="addon-device-types-edit">
{% if editable %}
Expand All @@ -190,7 +183,6 @@ <h2>
{% endif %}
</td>
</tr>
{% endif %}
</tbody>
</table>
{% if editable %}
Expand Down
21 changes: 8 additions & 13 deletions mkt/developers/templates/developers/apps/edit/details.html
@@ -1,4 +1,5 @@
{% from "developers/includes/macros.html" import tip, some_html_tip, empty_unless %}
{% from 'developers/includes/macros.html' import empty_unless, required, some_html_tip, tip %}
{% set req_if_edit = required() if editable %}
<form method="post" action="{{ addon.get_dev_url('section', args=['details', 'edit']) }}">
<h2>
{{ loc('App Details') }}
Expand All @@ -15,20 +16,12 @@ <h2>
<th>
<label data-for="description">
{{ _('Description') }}
{% if webapp %}
{# TODO(apps): Finalize copy. #}
{{ tip(None,
"A longer explanation of features, functionality, and
{{ tip(None,
_("A longer explanation of features, functionality, and
other relevant information. This field is displayed
only on the app's details page.") }}
{% else %}
{{ tip(None,
_("A longer explanation of features,
functionality, and other relevant information. This
field is only displayed on the add-on's details
page.")) }}
{% endif %}
only on the app's details page.")) }}
</label>
{{ req_if_edit }}
</th>
<td>
{% if editable %}
Expand Down Expand Up @@ -56,6 +49,7 @@ <h2>
_("Information about your add-on is displayed in this locale
unless you override it with a locale-specific translation.")) }}
{% endif %}
{{ req_if_edit }}
</th>
<td class="addon_edit_locale">
{% if editable %}
Expand Down Expand Up @@ -106,6 +100,7 @@ <h2>
"data is transmitted from a user's computer and how "
"it is used.")) }}
</label>
{{ req_if_edit }}
</th>
<td>
{% if editable %}
Expand Down
2 changes: 1 addition & 1 deletion mkt/developers/templates/developers/apps/edit/media.html
@@ -1,4 +1,4 @@
{% from "developers/includes/macros.html" import tip, empty_unless %}
{% from 'developers/includes/macros.html' import empty_unless, tip %}
<h2>
{{ _('Images') }}
{% if not editable %}
Expand Down
3 changes: 2 additions & 1 deletion mkt/developers/templates/developers/apps/edit/support.html
@@ -1,4 +1,4 @@
{% from "developers/includes/macros.html" import tip, empty_unless %}
{% from 'developers/includes/macros.html' import empty_unless, required, tip %}
<form method="post" action="{{ addon.get_dev_url('section', args=['support', 'edit']) }}">
<h2>
{{ _('Support Information') }}
Expand All @@ -21,6 +21,7 @@ <h2>
If you have different addresses for each language
multiple translations of this field can be added.")) }}
</label>
{{ required() if editable }}
</th>
<td>
{% if editable %}
Expand Down
@@ -1,4 +1,4 @@
{% from "developers/includes/macros.html" import tip, some_html_tip, empty_unless, flags %}
{% from 'developers/includes/macros.html' import empty_unless, flags, some_html_tip, tip %}
<form method="post"
action="{{ addon.get_dev_url('section', args=['technical', 'edit']) }}">
<h2>
Expand Down
@@ -1,4 +1,4 @@
{% from "developers/includes/macros.html" import tip, empty_unless %}
{% from 'developers/includes/macros.html' import empty_unless, required, tip %}

{{ csrf() }}

Expand Down Expand Up @@ -106,15 +106,15 @@
<tr>
{% if context == 'edit' %}
<th>
<label>{{ _("Screenshots") }}</label>
<label>{{ _('Screenshots') }}</label>
{{ required() if editable }}
</th>
{% endif %}
<td class="edit-previews-readonly">
{% if context == 'submit' %}
<label>
{% if webapp %}
{# TODO(apps): Finalize copy. #}
Please provide at least one screen shot of your app:
{{ _('Please provide at least one screen shot of your app:') }}
{% else %}
{% trans %}
Please provide at least one screen shot of your add-on:
Expand Down
13 changes: 7 additions & 6 deletions mkt/developers/templates/developers/includes/macros.html
@@ -1,12 +1,13 @@
{% extends "includes/forms.html" %}

{% macro some_html_tip() %}
<p class="html-support">
{# L10n: {0} is a list of HTML tags. #}
<span class="tooltip" title="{{ _('Allowed HTML: {0}')|f('<a href title> <abbr title>
<acronym title> <b> <blockquote> <code>
<em> <i> <li> <ol> <strong> <ul>')|e }}">{{ _('Some HTML supported.') }}</span>
</p>
<p class="html-support">
{# L10n: {0} is a list of HTML tags. #}
<span class="tooltip" title="{{ _('Allowed HTML: {0}')|f('<a href title> <abbr title> '
'<acronym title> <b> <blockquote> <code> '
'<em> <i> <li> <ol> <strong> <ul>')|e }}">
{{ _('Some HTML supported.') }}</span>
</p>
{% endmacro %}

{% macro empty_unless(truthy) %}
Expand Down

0 comments on commit db809be

Please sign in to comment.