You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2013/04/25 08:32:23 UTC

svn commit: r1475641 - in /openmeetings/trunk/singlewebapp/src/org/apache/openmeetings: data/user/dao/ persistence/beans/user/ web/components/ web/components/admin/users/ web/components/user/dashboard/ web/components/user/profile/ web/pages/

Author: solomax
Date: Thu Apr 25 06:32:22 2013
New Revision: 1475641

URL: http://svn.apache.org/r1475641
Log:
[OPENMEETINGS-615] Code was refactored to reuse existent User edit functionality

Added:
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.html
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.java
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.html
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.java
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/SettingsPanel.html
      - copied unchanged from r1471821, openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/ProfilePanel.html
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/SettingsPanel.java
      - copied, changed from r1471821, openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/ProfilePanel.java
Removed:
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/ProfilePanel.html
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/ProfilePanel.java
Modified:
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/dao/SalutationDao.java
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Salutation.java
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UserForm.java
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UsersPanel.html
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/MainPage.java

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/dao/SalutationDao.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/dao/SalutationDao.java?rev=1475641&r1=1475640&r2=1475641&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/dao/SalutationDao.java (original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/user/dao/SalutationDao.java Thu Apr 25 06:32:22 2013
@@ -23,10 +23,6 @@ import java.util.List;
 
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Root;
 
 import org.apache.openmeetings.OpenmeetingsVariables;
 import org.apache.openmeetings.data.basic.FieldManager;
@@ -76,29 +72,31 @@ public class SalutationDao {
 	}
 
 	/**
+	 * get a Salutation by given id
+	 * 
+	 * @param language_id
+	 * @return
+	 */
+	public Salutation get(long id, long language_id) {
+		List<Salutation> ll = em.createNamedQuery("getSalutationById", Salutation.class)
+				.setParameter("id", id).getResultList();
+		for (Salutation ti : ll) {
+			ti.setLabel(fieldManager.getFieldByIdAndLanguage(ti.getFieldvalues_id(), language_id));
+		}
+		return ll.get(0);
+	}
+	
+	/**
 	 * get a list of all availible Salutations
 	 * 
-	 * @param user_level
+	 * @param language_id
 	 * @return
 	 */
 	public List<Salutation> getUserSalutations(long language_id) {
-		try {
-			CriteriaBuilder cb = em.getCriteriaBuilder();
-			CriteriaQuery<Salutation> cq = cb.createQuery(Salutation.class);
-			Root<Salutation> from = cq.from(Salutation.class);
-			CriteriaQuery<Salutation> select = cq.select(from);
-			TypedQuery<Salutation> q = em.createQuery(select);
-			List<Salutation> ll = q.getResultList();
-			for (Salutation ti : ll) {
-				ti.setLabel(fieldManager.getFieldByIdAndLanguage(
-						ti.getFieldvalues_id(), language_id));
-			}
-
-			return ll;
-		} catch (Exception ex2) {
-			log.error("[addUserSalutation]", ex2);
+		List<Salutation> ll = em.createNamedQuery("getSalutations", Salutation.class).getResultList();
+		for (Salutation ti : ll) {
+			ti.setLabel(fieldManager.getFieldByIdAndLanguage(ti.getFieldvalues_id(), language_id));
 		}
-		return null;
+		return ll;
 	}
-
 }

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Salutation.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Salutation.java?rev=1475641&r1=1475640&r2=1475641&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Salutation.java (original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/user/Salutation.java Thu Apr 25 06:32:22 2013
@@ -26,6 +26,8 @@ import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
@@ -35,6 +37,10 @@ import org.simpleframework.xml.Root;
 
 @Entity
 @Table(name = "salutation")
+@NamedQueries({
+	@NamedQuery(name = "getSalutationById", query = "SELECT s FROM Salutation AS s WHERE s.salutations_id = :id")
+	, @NamedQuery(name = "getSalutations", query = "SELECT s FROM Salutation AS s")
+})
 @Root
 public class Salutation implements Serializable {
 	private static final long serialVersionUID = -5806449519074435223L;

Added: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.html
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.html?rev=1475641&view=auto
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.html (added)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.html Thu Apr 25 06:32:22 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+      http://www.apache.org/licenses/LICENSE-2.0
+    	  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+  
+-->
+<html xmlns:wicket="http://wicket.apache.org">
+<wicket:panel>
+	<div class="formelementradiobox">
+		<span wicket:id="community_settings"> <input type="radio" />
+			<input type="radio" /> <input type="radio" />
+		</span>
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="1162" /></label>
+		<textarea wicket:id="userOffers" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="1163" /></label>
+		<textarea wicket:id="userSearchs" />
+	</div>
+</wicket:panel>
+</html>
\ No newline at end of file

Added: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.java?rev=1475641&view=auto
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.java (added)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ComunityUserForm.java Thu Apr 25 06:32:22 2013
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.web.components;
+
+import java.util.Arrays;
+
+import org.apache.openmeetings.persistence.beans.user.User;
+import org.apache.openmeetings.web.app.WebSession;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.form.RadioChoice;
+import org.apache.wicket.markup.html.form.TextArea;
+import org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy;
+import org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy;
+import org.apache.wicket.model.IModel;
+
+public class ComunityUserForm extends Form<User> {
+	private static final long serialVersionUID = -4487619335283747717L;
+
+	public ComunityUserForm(String id, IModel<User> model) {
+		super(id, model);
+		final String field1160 = WebSession.getString(1160); // 1160 everybody
+		final String field1168 = WebSession.getString(1168); // 1168 contact
+		final String field1169 = WebSession.getString(1169); // 1169 nobody
+
+		add(new RadioChoice<Long>("community_settings", new IModel<Long>() {
+			private static final long serialVersionUID = 1L;
+
+			public Long getObject() {
+				User u = ComunityUserForm.this.getModelObject();
+				if (Boolean.TRUE.equals(u.getShowContactData())) {
+					return 1L;
+				} else if (Boolean.TRUE.equals(u.getShowContactDataToContacts())) {
+					return 2L;
+				}
+				return 3L;
+			}
+
+			public void setObject(Long choice) {
+				User u = ComunityUserForm.this.getModelObject();
+				if (choice.equals(1L)) {
+					u.setShowContactData(true);
+					u.setShowContactDataToContacts(false);
+				} else if (choice.equals(2L)) {
+					u.setShowContactData(false);
+					u.setShowContactDataToContacts(true);
+				} else {
+					u.setShowContactData(false);
+					u.setShowContactDataToContacts(false);
+				}
+			}
+
+			public void detach() {
+			}
+		}, Arrays.asList(1L, 2L, 3L), new IChoiceRenderer<Long>() {
+			private static final long serialVersionUID = 1L;
+
+			public Object getDisplayValue(Long id) {
+				if (id.equals(1L)) {
+					return field1160;
+				} else if (id.equals(2L)) {
+					return field1168;
+				} else {
+					return field1169;
+				}
+			}
+
+			public String getIdValue(Long id, int index) {
+				return "" + id;
+			}
+
+		}));
+
+		add(new TextArea<String>("userOffers"));
+		add(new TextArea<String>("userSearchs"));
+	}
+	
+	@Override
+	protected IMarkupSourcingStrategy newMarkupSourcingStrategy() {
+		return new PanelMarkupSourcingStrategy(false);
+	}
+}

Added: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.html
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.html?rev=1475641&view=auto
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.html (added)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.html Thu Apr 25 06:32:22 2013
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+      http://www.apache.org/licenses/LICENSE-2.0
+    	  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+  
+-->
+<html xmlns:wicket="http://wicket.apache.org">
+<wicket:panel>
+	<div class="formelement">
+		<label><wicket:ommessage key="133" /></label><input type="password" wicket:id="password" />
+	</div>
+	<wicket:child/>
+	<div class="formelement">
+		<label><wicket:ommessage key="135" /></label><select
+			wicket:id="salutation" style="width: 60px;" /><input type="text"
+			wicket:id="firstname" style="width: 216px;" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="136" /></label><input type="text" wicket:id="lastname" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="1143" /></label><select wicket:id="omTimeZone" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="111" /></label><select wicket:id="language" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="137" /></label><input type="text" wicket:id="adresses.email" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="607" /></label><input type="text" wicket:id="adresses.phone" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="1503" /></label><input class="formcheckbox" type="checkbox" wicket:id="sendSMS" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="138" /></label><input type="text" wicket:id="age" style="width: 258px;" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="139" /></label><input type="text"
+			wicket:id="adresses.street" style="width: 244px;" /> <input
+			type="text" wicket:id="adresses.additionalname" style="width: 30px;" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="140" /></label><input type="text"
+			wicket:id="adresses.zip" style="width: 60px;" /> <input type="text"
+			wicket:id="adresses.town" style="width: 214px;" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="141" /></label><select wicket:id="adresses.states" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="142" /></label>
+		<textarea wicket:id="adresses.comment" />
+	</div>
+	<div class="formelement">
+		<label><wicket:ommessage key="161" /></label><select wicket:id="organisation_users" style="height: 80px" />
+	</div>
+</wicket:panel>
+</html>
\ No newline at end of file

Added: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.java?rev=1475641&view=auto
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.java (added)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/GeneralUserForm.java Thu Apr 25 06:32:22 2013
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.web.components;
+
+import static org.apache.openmeetings.web.app.Application.getBean;
+import static org.apache.openmeetings.web.app.WebSession.getLanguage;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.openmeetings.data.basic.FieldLanguageDao;
+import org.apache.openmeetings.data.basic.dao.OmTimeZoneDao;
+import org.apache.openmeetings.data.user.OrganisationManager;
+import org.apache.openmeetings.data.user.dao.SalutationDao;
+import org.apache.openmeetings.data.user.dao.StateDao;
+import org.apache.openmeetings.persistence.beans.basic.OmTimeZone;
+import org.apache.openmeetings.persistence.beans.domain.Organisation;
+import org.apache.openmeetings.persistence.beans.domain.Organisation_Users;
+import org.apache.openmeetings.persistence.beans.lang.FieldLanguage;
+import org.apache.openmeetings.persistence.beans.user.Salutation;
+import org.apache.openmeetings.persistence.beans.user.State;
+import org.apache.openmeetings.persistence.beans.user.User;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.markup.html.form.DateTextField;
+import org.apache.wicket.extensions.yui.calendar.DatePicker;
+import org.apache.wicket.markup.html.form.CheckBox;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.ListMultipleChoice;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.markup.html.form.TextArea;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy;
+import org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.validation.validator.EmailAddressValidator;
+
+public class GeneralUserForm extends Form<User> {
+	private static final long serialVersionUID = 5360667099083510234L;
+	private Salutation salutation;
+	private FieldLanguage lang;
+	private PasswordTextField passwordField;
+
+	public GeneralUserForm(String id, IModel<User> model) {
+		super(id, model);
+
+		add(passwordField = new PasswordTextField("password"));
+		passwordField.setRequired(false);
+
+		SalutationDao salutDao = getBean(SalutationDao.class);
+		FieldLanguageDao langDao = getBean(FieldLanguageDao.class);
+		salutation = salutDao.get(getModelObject().getSalutations_id(), getLanguage());
+		lang = langDao.getFieldLanguageById(getModelObject().getLanguage_id());
+		add(new DropDownChoice<Salutation>("salutation"
+				, new PropertyModel<Salutation>(this, "salutation")
+				, salutDao.getUserSalutations(getLanguage())
+				, new ChoiceRenderer<Salutation>("label.value", "salutations_id"))
+			.add(new AjaxFormComponentUpdatingBehavior("onchange") {
+				private static final long serialVersionUID = -6748844721645465468L;
+
+				@Override
+				protected void onUpdate(AjaxRequestTarget target) {
+					GeneralUserForm.this.getModelObject().setSalutations_id(salutation.getSalutations_id());
+				}
+			}));
+		add(new TextField<String>("firstname"));
+		add(new TextField<String>("lastname"));
+		
+		add(new DropDownChoice<OmTimeZone>("omTimeZone", getBean(OmTimeZoneDao.class).getOmTimeZones(),
+				new ChoiceRenderer<OmTimeZone>("frontEndLabel", "jname")));
+
+		add(new DropDownChoice<FieldLanguage>("language"
+				, new PropertyModel<FieldLanguage>(this, "lang")
+				, langDao.getLanguages()
+				, new ChoiceRenderer<FieldLanguage>("name", "language_id"))
+			.add(new AjaxFormComponentUpdatingBehavior("onchange") {
+				private static final long serialVersionUID = 2072021284702632856L;
+
+				@Override
+				protected void onUpdate(AjaxRequestTarget target) {
+					GeneralUserForm.this.getModelObject().setLanguage_id(lang.getLanguage_id());
+				}
+			}));
+
+		add(new RequiredTextField<String>("adresses.email").add(EmailAddressValidator.getInstance()));
+		add(new TextField<String>("adresses.phone"));
+		add(new CheckBox("sendSMS"));
+		DateTextField age = new DateTextField("age");
+		DatePicker datePicker = new DatePicker() {
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected String getAdditionalJavaScript() {
+				return "${calendar}.cfg.setProperty(\"navigator\",true,false); ${calendar}.render();";
+			}
+		};
+		datePicker.setShowOnFieldClick(true);
+		datePicker.setAutoHide(true);
+		age.add(datePicker);
+		add(age);
+		add(new TextField<String>("adresses.street"));
+		add(new TextField<String>("adresses.additionalname"));
+		add(new TextField<String>("adresses.zip"));
+		add(new TextField<String>("adresses.town"));
+		add(new DropDownChoice<State>("adresses.states", getBean(StateDao.class).getStates()
+				, new ChoiceRenderer<State>("name", "state_id")));
+		add(new TextArea<String>("adresses.comment"));
+
+		List<Organisation> orgList = getBean(OrganisationManager.class).getOrganisations(3L);
+		List<Organisation_Users> orgUsers = new ArrayList<Organisation_Users>(orgList.size());
+		for (Organisation org : orgList) {
+			orgUsers.add(new Organisation_Users(org));
+		}
+		ListMultipleChoice<Organisation_Users> orgChoiceList = new ListMultipleChoice<Organisation_Users>(
+				"organisation_users", orgUsers,
+				new ChoiceRenderer<Organisation_Users>("organisation.name", "organisation.organisation_id"));
+		add(orgChoiceList);
+	}
+	
+	public PasswordTextField getPasswordField() {
+		return passwordField;
+	}
+	
+	@Override
+	protected IMarkupSourcingStrategy newMarkupSourcingStrategy() {
+		return new PanelMarkupSourcingStrategy(false);
+	}
+}

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UserForm.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UserForm.java?rev=1475641&r1=1475640&r2=1475641&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UserForm.java (original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UserForm.java Thu Apr 25 06:32:22 2013
@@ -18,49 +18,30 @@
  */
 package org.apache.openmeetings.web.components.admin.users;
 
-import java.util.ArrayList;
+import static org.apache.openmeetings.web.app.Application.getBean;
+import static org.apache.openmeetings.web.app.WebSession.getUserId;
+
 import java.util.Arrays;
-import java.util.List;
 
-import org.apache.openmeetings.data.basic.FieldLanguageDao;
 import org.apache.openmeetings.data.basic.dao.ConfigurationDao;
-import org.apache.openmeetings.data.basic.dao.OmTimeZoneDao;
-import org.apache.openmeetings.data.user.OrganisationManager;
-import org.apache.openmeetings.data.user.dao.SalutationDao;
-import org.apache.openmeetings.data.user.dao.StateDao;
 import org.apache.openmeetings.data.user.dao.UsersDao;
-import org.apache.openmeetings.persistence.beans.basic.OmTimeZone;
-import org.apache.openmeetings.persistence.beans.domain.Organisation;
-import org.apache.openmeetings.persistence.beans.domain.Organisation_Users;
-import org.apache.openmeetings.persistence.beans.lang.FieldLanguage;
-import org.apache.openmeetings.persistence.beans.user.Salutation;
-import org.apache.openmeetings.persistence.beans.user.State;
 import org.apache.openmeetings.persistence.beans.user.User;
 import org.apache.openmeetings.utils.crypt.ManageCryptStyle;
-import org.apache.openmeetings.web.app.Application;
 import org.apache.openmeetings.web.app.WebSession;
+import org.apache.openmeetings.web.components.ComunityUserForm;
+import org.apache.openmeetings.web.components.GeneralUserForm;
 import org.apache.openmeetings.web.components.admin.AdminBaseForm;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormValidatingBehavior;
 import org.apache.wicket.datetime.markup.html.basic.DateLabel;
-import org.apache.wicket.extensions.markup.html.form.DateTextField;
-import org.apache.wicket.extensions.yui.calendar.DatePicker;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.CheckBox;
-import org.apache.wicket.markup.html.form.ChoiceRenderer;
 import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.IChoiceRenderer;
-import org.apache.wicket.markup.html.form.ListMultipleChoice;
-import org.apache.wicket.markup.html.form.PasswordTextField;
-import org.apache.wicket.markup.html.form.RadioChoice;
 import org.apache.wicket.markup.html.form.RequiredTextField;
-import org.apache.wicket.markup.html.form.TextArea;
-import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.model.CompoundPropertyModel;
-import org.apache.wicket.model.IModel;
 import org.apache.wicket.util.time.Duration;
-import org.apache.wicket.validation.validator.EmailAddressValidator;
 import org.apache.wicket.validation.validator.StringValidator;
 
 /**
@@ -70,92 +51,21 @@ import org.apache.wicket.validation.vali
  * 
  */
 public class UserForm extends AdminBaseForm<User> {
-
 	private static final long serialVersionUID = 1L;
-
 	private WebMarkupContainer listContainer;
+	private GeneralUserForm generalForm;
 
-	private User user;
-
-	private final List<Salutation> saluationList = Application.getBean(
-			SalutationDao.class).getUserSalutations(WebSession.getLanguage());
-	private final List<FieldLanguage> languageList = Application.getBean(
-			FieldLanguageDao.class).getLanguages();
-
-	private PasswordTextField passwordField;
-
-	/**
-	 * Get id list of {@link Salutation}
-	 * 
-	 * @return
-	 */
-	private List<Long> getSalutationsIds() {
-		ArrayList<Long> saluationIdList = new ArrayList<Long>(
-				saluationList.size());
-		for (Salutation saluation : saluationList) {
-			saluationIdList.add(saluation.getSalutations_id());
-		}
-		return saluationIdList;
-	}
-
-	/**
-	 * Get a name for a given id of {@link Salutation}
-	 * 
-	 * @param id
-	 * @return
-	 */
-	private String getSaluationLabelById(Long id) {
-		for (Salutation saluation : saluationList) {
-			if (id.equals(saluation.getSalutations_id())) {
-				return saluation.getLabel().getValue();
-			}
-		}
-		throw new RuntimeException("Could not find Salutations for id " + id);
-	}
-
-	/**
-	 * Id list of {@link FieldLanguage}
-	 * 
-	 * @return
-	 */
-	private List<Long> getFieldLanguageIds() {
-		ArrayList<Long> languageIdList = new ArrayList<Long>(
-				languageList.size());
-		for (FieldLanguage language : languageList) {
-			languageIdList.add(language.getLanguage_id());
-		}
-		return languageIdList;
-	}
-
-	/**
-	 * Get name of {@link FieldLanguage} by its id
-	 * 
-	 * @param id
-	 * @return
-	 */
-	private String getFieldLanguageLabelById(Long id) {
-		for (FieldLanguage language : languageList) {
-			if (id.equals(language.getLanguage_id())) {
-				return language.getName();
-			}
-		}
-		throw new RuntimeException("Could not find FieldLanguage for id " + id);
-	}
-
-	public UserForm(String id, WebMarkupContainer listContainer,
-			final User user) {
+	public UserForm(String id, WebMarkupContainer listContainer, final User user) {
 		super(id, new CompoundPropertyModel<User>(user));
 		setOutputMarkupId(true);
 		this.listContainer = listContainer;
-		this.user = user;
 
 		// Add form fields
 		addFormFields();
 
 		// attach an ajax validation behavior to all form component's keydown
 		// event and throttle it down to once per second
-		AjaxFormValidatingBehavior.addToAllFormComponents(this, "keydown",
-				Duration.ONE_SECOND);
+		AjaxFormValidatingBehavior.addToAllFormComponents(this, "keydown", Duration.ONE_SECOND);
 
 	}
 
@@ -167,16 +77,13 @@ public class UserForm extends AdminBaseF
 		// different mechanism to protect the password from being read
 		// sebawagner, 01.10.2012
 		try {
-			String pass = passwordField.getConvertedInput();
-			if (pass != null&& !pass.isEmpty()) {
-				u.updatePassword(
-					Application.getBean(ManageCryptStyle.class)
-					, Application.getBean(ConfigurationDao.class)
-					, passwordField.getConvertedInput());
+			String pass = generalForm.getPasswordField().getConvertedInput();
+			if (pass != null && !pass.isEmpty()) {
+				u.updatePassword(getBean(ManageCryptStyle.class), getBean(ConfigurationDao.class), pass);
 			}
-			Application.getBean(UsersDao.class).update(u, WebSession.getUserId());
+			getBean(UsersDao.class).update(u, getUserId());
 		} catch (Exception e) {
-			//FIXME update feedback with the error details
+			// FIXME update feedback with the error details
 		}
 		setModelObject(u);
 		hideNewRecord();
@@ -187,9 +94,8 @@ public class UserForm extends AdminBaseF
 
 	@Override
 	protected void onNewSubmit(AjaxRequestTarget target, Form<?> form) {
-		UsersDao usersDaoImpl = Application.getBean(UsersDao.class);
-		setModelObject(usersDaoImpl.getNewUserInstance(usersDaoImpl
-				.get(WebSession.getUserId())));
+		UsersDao usersDaoImpl = getBean(UsersDao.class);
+		setModelObject(usersDaoImpl.getNewUserInstance(usersDaoImpl.get(getUserId())));
 		target.add(this);
 		target.appendJavaScript("omUserPanelInit();");
 	}
@@ -198,8 +104,7 @@ public class UserForm extends AdminBaseF
 	protected void onRefreshSubmit(AjaxRequestTarget target, Form<?> form) {
 		User user = getModelObject();
 		if (user.getUser_id() <= 0) {
-			user = Application.getBean(UsersDao.class).get(
-					user.getUser_id());
+			user = getBean(UsersDao.class).get(user.getUser_id());
 		} else {
 			user = new User();
 		}
@@ -210,11 +115,9 @@ public class UserForm extends AdminBaseF
 
 	@Override
 	protected void onDeleteSubmit(AjaxRequestTarget target, Form<?> form) {
-		UsersDao usersDaoImpl = Application.getBean(UsersDao.class);
-		usersDaoImpl.delete(this.getModelObject(),
-				WebSession.getUserId());
-		this.setModelObject(usersDaoImpl.getNewUserInstance(usersDaoImpl
-				.get(WebSession.getUserId())));
+		UsersDao usersDaoImpl = getBean(UsersDao.class);
+		usersDaoImpl.delete(this.getModelObject(), getUserId());
+		this.setModelObject(usersDaoImpl.getNewUserInstance(usersDaoImpl.get(getUserId())));
 		target.add(listContainer);
 		target.add(this);
 		target.appendJavaScript("omUserPanelInit();");
@@ -230,188 +133,55 @@ public class UserForm extends AdminBaseF
 		// login.setLabel(new Model<String>("testname"));
 		add(login);
 
-		passwordField = new PasswordTextField("password");
-		add(passwordField);
-		passwordField.setRequired(false);
-
-		add(new DropDownChoice<Long>("salutations_id", getSalutationsIds(),
-				new IChoiceRenderer<Long>() {
-					private static final long serialVersionUID = 1L;
-
-					public Object getDisplayValue(Long id) {
-						return getSaluationLabelById(id);
-					}
-
-					public String getIdValue(Long id, int index) {
-						return "" + id;
-					}
-
-				}));
-
-		add(new TextField<String>("firstname"));
-		add(new TextField<String>("lastname"));
-
-		add(new DropDownChoice<OmTimeZone>("omTimeZone", Application.getBean(
-				OmTimeZoneDao.class).getOmTimeZones(),
-				new ChoiceRenderer<OmTimeZone>("frontEndLabel", "jname")));
-
-		add(new DropDownChoice<Long>("language_id", getFieldLanguageIds(),
-				new IChoiceRenderer<Long>() {
-					private static final long serialVersionUID = 1L;
-
-					public Object getDisplayValue(Long id) {
-						return getFieldLanguageLabelById(id);
-					}
-
-					public String getIdValue(Long id, int index) {
-						return "" + id;
-					}
-
-				}));
+		add(generalForm = new GeneralUserForm("general", getModel()));
 
 		add(DateLabel.forDatePattern("starttime", "dd.MM.yyyy HH:mm:ss"));
 		add(DateLabel.forDatePattern("updatetime", "dd.MM.yyyy HH:mm:ss"));
 
 		add(new CheckBox("forceTimeZoneCheck"));
-		RequiredTextField<String> email = new RequiredTextField<String>(
-				"adresses.email");
-		// email.setLabel(new Model<String>("testemail"));
-		email.add(EmailAddressValidator.getInstance());
-		add(email);
-		add(new TextField<String>("adresses.phone"));
-		add(new CheckBox("sendSMS"));
-		DateTextField age = new DateTextField("age");
-		DatePicker datePicker = new DatePicker() {
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			protected String getAdditionalJavaScript() {
-				return "${calendar}.cfg.setProperty(\"navigator\",true,false); ${calendar}.render();";
-			}
-		};
-		datePicker.setShowOnFieldClick(true);
-		datePicker.setAutoHide(true);
-		age.add(datePicker);
-		add(age);
-		add(new TextField<String>("adresses.street"));
-		add(new TextField<String>("adresses.additionalname"));
-		add(new TextField<String>("adresses.zip"));
-		add(new TextField<String>("adresses.town"));
-		add(new DropDownChoice<State>("adresses.states", Application.getBean(
-				StateDao.class).getStates(), new ChoiceRenderer<State>(
-				"name", "state_id")));
 
 		final String field159 = WebSession.getString(159);
 		final String field160 = WebSession.getString(160);
 
-		add(new DropDownChoice<Integer>("status", Arrays.asList(0, 1),
-				new IChoiceRenderer<Integer>() {
+		add(new DropDownChoice<Integer>("status", Arrays.asList(0, 1), new IChoiceRenderer<Integer>() {
 
-					private static final long serialVersionUID = 1L;
+			private static final long serialVersionUID = 1L;
 
-					public Object getDisplayValue(Integer id) {
-						if (id.equals(0)) {
-							return field159;
-						} else if (id.equals(1)) {
-							return field160;
-						}
-						return null;
-					}
-
-					public String getIdValue(Integer id, int index) {
-						return "" + id;
-					}
+			public Object getDisplayValue(Integer id) {
+				if (id.equals(0)) {
+					return field159;
+				} else if (id.equals(1)) {
+					return field160;
+				}
+				return null;
+			}
 
-				}));
+			public String getIdValue(Integer id, int index) {
+				return "" + id;
+			}
+
+		}));
 
 		final String field166 = WebSession.getString(166);
 		final String field167 = WebSession.getString(167);
 		final String field168 = WebSession.getString(168);
 		final String field1311 = WebSession.getString(1311);
 
-		add(new DropDownChoice<Long>("level_id", Arrays.asList(1L, 2L, 3L, 4L),
-				new IChoiceRenderer<Long>() {
-
-					private static final long serialVersionUID = 1L;
-
-					public Object getDisplayValue(Long id) {
-						if (id.equals(1L)) {
-							return field166;
-						} else if (id.equals(2L)) {
-							return field167;
-						} else if (id.equals(3L)) {
-							return field168;
-						} else if (id.equals(4L)) {
-							return field1311;
-						}
-						return null;
-					}
-
-					public String getIdValue(Long id, int index) {
-						return "" + id;
-					}
-
-				}));
-
-		add(new TextArea<String>("adresses.comment"));
-
-		List<Organisation> orgList = Application.getBean(
-				OrganisationManager.class).getOrganisations(3L);
-		List<Organisation_Users> orgUsers = new ArrayList<Organisation_Users>(
-				orgList.size());
-		for (Organisation org : orgList) {
-			orgUsers.add(new Organisation_Users(org));
-		}
-		ListMultipleChoice<Organisation_Users> orgChoiceList = new ListMultipleChoice<Organisation_Users>(
-				"organisation_users", orgUsers,
-				new ChoiceRenderer<Organisation_Users>("organisation.name",
-						"organisation.organisation_id"));
-		add(orgChoiceList);
-
-		final String field1160 = WebSession.getString(1160); // 1160 everybody
-		final String field1168 = WebSession.getString(1168); // 1168 contact
-		final String field1169 = WebSession.getString(1169); // 1169 nobody
+		add(new DropDownChoice<Long>("level_id", Arrays.asList(1L, 2L, 3L, 4L), new IChoiceRenderer<Long>() {
 
-		add(new RadioChoice<Long>("community_settings", new IModel<Long>() {
-			private static final long serialVersionUID = 1L;
-
-			public Long getObject() {
-				if (user.getShowContactData() != null
-						&& user.getShowContactData()) {
-					return 1L;
-				} else if (user.getShowContactDataToContacts() != null
-						&& user.getShowContactDataToContacts()) {
-					return 2L;
-				}
-				return 3L;
-			}
-
-			public void setObject(Long choice) {
-				if (choice.equals(1L)) {
-					user.setShowContactData(true);
-					user.setShowContactDataToContacts(false);
-				} else if (choice.equals(2L)) {
-					user.setShowContactData(false);
-					user.setShowContactDataToContacts(true);
-				} else {
-					user.setShowContactData(false);
-					user.setShowContactDataToContacts(false);
-				}
-			}
-
-			public void detach() {
-			}
-		}, Arrays.asList(1L, 2L, 3L), new IChoiceRenderer<Long>() {
 			private static final long serialVersionUID = 1L;
 
 			public Object getDisplayValue(Long id) {
 				if (id.equals(1L)) {
-					return field1160;
+					return field166;
 				} else if (id.equals(2L)) {
-					return field1168;
-				} else {
-					return field1169;
+					return field167;
+				} else if (id.equals(3L)) {
+					return field168;
+				} else if (id.equals(4L)) {
+					return field1311;
 				}
+				return null;
 			}
 
 			public String getIdValue(Long id, int index) {
@@ -419,9 +189,7 @@ public class UserForm extends AdminBaseF
 			}
 
 		}));
-
-		add(new TextArea<String>("userOffers"));
-		add(new TextArea<String>("userSearchs"));
+		add(new ComunityUserForm("comunity", getModel()));
 	}
-	
+
 }

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UsersPanel.html
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UsersPanel.html?rev=1475641&r1=1475640&r2=1475641&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UsersPanel.html (original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/admin/users/UsersPanel.html Thu Apr 25 06:32:22 2013
@@ -19,130 +19,104 @@
   
 -->
 <html xmlns:wicket="http://wicket.apache.org">
-	<wicket:head>
-	   <script type="text/javascript">
-	       function omUserPanelInit() {
-	           var documentHeight = $(document).height();
-	           $('#adminForm').height(documentHeight-114);
-	           $('#adminTable').height(documentHeight-144);
-	       }
-	   </script>
-	</wicket:head>
-	<wicket:panel>
-		<div class="adminPanel">
-			<div class="adminPanelColumnTable">
-				<span wicket:id="navigator">[dataview navigator]</span>
+<wicket:head>
+	<script type="text/javascript">
+		function omUserPanelInit() {
+			var documentHeight = $(document).height();
+			$('#adminForm').height(documentHeight - 114);
+			$('#adminTable').height(documentHeight - 144);
+		}
+	</script>
+</wicket:head>
+<wicket:panel>
+	<div class="adminPanel">
+		<div class="adminPanelColumnTable">
+			<span wicket:id="navigator">[dataview navigator]</span>
+			<table class="adminListTable">
+				<thead>
+					<tr>
+						<th class="four_column_layout_column1"><span
+							wicket:id="orderById"></span> <wicket:ommessage key="146" /></th>
+						<th class="four_column_layout_column2"><span
+							wicket:id="orderByLogin"></span> <wicket:ommessage key="147" /></th>
+						<th class="four_column_layout_column3"><span
+							wicket:id="orderByFirstName"></span> <wicket:ommessage key="148" /></th>
+						<th class="four_column_layout_column4"><span
+							wicket:id="orderByLastName"></span> <wicket:ommessage key="149" /></th>
+					</tr>
+				</thead>
+			</table>
+			<div class="tableWrapper" id="adminTable">
 				<table class="adminListTable">
-					<thead>
-						<tr>
-							<th class="four_column_layout_column1"><span wicket:id="orderById"></span><wicket:ommessage key="146" /></th>
-							<th class="four_column_layout_column2"><span wicket:id="orderByLogin"></span><wicket:ommessage key="147" /></th>
-							<th class="four_column_layout_column3"><span wicket:id="orderByFirstName"></span><wicket:ommessage key="148" /></th>
-							<th class="four_column_layout_column4"><span wicket:id="orderByLastName"></span><wicket:ommessage key="149" /></th>
-						</tr>	
-					</thead>
+					<tbody wicket:id="listContainer">
+						<tr wicket:id="userList">
+							<td class="four_column_layout_column1"><div
+									class="four_column_layout_divcolumn1">
+									<span wicket:id="userId"></span>
+								</div></td>
+							<td class="four_column_layout_column2"><div
+									class="four_column_layout_divcolumn2">
+									<span wicket:id="login"></span>
+								</div></td>
+							<td class="four_column_layout_column3"><div
+									class="four_column_layout_divcolumn3">
+									<span wicket:id="firstName"></span>
+								</div></td>
+							<td class="four_column_layout_column4"><div
+									class="four_column_layout_divcolumn4">
+									<span wicket:id="lastName"></span>
+								</div></td>
+						</tr>
+					</tbody>
 				</table>
-				<div class="tableWrapper" id="adminTable">
-					<table class="adminListTable">
-						<tbody wicket:id="listContainer">	
-				    		<tr wicket:id="userList">
-								<td class="four_column_layout_column1"><div class="four_column_layout_divcolumn1"><span wicket:id="userId"></span></div></td>
-								<td class="four_column_layout_column2"><div class="four_column_layout_divcolumn2"><span wicket:id="login"></span></div></td>
-								<td class="four_column_layout_column3"><div class="four_column_layout_divcolumn3"><span wicket:id="firstName"></span></div></td>
-								<td class="four_column_layout_column4"><div class="four_column_layout_divcolumn4"><span wicket:id="lastName"></span></div></td>
-							</tr>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<div class="adminPanelColumnForm">
-				<form wicket:id="form" class="adminForm" >
-					<div wicket:id="buttons"></div>
-					<div class="scrollcontent" id="adminForm">
-						<fieldset>
-							<legend><wicket:ommessage key="143" /></legend>
-							<div class="formelement">
-				                <label><wicket:ommessage key="132" /></label><input type="text" wicket:id="login"/>
-				            </div>
-				            <div class="formelement">
-				            <label><wicket:ommessage key="133" /></label><input type="password" wicket:id="password"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="135" /></label><select wicket:id="salutations_id" style="width: 60px;"/><input type="text" wicket:id="firstname" style="width: 216px;"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="136" /></label><input type="text" wicket:id="lastname"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="1143" /></label><select wicket:id="omTimeZone"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="111" /></label><select wicket:id="language_id"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="1110" /></label><span wicket:id="starttime"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="1112" /></label><span wicket:id="updatetime"/>
-				            </div>
-				            <div class="formelement">
-				                <div class="info-icon" /><span style="font-style: italic;"><wicket:ommessage key="1149" /></span>
-				                <br/>
-				                <label><wicket:ommessage key="1148" /></label><input class="formcheckbox" type="checkbox" wicket:id="forceTimeZoneCheck" />
-				            </div>
-			                <div class="formelement">
-				                <label><wicket:ommessage key="137" /></label><input type="text" wicket:id="adresses.email"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="607" /></label><input type="text" wicket:id="adresses.phone"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="1503" /></label><input class="formcheckbox" type="checkbox" wicket:id="sendSMS"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="138" /></label><input type="text" wicket:id="age" style="width: 258px;"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="139" /></label><input type="text" wicket:id="adresses.street" style="width: 244px;"/> <input type="text" wicket:id="adresses.additionalname" style="width: 30px;"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="140" /></label><input type="text" wicket:id="adresses.zip" style="width: 60px;"/> <input type="text" wicket:id="adresses.town" style="width: 214px;"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="141" /></label><select wicket:id="adresses.states"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="158" /></label><select wicket:id="status"/>
-				            </div>
-			                <div class="formelement">
-				                <label><wicket:ommessage key="169" /></label><select wicket:id="level_id"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="142" /></label><textarea wicket:id="adresses.comment"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="161" /></label><select wicket:id="organisation_users" style="height: 80px"/>
-				            </div>
-			            </fieldset>
-			            <fieldset>
-							<legend><wicket:ommessage key="1159" /></legend>
-				            <div class="formelementradiobox">
-					            <span wicket:id="community_settings" >
-								    <input type="radio"/>
-								    <input type="radio"/>
-								    <input type="radio"/>
-								</span>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="1162" /></label><textarea wicket:id="userOffers"/>
-				            </div>
-				            <div class="formelement">
-				                <label><wicket:ommessage key="1163" /></label><textarea wicket:id="userSearchs"/>
-				            </div>
-				        </fieldset>
-			        </div>
-		        </form>
 			</div>
 		</div>
-	</wicket:panel>
+		<div class="adminPanelColumnForm">
+			<form wicket:id="form" class="adminForm">
+				<div wicket:id="buttons"></div>
+				<div class="scrollcontent" id="adminForm">
+					<fieldset>
+						<legend>
+							<wicket:ommessage key="143" />
+						</legend>
+						<div class="formelement">
+							<label><wicket:ommessage key="132" /></label><input type="text"
+								wicket:id="login" />
+						</div>
+						<form wicket:id="general"></form>
+						<div class="formelement">
+							<label><wicket:ommessage key="1110" /></label><span
+								wicket:id="starttime" />
+						</div>
+						<div class="formelement">
+							<label><wicket:ommessage key="1112" /></label><span
+								wicket:id="updatetime" />
+						</div>
+						<div class="formelement">
+							<div class="info-icon" />
+							<span style="font-style: italic;"><wicket:ommessage
+									key="1149" /></span> <br /> <label><wicket:ommessage
+									key="1148" /></label><input class="formcheckbox" type="checkbox"
+								wicket:id="forceTimeZoneCheck" />
+						</div>
+						<div class="formelement">
+							<label><wicket:ommessage key="158" /></label><select
+								wicket:id="status" />
+						</div>
+						<div class="formelement">
+							<label><wicket:ommessage key="169" /></label><select
+								wicket:id="level_id" />
+						</div>
+					</fieldset>
+					<fieldset>
+						<legend>
+							<wicket:ommessage key="1159" />
+						</legend>
+						<form wicket:id="comunity"></form>
+					</fieldset>
+				</div>
+			</form>
+		</div>
+	</div>
+</wicket:panel>
 </html>

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java?rev=1475641&r1=1475640&r2=1475641&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java (original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java Thu Apr 25 06:32:22 2013
@@ -25,7 +25,7 @@ import org.apache.openmeetings.data.user
 import org.apache.openmeetings.persistence.beans.user.User;
 import org.apache.openmeetings.web.app.Application;
 import org.apache.openmeetings.web.components.UploadableProfileImagePanel;
-import org.apache.openmeetings.web.components.user.profile.ProfilePanel;
+import org.apache.openmeetings.web.components.user.profile.SettingsPanel;
 import org.apache.openmeetings.web.pages.MainPage;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
@@ -53,7 +53,7 @@ public class WelcomeWidgetView extends W
 			@Override
 			public void onClick(AjaxRequestTarget target) {
 				//FIXME active id !!!!!
-				target.add(((MainPage)getPage()).getContents().replace(new ProfilePanel("child")));
+				target.add(((MainPage)getPage()).getContents().replace(new SettingsPanel("child")));
 			}
 		}.add(new Label("unread", Model.of("" + Application.getBean(PrivateMessagesDao.class)
 				.getNumberMessages(getUserId(), 0L, false)))));
@@ -63,7 +63,7 @@ public class WelcomeWidgetView extends W
 			@Override
 			public void onClick(AjaxRequestTarget target) {
 				//FIXME active id !!!!!
-				target.add(((MainPage)getPage()).getContents().replace(new ProfilePanel("child")));
+				target.add(((MainPage)getPage()).getContents().replace(new SettingsPanel("child")));
 			}
 		});
 	}

Copied: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/SettingsPanel.java (from r1471821, openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/ProfilePanel.java)
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/SettingsPanel.java?p2=openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/SettingsPanel.java&p1=openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/ProfilePanel.java&r1=1471821&r2=1475641&rev=1475641&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/ProfilePanel.java (original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/profile/SettingsPanel.java Thu Apr 25 06:32:22 2013
@@ -28,9 +28,9 @@ import org.apache.wicket.model.Model;
 
 import com.googlecode.wicket.jquery.core.JQueryBehavior;
 
-public class ProfilePanel extends UserPanel {
+public class SettingsPanel extends UserPanel {
 	private static final long serialVersionUID = -830146821166434373L;
-
+	public static final String DASHBOARD_TAB_ID = "tab1";
 
 	private void addTab(RepeatingView tabs, String name, String id) {
 		WebMarkupContainer tab = new WebMarkupContainer(tabs.newChildId());
@@ -46,13 +46,13 @@ public class ProfilePanel extends UserPa
 		panels.add(tab);
 	}
 	
-	public ProfilePanel(String id) {
+	public SettingsPanel(String id) {
 		super(id);
 		RepeatingView tabs = new RepeatingView("tabs");
-		addTab(tabs, "Widgets", "tab1"); //FIXME localize, inteligentId
+		addTab(tabs, "[Widgets]", DASHBOARD_TAB_ID); //FIXME localize
 		
 		RepeatingView panels = new RepeatingView("panels");
-		addPanel(panels, "tab1", new WidgetsPanel("tab"));
+		addPanel(panels, DASHBOARD_TAB_ID, new WidgetsPanel("tab"));
 		
 		add(new JQueryBehavior("#tabs", "tabs"));
 		add(tabs, panels);

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/MainPage.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/MainPage.java?rev=1475641&r1=1475640&r2=1475641&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/MainPage.java (original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/pages/MainPage.java Thu Apr 25 06:32:22 2013
@@ -25,7 +25,7 @@ import org.apache.openmeetings.web.compo
 import org.apache.openmeetings.web.components.user.AboutDialog;
 import org.apache.openmeetings.web.components.user.ChatPanel;
 import org.apache.openmeetings.web.components.user.dashboard.OmDashboardPanel;
-import org.apache.openmeetings.web.components.user.profile.ProfilePanel;
+import org.apache.openmeetings.web.components.user.profile.SettingsPanel;
 import org.apache.wicket.MarkupContainer;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
@@ -65,7 +65,7 @@ public class MainPage extends BasePage {
 
 			@Override
 			public void onClick(AjaxRequestTarget target) {
-				target.add(contents.replace(new ProfilePanel("child")));
+				target.add(contents.replace(new SettingsPanel("child")));
 			}
 		});
 		final AboutDialog about = new AboutDialog("aboutDialog");