summaryrefslogtreecommitdiff
path: root/templates/apps/membership/edit.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/apps/membership/edit.html')
-rw-r--r--templates/apps/membership/edit.html26
1 files changed, 25 insertions, 1 deletions
diff --git a/templates/apps/membership/edit.html b/templates/apps/membership/edit.html
index 8174aea..06d033b 100644
--- a/templates/apps/membership/edit.html
+++ b/templates/apps/membership/edit.html
@@ -3,6 +3,30 @@
$('#wizard').formwizard({
validationEnabled: true,
focusFirstInput: true,
- textSubmit: "Finish"
+ textSubmit: "Finish",
+ validationOptions: {
+ rules: {
+ username: 'validUser'
+ }
+ }
+ });
+ $('#id_username').autocomplete({
+ source: "/user/search.json",
+ focus: function(event, ui) {
+ $('#id_username').val(ui.item.label);
+ return false;
+ },
+ select: function(event, ui) {
+ $('#id_username').val(ui.item.label);
+ $('#id_user').val(ui.item.value);
+ return false;
+ },
+ minLength: 2,
+ open: function() {
+ $( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
+ },
+ close: function() {
+ $( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
+ }
});
{% endblock %} \ No newline at end of file