From 3bb34584c73e1f1b219c0d0a778a1361410d352e Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Fri, 23 Jul 2010 11:35:21 +0200 Subject: [PATCH] use the "pk" config option --- pyweb/mumble/templates/mumble/mumble.html | 30 ++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/pyweb/mumble/templates/mumble/mumble.html b/pyweb/mumble/templates/mumble/mumble.html index f055d20..4ae1802 100644 --- a/pyweb/mumble/templates/mumble/mumble.html +++ b/pyweb/mumble/templates/mumble/mumble.html @@ -23,19 +23,17 @@ Ext.onReady( function(){ Ext.QuickTips.init(); + var userform = new Ext.ux.MumbleUserForm({ + title: gettext("Registration"), + pk: {{ MumbleAccount.id }}, + submit: function(){ + this.getForm().submit({ params: {serverid: {{MumbleServer.id}}, pk: this.pk } }); + }, + }); + var adminform = new Ext.ux.MumbleForm({ - title: gettext("Administration"), - buttons: [{ - text: "doit", - handler: function( btn ){ - this.ownerCt.ownerCt.getForm().load({ params: {pk: {{ MumbleServer.id }} } }); - } - }, { - text: "submit", - handler: function( btn ){ - this.ownerCt.ownerCt.getForm().submit({ params: {pk: {{ MumbleServer.id }} } }); - } - }] + title: gettext("Administration"), + pk: {{ MumbleServer.id }}, }); var mainpanel = new Ext.Panel({ @@ -52,10 +50,14 @@ xtype: "tabpanel", region: "center", activeTab: 0, - items: [{ + items: [/*{ title: gettext("Registration"), xtype: "{{ RegForm|lower }}", - }, adminform, { + }*/ userform, { + title: gettext("Administration"), + pk: {{ MumbleServer.id }}, + xtype: 'mumbleform', + }, { title: gettext("User texture"), layout: "border", items: [{