antville/code/Members/$Members.skin
Tobi Schäfer 12309653a5 * Decentralized markgettext() calls by moving them from i18n.js to the places where the messages actually are defined
* Added markgettext_macro()
 * Readjusted Admin.dropdown_macro() and the global defineConstants() methods to work with the modified markgettext() calls
 * Updated Members.properties and added SQL patch for lowercasing all membership status due to the modified margettext() calls
 * Added Membership.role_macro() as convenience method
 * Removed syntactic sugar from HopObject.link_macro() and moved it to the compatibility layer to prevent current layouts from breaking
 * Removed obsolete permission for non-existing Image.replace_action()
2010-04-25 17:31:44 +00:00

207 lines
7.1 KiB
Text

<% #main %>
<p class="storyTitle"><% response.title %></p>
<div class="ample">
<% members.link add <% gettext "Add Member" %> prefix="... " %>
</div>
... <% members.link main <% gettext All %> %>
<% members.link owners <% gettext Owners %> prefix="| " %>
<% members.link managers <% gettext Managers %> prefix="| " %>
<% members.link contributors <% gettext Contributors %> prefix="| " %>
<% members.link subscribers <% gettext Subscribers %> prefix="| " %>
<% response.pager %>
<% response.list %>
<% response.pager %>
<% #login %>
<p class="storyTitle"><% response.title %></p>
<script type="text/javascript">
$(function() {
$("form#login").submit(function() {
var name = $("#name").val();
$.ajax({
async: false,
url: '<% members.href salt.js %>',
data: "user=" + encodeURIComponent(name),
dataType: "json",
cache: false,
error: function() { /* ... */ },
success: function(salt) {
var password = $("#password").val();
var token = "<% session.token %>";
$("input:password").val("");
$("#digest").val($.md5($.md5(password + salt) + token));
}
});
return true;
});
});
</script>
<form id="login" method="post" action="<% response.action %>">
<input type="hidden" name="digest" id="digest" />
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="small"><% gettext "Activation Code" suffix=":" %></td>
<td><input type="text" name="activation" id="activation"
value="<% request.activation encoding="form" %>" /></td>
<td colspan="2"></td>
</tr>
<tr>
<td class="small"><% gettext "Username" suffix=":" %></td>
<td><input type="text" name="name" id="name" tabindex="1"
value="<% request.name encoding="form" %>" /></td>
<td rowspan="4"> </td>
<td class="small"><% members.link register <% gettext
"Not registered yet\?" %> %></td>
</tr>
<tr>
<td class="small"><% gettext Password suffix=: %></td>
<td><input type="password" name="password" id="password" tabindex="2" /></td>
<td class="small"><% members.link reset <% gettext
"Password forgotten\?" %> %></td>
</tr>
<tr>
<td> </td>
<td colspan="2" class="small"><input type="checkbox" id="remember"
name="remember" tabindex="3" <% if <% request.remember %> is "on" then
'checked="checked"' %> />
<label for="remember"><% gettext "Remember Login" %></label></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><br />
<button type="submit" id="submit" name="login" value="1"
tabindex="4"><% gettext Login %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</td>
</tr>
</table>
</form>
<% #register %>
<p class="storyTitle"><% response.title %></p>
<script type="text/javascript">
$(function() {
$("form#register").submit(function() {
var token = "<% session.token %>";
var password = $("#password").val();
var passwordConfirm = $("#passwordConfirm").val();
$("input:password").val("");
// Check both passwords but let the server do the error handling
if (!password || !passwordConfirm) {
return true;
} else if (password !== passwordConfirm) {
$("#password").val(0);
$("#passwordConfirm").val(1);
return true;
}
var hash = $.md5(password + token);
$("#hash").val(hash);
return true;
});
});
</script>
<form id="register" method="post" action="<% response.action %>">
<input type="hidden" name="hash" id="hash" />
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="small"><% gettext "Activation Code" suffix=":" %></td>
<td><input type="text" name="activation" id="activation"
value="<% request.activation encoding="form" %>" /></td>
</tr>
<tr>
<td class="small"><% gettext Username suffix=: %></td>
<td><input type="text" name="name"
value="<% request.name encoding="form" %>" /></td>
</tr>
<tr>
<td class="small"><% gettext e-mail suffix=: %></td>
<td><input type="text" name="email"
value="<% request.email encoding="form" %>" /></td>
</tr>
<tr>
<td class="small"><% gettext Password suffix=: %></td>
<td><input type="password" name="password" id="password" /></td>
</tr>
<tr>
<td class="small"><% gettext "Confirm Password" suffix=: %></td>
<td><input type="password" name="passwordConfirm" id="passwordConfirm" /></td>
</tr>
<tr>
<td></td>
<td><br />
<button type="submit" id="submit" name="register"
value="register"><% gettext Register %></button>
<a href="" class="cancel"><% gettext Cancel %></a></td>
</tr>
</table>
</form>
<% #reset %>
<p class="storyTitle"><% response.title %></p>
<p class="small"><% gettext "Enter your username and the e-mail address you
have used when you registered. You will then receive a confirmation e-mail
containing further instructions." %></p>
<form id="login" method="post" action="<% response.action %>">
<div class="small"><% gettext Username suffix=: %></div>
<div><input type="text" name="name" id="name" size="15" tabindex="1"
value="<% request.name encoding="form" %>" /></div>
<div class="small"><% gettext e-mail suffix=: %></div>
<div><input type="text" name="email" id="email" size="15" tabindex="2"
value="<% request.email encoding="form" %>"/></div>
<br />
<button type="submit" id="submit" name="reset" value="1"
tabindex="4"><% gettext "Send Request" %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</form>
<% #password %>
<p class="storyTitle"><% response.title %></p>
<form id="login" method="post" action="<% response.action %>">
<div class="small"><% gettext Password suffix=: %></div>
<div><input type="password" name="password" id="password" size="15" tabindex="1" /></div>
<div class="small"><% gettext "Confirm Password" suffix=: %></div>
<div><input type="password" name="passwordConfirm" id="passwordConfirm"
size="15" tabindex="2" /></div>
<input type="hidden" name="user" id="user" value="<% request.user %>" />
<input type="hidden" name="token" id="token" value="<% request.token %>" />
<br />
<button type="submit" id="submit" name="save" value="1"
tabindex="4"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</form>
<% #add %>
<p class="storyTitle"><% response.title %></p>
<div><% gettext 'Enter a search term to display a list of matching users.' %></div>
<div class="small"><% gettext 'You can use the asterisk * as wildcard.' %></div>
<br />
<form method="post" action="<% response.action %>">
<input type="text" name="term" id="term"
value="<% request.term encoding="form" %>" />
<button type="submit" name="search" value="1"><% gettext Search %></button>
<a href="<% this.href %>"><% gettext Cancel %></a>
</form>
<% response.result %>
<% #results %>
<br />
<form method="post" action="<% response.action %>">
<p class="small">
<% gettext "Select a user from the list below and click the “Add Member” button." %>
</p>
<% param.result %>
<br />
<button type="submit" id="add" name="add" value="1">
<% gettext "Add Member" %>
</button>
</form>
<% #result %>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<input type="radio" name="name" id="<% param.name %>" value="<% param.name %>" />
</td>
<td><label for="<% param.name %>"><% param.name %></label></td>
</tr>
</table>