Don't show save button when no flair is available.

This commit is contained in:
Logan Hanks
2011-09-07 13:59:42 -07:00
parent f18a473823
commit 584f4945de
3 changed files with 19 additions and 15 deletions

View File

@@ -700,6 +700,8 @@ ul.flat-vert {text-align: left;}
display: block;
}
.flairselector .error { text-align: center; }
.flairselector ul { float: left; width: 200px; }
.flairselector .selected, .flairselector.active li {

View File

@@ -21,8 +21,8 @@
################################################################################
<h2>${_("select flair")}</h2>
<ul>
%if thing.choices and c.site.flair_self_assign_enabled:
%if thing.choices and c.site.flair_self_assign_enabled:
<ul>
%for choice in thing.choices:
<%
li_class = 'flairsample-%s' % thing.position
@@ -35,16 +35,17 @@
${choice}
</li>
%endfor
%else:
<li class="error">${_("flair selection unavailable")}</li>
%endif
</ul>
<form action="/post/selectflair" method="post">
<div class="flairselection"></div>
<input type="hidden" name="flair_template_id">
<div class="customizer">
${_("customize text")}
<input type="text" size="16" maxlength="64" name="text">
</div>
<button type="submit">${_('save')}</button>
</form>
</ul>
<form action="/post/selectflair" method="post">
<div class="flairselection"></div>
<input type="hidden" name="flair_template_id">
<div class="customizer">
${_("customize text")}
<input type="text" size="16" maxlength="64" name="text">
</div>
<button type="submit">${_('save')}</button>
<span class="status"></span>
</form>
%else:
<div class="error">${_("flair selection unavailable")}</div>
%endif

View File

@@ -46,5 +46,6 @@
<button class="flairtemplateclear">
${_("clear all flair templates")}
</button>
<span class="status"></span>
</form>
</div>