Weitere Verbesserung Lokalisierung Content Center.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2228 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
e5346d6047
commit
0710003090
|
|
@ -30,7 +30,8 @@ import com.arsdigita.cms.contenttypes.Person;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Form to edit the properties of a person.
|
||||
* Form to edit the properties of a person. Delegate als the gory details to
|
||||
* the standard GenericPerson classes.
|
||||
*
|
||||
* @author: Jens Pelzetter
|
||||
*/
|
||||
|
|
@ -44,10 +45,19 @@ public class PersonPropertyForm extends GenericPersonPropertyForm
|
|||
private PersonPropertiesStep m_step;
|
||||
public static final String ID = "Person_edit";
|
||||
|
||||
/**
|
||||
*
|
||||
* @param itemModel
|
||||
*/
|
||||
public PersonPropertyForm(ItemSelectionModel itemModel) {
|
||||
this(itemModel, null);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param itemModel
|
||||
* @param step
|
||||
*/
|
||||
public PersonPropertyForm(ItemSelectionModel itemModel,
|
||||
PersonPropertiesStep step) {
|
||||
super(itemModel, step);
|
||||
|
|
@ -55,11 +65,18 @@ public class PersonPropertyForm extends GenericPersonPropertyForm
|
|||
addSubmissionListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
super.addWidgets();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fse
|
||||
*/
|
||||
@Override
|
||||
public void init(FormSectionEvent fse) {
|
||||
super.init(fse);
|
||||
|
|
@ -67,6 +84,10 @@ public class PersonPropertyForm extends GenericPersonPropertyForm
|
|||
Person person = (Person) super.initBasicWidgets(fse);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fse
|
||||
*/
|
||||
@Override
|
||||
public void process(FormSectionEvent fse) {
|
||||
super.process(fse);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ cms.contenttypes.ui.homepage=Homepage:
|
|||
cms.contenttypes.ui.launch_date=Launch Date:
|
||||
cms.contenttypes.ui.lead=Description:
|
||||
cms.contenttypes.ui.name=Name (URL stub):
|
||||
cms.contenttypes.ui.person_specification=Person Specification:
|
||||
cms.contenttypes.ui.summary=Description:
|
||||
cms.contenttypes.ui.title=Title:
|
||||
cms.contenttypes.ui.view_image=view image
|
||||
|
|
@ -976,12 +975,6 @@ cms.ui.type.permissions.actions.restrict_to_this_role=Restrict to this role
|
|||
cms.ui.type.permissions.can_use.grant=Grant permissions to this role
|
||||
cms.ui.type.permissions.actions.revoke=Revoke permission
|
||||
cms.ui.type.permissions.can_use.no=No
|
||||
cms.contenttypes.ui.person.set_alias=Set former name
|
||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||
cms.contenttypes.ui.person.alias.select=Select former name
|
||||
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
||||
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||
cms.contenttypes.person.alias.select.no_suitable_language_variant=The selected item has no suitable language variant.
|
||||
cms.ui.item.lifecycle.do=Execute
|
||||
cms.ui.item.lifecycle.do.not_authorized=Your not authorized to publish this item.
|
||||
cms.ui.item.lifecycle.publish_locked=This content item is being (re-)published
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ cms.contenttypes.ui.homepage=Homepage:
|
|||
cms.contenttypes.ui.launch_date=Ver\u00f6ffentlichungsdatum:
|
||||
cms.contenttypes.ui.lead=Beschreibung (Lead Text):
|
||||
cms.contenttypes.ui.name=Name (als Teil-URL):
|
||||
cms.contenttypes.ui.person_specification=Person Specification:
|
||||
cms.contenttypes.ui.summary=Beschreibung:
|
||||
cms.contenttypes.ui.title=Titel:
|
||||
cms.contenttypes.ui.view_image=Bild anzeigen
|
||||
|
|
@ -967,12 +966,6 @@ cms.ui.type.permissions.actions.restrict_to_this_role=Auf diese Rolle beschr\u00
|
|||
cms.ui.type.permissions.can_use.grant=Rolle berechtigen
|
||||
cms.ui.type.permissions.actions.revoke=Berechtigung widerrufen
|
||||
cms.ui.type.permissions.can_use.no=Nein
|
||||
cms.contenttypes.ui.person.set_alias=Fr\u00fcheren Namen setzen
|
||||
cms.contenttypes.ui.person.delete_alias=Fr\u00fcheren Namen entfernen
|
||||
cms.contenttypes.ui.person.alias.select=Fr\u00fcheren Namen ausw\u00e4hlen
|
||||
cms.contenttypes.person.alias.select.wrong_type=Kein Personendatensatz ausgew\u00e4hlt
|
||||
cms.contenttypes.person.alias.select.same_as_person=Der ausgew\u00e4hlte Datensatz ist der gleiche Datensatz wie der aktuelle Datensatz. Alias und Person k\u00f6nnen nicht identisch sein.
|
||||
cms.contenttypes.person.alias.select.no_suitable_language_variant=Das ausgew\u00e4hlte Item hat keine passende Sprachvariante.
|
||||
cms.ui.item.lifecycle.do=Ausf\u00fchren
|
||||
cms.ui.item.lifecycle.do.not_authorized=Sie sind nicht berechtigt, dieses Item zu publizieren.
|
||||
cms.ui.item.lifecycle.publish_locked=Dieses Content-Item wird gerade (re-)publiziert
|
||||
|
|
|
|||
|
|
@ -15,12 +15,6 @@ cms.ui.type.permissions.actions.restrict_to_this_role=Restrict to this role
|
|||
cms.ui.type.permissions.can_use.grant=Grant permissions to this role
|
||||
cms.ui.type.permissions.actions.revoke=Revoke permission
|
||||
cms.ui.type.permissions.can_use.no=No
|
||||
cms.contenttypes.ui.person.set_alias=Set former name
|
||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||
cms.contenttypes.ui.person.alias.select=Select former name
|
||||
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
||||
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||
cms.contenttypes.person.alias.select.no_suitable_language_variant=The selected item has no suitable language variant.
|
||||
cms.ui.item.lifecycle.do=Execute
|
||||
cms.ui.item.lifecycle.do.not_authorized=Your not authorized to publish this item.
|
||||
cms.ui.item.lifecycle.publish_locked=This content item is being (re-)published
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ cms.contenttypes.ui.description=Description
|
|||
cms.contenttypes.ui.homepage=Accueil
|
||||
cms.contenttypes.ui.lead=Fil conducteur
|
||||
cms.contenttypes.ui.name=Nom (URL)
|
||||
cms.contenttypes.ui.person_specification=D\u00e9tails concernant la personne
|
||||
cms.contenttypes.ui.summary=R\u00e9sum\u00e9
|
||||
cms.contenttypes.ui.summary=R\u00e9sum\u00e9
|
||||
cms.contenttypes.ui.title=Titre de la page
|
||||
|
|
@ -496,12 +495,6 @@ cms.ui.type.permissions.actions.restrict_to_this_role=Restrict to this role
|
|||
cms.ui.type.permissions.can_use.grant=Grant permissions to this role
|
||||
cms.ui.type.permissions.actions.revoke=Revoke permission
|
||||
cms.ui.type.permissions.can_use.no=No
|
||||
cms.contenttypes.ui.person.set_alias=Set former name
|
||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||
cms.contenttypes.ui.person.alias.select=Select former name
|
||||
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
||||
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||
cms.contenttypes.person.alias.select.no_suitable_language_variant=The selected item has no suitable language variant.
|
||||
cms.ui.item.lifecycle.do=Execute
|
||||
cms.ui.item.lifecycle.do.not_authorized=Your not authorized to publish this item.
|
||||
cms.ui.item.lifecycle.publish_locked=This content item is being (re-)published
|
||||
|
|
|
|||
|
|
@ -10,22 +10,22 @@ cms.contenttypes.ui.address.error_iso_country=You must select a country
|
|||
person.authoring.contact_properties.title=Contacts
|
||||
person.authoring.contact_properties.description=Manage contacts
|
||||
|
||||
cms.contenttypes.ui.person.basic_properties=Basic Properties
|
||||
cms.contenttypes.ui.person.edit_basic_properties=Edit Basic Properties
|
||||
cms.contenttypes.ui.person.surname=Surname
|
||||
cms.contenttypes.ui.person.givenname=Given name
|
||||
cms.contenttypes.ui.person.titlepre=Title
|
||||
cms.contenttypes.ui.person.titlepost=Name appendix
|
||||
cms.contenttypes.ui.person.birthdate=Birth date
|
||||
cms.contenttypes.ui.person.description=Description
|
||||
cms.contenttypes.ui.genericperson.basic_properties=Basic Properties
|
||||
cms.contenttypes.ui.genericperson.edit_basic_properties=Edit Basic Properties
|
||||
cms.contenttypes.ui.genericperson.surname=Surname
|
||||
cms.contenttypes.ui.genericperson.givenname=Given name
|
||||
cms.contenttypes.ui.genericperson.titlepre=Title
|
||||
cms.contenttypes.ui.genericperson.titlepost=Name appendix
|
||||
cms.contenttypes.ui.genericperson.birthdate=Birth date
|
||||
cms.contenttypes.ui.genericperson.description=Description
|
||||
|
||||
cms.contenttypes.ui.person.gender=Gender
|
||||
cms.contenttypes.ui.person.gender.f=Female
|
||||
cms.contenttypes.ui.person.gender.m=Male
|
||||
cms.contenttypes.ui.genericperson.gender=Gender
|
||||
cms.contenttypes.ui.genericperson.gender.f=Female
|
||||
cms.contenttypes.ui.genericperson.gender.m=Male
|
||||
|
||||
cms.contenttypes.ui.person.contact=Contacts
|
||||
cms.contenttypes.ui.person.contacts.none=No contacts
|
||||
cms.contenttypes.ui.person.add_contact=Add contact
|
||||
cms.contenttypes.ui.genericperson.add_contact=Add contact
|
||||
|
||||
cms.contenttypes.ui.contact.basic_properties=Basic Properties
|
||||
cms.contenttypes.ui.contact.edit_basic_properties=Edit Basic Properties
|
||||
|
|
@ -92,8 +92,7 @@ cms.contenttypes.ui.genericorgaunit.child.up=Move up
|
|||
cms.contenttypes.ui.genericorgaunit.confirm_delete=Confirm delete
|
||||
cms.contenttypes.ui.genericorgaunit.contact.action=Action
|
||||
#No contacts assoicated yet
|
||||
#No contacts assoicated yet
|
||||
cms.contenttypes.ui.genericorgaunit.contacts.none=No contacts
|
||||
cms.contenttypes.ui.genericorgaunit.contacts.none=No contacts associated yet
|
||||
cms.contenttypes.ui.genericorgaunit.contact.title=Contacts
|
||||
cms.contenttypes.ui.genericorgaunit.contact.type=Type
|
||||
cms.contenttypes.ui.genericorgaunit.contact.order=Order
|
||||
|
|
@ -125,13 +124,11 @@ cms.contenttypes.shared.basic_properties.title=Basic properties
|
|||
cms.contenttypes.ui.person_contact.up=Up
|
||||
#Down
|
||||
cms.contenttypes.ui.person_contact.down=Down
|
||||
cms.contenttypes.ui.person.contact.type=Contact type
|
||||
cms.contenttypes.ui.genericperson.contact.type=Contact type
|
||||
#Contact
|
||||
cms.contenttypes.ui.person.contact.title=Contact
|
||||
cms.contenttypes.ui.genericperson.contact.title=Contact
|
||||
#L\u00f6schen
|
||||
cms.contenttypes.ui.person.contact.del=Delete
|
||||
#No contacts assoicated yet
|
||||
"cms.contenttypes.ui.genericorgaunit.contacts.none=No contacts associated yet
|
||||
cms.contenttypes.ui.genericorgaunit.contact.up=Up
|
||||
cms.contenttypes.ui.genericorgaunit.contact.down=Down
|
||||
cms.contenttypes.ui.genericorgaunit.contact.edit=Edit association
|
||||
|
|
@ -144,9 +141,9 @@ cms.contenttypes.ui.genericorgaunit.select_contact.no_contact_selected=No contac
|
|||
cms.contenttypes.ui.genericorgaunit.person.no_person_selected=No person selected
|
||||
cms.contenttypes.ui.genericorgaunit.person.no_suitable_language_variant=The selected person item is not availabe in the language of the current item.
|
||||
cms.contenttypes.ui.genericorgaunit.person.already_added=The selected person has already been added to the current item.
|
||||
cms.contenttypes.ui.person.select_contact.no_contact_selected=No contact selected.
|
||||
cms.contenttypes.ui.person.select_contact.no_suitable_language_variant=The selected contact item is not avilable in the language of the current item.
|
||||
cms.contenttypes.ui.person.select_contact.already_added=The selected contact has already been added to current item.
|
||||
cms.contenttypes.ui.genericperson.select_contact.none_selected=No contact selected.
|
||||
cms.contenttypes.ui.genericperson.select_contact.no_suitable_language_variant=The selected contact item is not avilable in the language of the current item.
|
||||
cms.contenttypes.ui.genericperson.select_contact.already_added=The selected contact has already been added to current item.
|
||||
cms.contenttypes.ui.person.alias.delete.label=Delete
|
||||
cms.contenttypes.ui.person.alias.delete.confirm=Are you sure to remove the alias?
|
||||
person.ui.orgaunits.none=This person is not assigned to any organizational units.
|
||||
|
|
@ -157,5 +154,13 @@ person.authoring.orgas.title=Organisational Units
|
|||
cms.contenttypes.ui.person.set_alias=Set former name
|
||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||
cms.contenttypes.ui.person.alias.none=No former name
|
||||
cms.contenttypes.ui.person.alias_title=Former Name
|
||||
cms.contenttypes.ui.person.select_contact=Select a Contact
|
||||
cms.contenttypes.ui.genreicperson.alias_title=Former Name
|
||||
cms.contenttypes.ui.genericperson.select_contact=Select a Contact
|
||||
cms.contenttypes.ui.genericperson.alias.select=Select former name
|
||||
cms.contenttypes.ui.genericperson.alias.delete_alias=Remove former name
|
||||
cms.contenttypes.ui.genericperson.alias.select.no_suitable_language_variant=The selected item has no suitable language variant.
|
||||
cms.contenttypes.ui.genericperson.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||
cms.contenttypes.ui.genericperson.alias.select.wrong_type=No person selected.
|
||||
cms.contenttypes.ui.person_specification=Person Specification:
|
||||
cms.contenttypes.ui.genericperson.alias.select.add_contact=Add contact
|
||||
cms.contenttypes.ui.genericperson.alias.select.change_contact=Change contact
|
||||
|
|
|
|||
|
|
@ -10,22 +10,22 @@ cms.contenttypes.ui.address.error_iso_country=Bitte w\u00e4hlen Sie ein Land aus
|
|||
person.authoring.contact_properties.title=Kontakte
|
||||
person.authoring.contact_properties.description=Kontakte verwalten
|
||||
|
||||
cms.contenttypes.ui.person.basic_properties=Basiseigenschaften
|
||||
cms.contenttypes.ui.person.edit_basic_properties=Bearbeiten
|
||||
cms.contenttypes.ui.person.surname=Nachname
|
||||
cms.contenttypes.ui.person.givenname=Vorname
|
||||
cms.contenttypes.ui.person.titlepre=Titel
|
||||
cms.contenttypes.ui.person.titlepost=Namensanhang
|
||||
cms.contenttypes.ui.person.birthdate=Geburtstag
|
||||
cms.contenttypes.ui.person.description=Beschreibung
|
||||
cms.contenttypes.ui.genericperson.basic_properties=Basiseigenschaften
|
||||
cms.contenttypes.ui.genericperson.edit_basic_properties=Bearbeiten
|
||||
cms.contenttypes.ui.genericperson.surname=Nachname
|
||||
cms.contenttypes.ui.genericperson.givenname=Vorname
|
||||
cms.contenttypes.ui.genericperson.titlepre=Titel
|
||||
cms.contenttypes.ui.genericperson.titlepost=Namensanhang
|
||||
cms.contenttypes.ui.genericperson.birthdate=Geburtstag
|
||||
cms.contenttypes.ui.genericperson.description=Beschreibung
|
||||
|
||||
cms.contenttypes.ui.person.gender=Geschlecht
|
||||
cms.contenttypes.ui.person.gender.f=Weiblich
|
||||
cms.contenttypes.ui.person.gender.m=M\u00e4nnlich
|
||||
cms.contenttypes.ui.genericperson.gender=Geschlecht
|
||||
cms.contenttypes.ui.genericperson.gender.f=Weiblich
|
||||
cms.contenttypes.ui.genericperson.gender.m=M\u00e4nnlich
|
||||
|
||||
cms.contenttypes.ui.person.contact=Kontakte
|
||||
cms.contenttypes.ui.person.contacts.none=Zur Zeit sind keine Kontakte vorhanden
|
||||
cms.contenttypes.ui.person.add_contact=Kontakt hinzuf\u00fcgen
|
||||
cms.contenttypes.ui.genericperson.add_contact=Kontakt hinzuf\u00fcgen
|
||||
|
||||
cms.contenttypes.ui.contact.basic_properties=Eigenschaften von Contact
|
||||
cms.contenttypes.ui.contact.edit_basic_properties=Bearbeiten
|
||||
|
|
@ -94,7 +94,7 @@ cms.contenttypes.ui.genericorgaunit.child.order=Reihenfolge
|
|||
cms.contenttypes.ui.genericorgaunit.child.up=Reihenfolge bearbeiten
|
||||
cms.contenttypes.ui.genericorgaunit.confirm_delete=L\u00f6schen best\u00e4tigen
|
||||
cms.contenttypes.ui.genericorgaunit.contact.action=Action
|
||||
cms.contenttypes.ui.genericorgaunit.contacts.none=Keine Kontaktinformationen
|
||||
cms.contenttypes.ui.genericorgaunit.contacts.none=Derzeit sind keine Kontakte verkn\u00fcpft
|
||||
cms.contenttypes.ui.genericorgaunit.contact.title=Kontakte
|
||||
cms.contenttypes.ui.genericorgaunit.contact.type=Typ
|
||||
cms.contenttypes.ui.genericorgaunit.contact.order=Reihenfolge
|
||||
|
|
@ -134,13 +134,11 @@ cms.contenttypes.shared.basic_properties.title=Basiseigenschaften
|
|||
cms.contenttypes.ui.person_contact.up=Hoch
|
||||
#Down
|
||||
cms.contenttypes.ui.person_contact.down=Runter
|
||||
cms.contenttypes.ui.person.contact.type=Kontakttyp
|
||||
cms.contenttypes.ui.genericperson.contact.type=Kontakttyp
|
||||
#Contact
|
||||
cms.contenttypes.ui.person.contact.title=Kontakt
|
||||
cms.contenttypes.ui.genericperson.contact.title=Kontakt
|
||||
#L\u00f6schen
|
||||
cms.contenttypes.ui.person.contact.del=L\u00f6schen
|
||||
#No contacts assoicated yet
|
||||
"cms.contenttypes.ui.genericorgaunit.contacts.none=Derzeit sind keine Kontakte verkn\u00fcpft
|
||||
cms.contenttypes.ui.genericorgaunit.contact.up=Hoch
|
||||
cms.contenttypes.ui.genericorgaunit.contact.down=Runter
|
||||
cms.contenttypes.ui.genericorgaunit.contact.edit=Verkn\u00fcpfung bearbeiten
|
||||
|
|
@ -153,9 +151,9 @@ cms.contenttypes.ui.genericorgaunit.select_contact.no_contact_selected=Kein Kont
|
|||
cms.contenttypes.ui.genericorgaunit.person.no_person_selected=Keine Person ausgew\u00e4hlt.
|
||||
cms.contenttypes.ui.genericorgaunit.person.no_suitable_language_variant=Das ausgew\u00e4hlte Personen-Item ist nicht in der Sprache des aktuellen Items verf\u00fcgbar.
|
||||
cms.contenttypes.ui.genericorgaunit.person.already_added=Das ausgew\u00e4hlte Personen-Item wurde dem aktuellen Item bereits hinzugef\u00fcgt.
|
||||
cms.contenttypes.ui.person.select_contact.no_contact_selected=Kein Kontakt ausgew\u00e4hlt.
|
||||
cms.contenttypes.ui.person.select_contact.no_suitable_language_variant=Das ausgew\u00e4hlte Kontakt-Item ist nicht in der Sprache des aktuellen Items verf\u00fcgbar.
|
||||
cms.contenttypes.ui.person.select_contact.already_added=Das ausgew\u00e4hlte Kontakt-Item wurde dem aktuellen Item bereits hinzugef\u00fcgt.
|
||||
cms.contenttypes.ui.genericperson.select_contact.none_selected=Kein Kontakt ausgew\u00e4hlt.
|
||||
cms.contenttypes.ui.genericperson.select_contact.no_suitable_language_variant=Das ausgew\u00e4hlte Kontakt-Item ist nicht in der Sprache des aktuellen Items verf\u00fcgbar.
|
||||
cms.contenttypes.ui.genericperson.select_contact.already_added=Das ausgew\u00e4hlte Kontakt-Item wurde dem aktuellen Item bereits hinzugef\u00fcgt.
|
||||
cms.contenttypes.ui.person.alias.delete.label=L\u00f6schen
|
||||
cms.contenttypes.ui.person.alias.delete.confirm=Sind Sie sicher, dass Sie das Alias entfernen wollen?
|
||||
person.ui.orgaunits.none=Diese Person ist keiner Organisationseinheit zugewiesen.
|
||||
|
|
@ -166,5 +164,13 @@ person.authoring.orgas.title=Organisationseinheiten
|
|||
cms.contenttypes.ui.person.set_alias=Fr\u00fcheren Namen setzen
|
||||
cms.contenttypes.ui.person.delete_alias=Fr\u00fcheren Namen entfernen
|
||||
cms.contenttypes.ui.person.alias.none=Kein fr\u00fcherer Name
|
||||
cms.contenttypes.ui.person.alias_title=Fr\u00fcherer Name
|
||||
cms.contenttypes.ui.person.select_contact=Einen Kontakt ausw\u00e4hlen
|
||||
cms.contenttypes.ui.genreicperson.alias_title=Fr\u00fcherer Name
|
||||
cms.contenttypes.ui.genericperson.select_contact=Einen Kontakt ausw\u00e4hlen
|
||||
cms.contenttypes.ui.genericperson.alias.select=Fr\u00fcheren Namen ausw\u00e4hlen
|
||||
cms.contenttypes.ui.genericperson.alias.delete_alias=Fr\u00fcheren Namen entfernen
|
||||
cms.contenttypes.ui.genericperson.alias.select.no_suitable_language_variant=Das ausgew\u00e4hlte Item hat keine passende Sprachvariante.
|
||||
cms.contenttypes.ui.genericperson.alias.select.same_as_person=Der ausgew\u00e4hlte Datensatz ist der gleiche Datensatz wie der aktuelle Datensatz. Alias und Person k\u00f6nnen nicht identisch sein.
|
||||
cms.contenttypes.ui.genericperson.alias.select.wrong_type=Kein Personendatensatz ausgew\u00e4hlt.
|
||||
cms.contenttypes.ui.person_specification=Person Specification:
|
||||
cms.contenttypes.ui.genericperson.alias.select.add_contact=Kontakt hinzuf\u00fcgen
|
||||
cms.contenttypes.ui.genericperson.alias.select.change_contact=Kontakt anpassen
|
||||
|
|
|
|||
|
|
@ -37,20 +37,26 @@ import com.arsdigita.util.UncheckedWrapperException;
|
|||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
*/
|
||||
public class GenericPersonAliasDeleteForm
|
||||
extends BasicPageForm
|
||||
public class GenericPersonAliasDeleteForm extends BasicPageForm
|
||||
implements FormProcessListener {
|
||||
|
||||
public static final String ID = "GenericPersonAliasDeleteForm";
|
||||
|
||||
public GenericPersonAliasDeleteForm(
|
||||
final ItemSelectionModel itemModel,
|
||||
/**
|
||||
*
|
||||
* @param itemModel
|
||||
* @param step
|
||||
*/
|
||||
public GenericPersonAliasDeleteForm(final ItemSelectionModel itemModel,
|
||||
final GenericPersonAliasPropertiesStep step) {
|
||||
super(ID, itemModel);
|
||||
addSaveCancelSection();
|
||||
addProcessListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
|
|
|
|||
|
|
@ -43,11 +43,22 @@ public class GenericPersonAliasPropertiesStep extends SimpleEditStep {
|
|||
public static final String DELETE_ALIAS_SHEET_NAME = "deleteAlias";
|
||||
private final ItemSelectionModel itemModel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param itemModel
|
||||
* @param parent
|
||||
*/
|
||||
public GenericPersonAliasPropertiesStep(final ItemSelectionModel itemModel,
|
||||
final AuthoringKitWizard parent) {
|
||||
this(itemModel, parent, "");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param itemModel
|
||||
* @param parent
|
||||
* @param prefix
|
||||
*/
|
||||
public GenericPersonAliasPropertiesStep(final ItemSelectionModel itemModel,
|
||||
final AuthoringKitWizard parent,
|
||||
final String prefix) {
|
||||
|
|
|
|||
|
|
@ -53,6 +53,10 @@ public class GenericPersonAliasSetForm
|
|||
private final String ITEM_SEARCH = "personAlias";
|
||||
public static final String ID = "GenericPersonAliasSetForm";
|
||||
|
||||
/**
|
||||
*
|
||||
* @param itemModel
|
||||
*/
|
||||
public GenericPersonAliasSetForm(final ItemSelectionModel itemModel) {
|
||||
this(itemModel, null);
|
||||
}
|
||||
|
|
@ -67,10 +71,13 @@ public class GenericPersonAliasSetForm
|
|||
addProcessListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void addWidgets() {
|
||||
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.alias.select")));
|
||||
"cms.contenttypes.ui.genericperson.alias.select")));
|
||||
itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.
|
||||
findByAssociatedObjectType(
|
||||
"com.arsdigita.cms.contenttypes.GenericPerson"));
|
||||
|
|
@ -78,6 +85,11 @@ public class GenericPersonAliasSetForm
|
|||
add(itemSearch);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fse
|
||||
* @throws FormProcessException
|
||||
*/
|
||||
@Override
|
||||
public void init(final FormSectionEvent fse) throws FormProcessException {
|
||||
final FormData data = fse.getFormData();
|
||||
|
|
@ -125,13 +137,13 @@ public class GenericPersonAliasSetForm
|
|||
Submit target = (Submit) event.getTarget();
|
||||
|
||||
if (person.getAlias() != null) {
|
||||
target.setButtonLabel(ContenttypesGlobalizationUtil.
|
||||
globalize(
|
||||
"cms.contenttypes.ui.contact.alias.select.change"));
|
||||
target.setButtonLabel(ContenttypesGlobalizationUtil
|
||||
.globalize(
|
||||
"cms.contenttypes.ui.genericperson.alias.select.change_contact"));
|
||||
} else {
|
||||
target.setButtonLabel(ContenttypesGlobalizationUtil.
|
||||
globalize(
|
||||
"cms.contenttypes.ui.contact.alias.select.add"));
|
||||
target.setButtonLabel(ContenttypesGlobalizationUtil
|
||||
.globalize(
|
||||
"cms.contenttypes.ui.genericperson.alias.select.add_contact"));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -154,16 +166,16 @@ public class GenericPersonAliasSetForm
|
|||
|
||||
if (data.get(ITEM_SEARCH) == null) {
|
||||
data.addError(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.person.alias.select.wrong_type"));
|
||||
"cms.contenttypes.ui.genericperson.alias.select.wrong_type"));
|
||||
} else if (person.equals(data.get(ITEM_SEARCH))) {
|
||||
data.addError(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.person.alias.select.same_as_person"));
|
||||
"cms.contenttypes.ui.genericperson.alias.select.same_as_person"));
|
||||
} else if (!alias.getContentBundle().hasInstance(person.getLanguage(),
|
||||
Kernel.getConfig().
|
||||
languageIndependentItems())) {
|
||||
data.addError(
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.person.alias.select.no_suitable_language_variant"));
|
||||
"cms.contenttypes.ui.genericperson.alias.select.no_suitable_language_variant"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class GenericPersonContactAddForm extends BasicItemForm {
|
||||
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(
|
||||
private static final Logger s_log = Logger.getLogger(
|
||||
GenericPersonContactAddForm.class);
|
||||
private GenericPersonPropertiesStep m_step;
|
||||
private ItemSearchWidget m_itemSearch;
|
||||
|
|
@ -73,12 +72,15 @@ public class GenericPersonContactAddForm extends BasicItemForm {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add widgets to the form.
|
||||
*/
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
// Attach a GenericContact object
|
||||
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.select_contact")));
|
||||
"cms.contenttypes.ui.genericperson.select_contact")));
|
||||
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.
|
||||
findByAssociatedObjectType(
|
||||
"com.arsdigita.cms.contenttypes.GenericContact"));
|
||||
|
|
@ -86,7 +88,7 @@ public class GenericPersonContactAddForm extends BasicItemForm {
|
|||
|
||||
// GenericContact type field
|
||||
add(new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.contact.type")));
|
||||
"cms.contenttypes.ui.genericperson.contact.type")));
|
||||
ParameterModel contactTypeParam =
|
||||
new StringParameter(
|
||||
GenericPersonContactCollection.CONTACTS_KEY);
|
||||
|
|
@ -149,7 +151,7 @@ public class GenericPersonContactAddForm extends BasicItemForm {
|
|||
if (data.get(ITEM_SEARCH) == null) {
|
||||
data.addError(
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.select_contact.no_contact_selected"));
|
||||
"cms.contenttypes.ui.genericperson.select_contact.none_selected"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -164,7 +166,7 @@ public class GenericPersonContactAddForm extends BasicItemForm {
|
|||
languageIndependentItems()))) {
|
||||
data.addError(
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.select_contact.no_suitable_language_variant"));
|
||||
"cms.contenttypes.ui.genericperson.select_contact.no_suitable_language_variant"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -177,7 +179,7 @@ public class GenericPersonContactAddForm extends BasicItemForm {
|
|||
if (contacts.size() > 0) {
|
||||
data.addError(
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.select_contact.already_added"));
|
||||
"cms.contenttypes.ui.genericperson.select_contact.already_added"));
|
||||
}
|
||||
|
||||
contacts.close();
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class GenericPersonContactPropertiesStep extends SimpleEditStep {
|
|||
BasicItemForm addContactSheet = new GenericPersonContactAddForm(itemModel);
|
||||
add(ADD_CONTACT_SHEET_NAME,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.add_contact"),
|
||||
"cms.contenttypes.ui.genericperson.add_contact"),
|
||||
new WorkflowLockedComponentAccess(addContactSheet, itemModel),
|
||||
addContactSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import com.arsdigita.cms.contenttypes.GenericPersonContactCollection;
|
|||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||
import com.arsdigita.cms.dispatcher.ItemResolver;
|
||||
import com.arsdigita.cms.dispatcher.Utilities;
|
||||
// import com.arsdigita.cms.dispatcher.Utilities;
|
||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.globalization.GlobalizationHelper;
|
||||
|
|
@ -78,19 +78,29 @@ public class GenericPersonContactTable extends Table implements
|
|||
"cms.contenttypes.ui.person.contacts.none")));
|
||||
TableColumnModel tab_model = getColumnModel();
|
||||
|
||||
tab_model.add(new TableColumn(0, ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.contact.type").localize()));
|
||||
tab_model.add(new TableColumn(1, ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.contact.title").localize(),
|
||||
tab_model.add(new TableColumn(
|
||||
0,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.contact.type")));
|
||||
tab_model.add(new TableColumn(
|
||||
1,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.contact.title"),
|
||||
TABLE_COL_EDIT));
|
||||
tab_model.add(new TableColumn(2, ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.contact.del").localize(),
|
||||
tab_model.add(new TableColumn(
|
||||
2,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.contact.del"),
|
||||
TABLE_COL_DEL));
|
||||
tab_model.add(new TableColumn(3, ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person_contact.up").localize(),
|
||||
tab_model.add(new TableColumn(
|
||||
3,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person_contact.up"),
|
||||
TABLE_COL_UP));
|
||||
tab_model.add(new TableColumn(4, ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person_contact.down").localize(),
|
||||
tab_model.add(new TableColumn(
|
||||
4,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person_contact.down"),
|
||||
TABLE_COL_DOWN));
|
||||
|
||||
setModelBuilder(new GenericPersonTableModelBuilder(itemModel));
|
||||
|
|
@ -217,7 +227,7 @@ public class GenericPersonContactTable extends Table implements
|
|||
case 1:
|
||||
return m_contact.getTitle();
|
||||
case 2:
|
||||
return GlobalizationUtil.globalize("cms.ui.delete").localize();
|
||||
return GlobalizationUtil.globalize("cms.ui.delete");
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -243,7 +253,7 @@ public class GenericPersonContactTable extends Table implements
|
|||
boolean isSelected, Object key,
|
||||
int row, int column) {
|
||||
|
||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
||||
SecurityManager sm = CMS.getSecurityManager(state);
|
||||
GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject(
|
||||
state);
|
||||
|
||||
|
|
@ -296,7 +306,7 @@ public class GenericPersonContactTable extends Table implements
|
|||
boolean isSelected, Object key,
|
||||
int row, int column) {
|
||||
|
||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
||||
SecurityManager sm = CMS.getSecurityManager(state);
|
||||
GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject(
|
||||
state);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
|||
*/
|
||||
public class GenericPersonOrgaUnitsStep extends SimpleEditStep {
|
||||
|
||||
public GenericPersonOrgaUnitsStep(final ItemSelectionModel itemModel, final AuthoringKitWizard parent) {
|
||||
public GenericPersonOrgaUnitsStep(final ItemSelectionModel itemModel,
|
||||
final AuthoringKitWizard parent) {
|
||||
this(itemModel, parent, null);
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +39,8 @@ public class GenericPersonOrgaUnitsStep extends SimpleEditStep {
|
|||
final String prefix) {
|
||||
super(itemModel, parent, prefix);
|
||||
|
||||
final GenericPersonOrgaUnitsTable table = new GenericPersonOrgaUnitsTable(itemModel);
|
||||
final GenericPersonOrgaUnitsTable table = new
|
||||
GenericPersonOrgaUnitsTable(itemModel);
|
||||
setDisplayComponent(table);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ public class GenericPersonOrgaUnitsTable extends Table {
|
|||
private final static String TABLE_COL_TYPE = "table_col_type";
|
||||
private ItemSelectionModel itemModel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param itemModel
|
||||
*/
|
||||
public GenericPersonOrgaUnitsTable(final ItemSelectionModel itemModel) {
|
||||
super();
|
||||
|
||||
|
|
@ -64,12 +68,12 @@ public class GenericPersonOrgaUnitsTable extends Table {
|
|||
columnModel.add(new TableColumn(
|
||||
0,
|
||||
ContenttypesGlobalizationUtil
|
||||
.globalize("person.ui.orgaunits.columns.name").localize(),
|
||||
.globalize("person.ui.orgaunits.columns.name"),
|
||||
TABLE_COL_EDIT));
|
||||
columnModel.add(new TableColumn(
|
||||
2,
|
||||
ContenttypesGlobalizationUtil
|
||||
.globalize("person.ui.orgaunits.columns.type").localize(),
|
||||
.globalize("person.ui.orgaunits.columns.type"),
|
||||
TABLE_COL_TYPE));
|
||||
|
||||
setModelBuilder(new ModelBuilder(itemModel));
|
||||
|
|
@ -77,6 +81,9 @@ public class GenericPersonOrgaUnitsTable extends Table {
|
|||
columnModel.get(0).setCellRenderer(new EditCellRenderer());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private class ModelBuilder extends LockableImpl implements TableModelBuilder {
|
||||
|
||||
private final ItemSelectionModel itemModel;
|
||||
|
|
@ -88,29 +95,50 @@ public class GenericPersonOrgaUnitsTable extends Table {
|
|||
public TableModel makeModel(final Table table, final PageState state) {
|
||||
table.getRowSelectionModel().clearSelection(state);
|
||||
|
||||
final GenericPerson person = (GenericPerson) itemModel.getSelectedItem(state);
|
||||
final GenericPerson person = (GenericPerson) itemModel
|
||||
.getSelectedItem(state);
|
||||
|
||||
return new Model(table, state, person);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private class Model implements TableModel {
|
||||
|
||||
private final Table table;
|
||||
private final GenericOrganizationalUnitBundleCollection orgaUnits;
|
||||
|
||||
public Model(final Table table, final PageState state, final GenericPerson person) {
|
||||
/**
|
||||
*
|
||||
* @param table
|
||||
* @param state
|
||||
* @param person
|
||||
*/
|
||||
public Model(final Table table,
|
||||
final PageState state,
|
||||
final GenericPerson person) {
|
||||
this.table = table;
|
||||
orgaUnits =
|
||||
new GenericOrganizationalUnitBundleCollection((DataCollection) person.getGenericPersonBundle().get("organizationalunits"));
|
||||
new GenericOrganizationalUnitBundleCollection((DataCollection)
|
||||
person.getGenericPersonBundle().get("organizationalunits"));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
return table.getColumnModel().size();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean nextRow() {
|
||||
boolean ret;
|
||||
|
|
@ -124,18 +152,29 @@ public class GenericPersonOrgaUnitsTable extends Table {
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param columnIndex
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getElementAt(final int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
return orgaUnits.getGenericOrganizationalUnit().getTitle();
|
||||
case 1:
|
||||
return ((DataObject) orgaUnits.getGenericOrganizationalUnit().get("type")).get("label");
|
||||
return ((DataObject) orgaUnits.getGenericOrganizationalUnit()
|
||||
.get("type")).get("label");
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param columnIndex
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getKeyAt(final int columnIndex) {
|
||||
return orgaUnits.getGenericOrganizationalUnit().getID();
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
|||
this);
|
||||
basicProperties.add(EDIT_SHEET_NAME,
|
||||
ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.edit_basic_properties"),
|
||||
"cms.contenttypes.ui.genericperson.edit_basic_properties"),
|
||||
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||
itemModel),
|
||||
editBasicSheet.getSaveCancelSection()
|
||||
|
|
@ -81,7 +81,7 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
|||
/* Add the SimpleEditStep to the segmented panel */
|
||||
segmentedPanel.addSegment(new
|
||||
Label(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.person.basic_properties")),
|
||||
.globalize("cms.contenttypes.ui.genericperson.basic_properties")),
|
||||
basicProperties);
|
||||
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
|||
new GenericPersonAliasPropertiesStep(
|
||||
itemModel, parent);
|
||||
segmentedPanel.addSegment(new Label(ContenttypesGlobalizationUtil.
|
||||
globalize("cms.contenttypes.ui.person.alias_title")),
|
||||
globalize("cms.contenttypes.ui.genericperson.alias_title")),
|
||||
aliasStep);
|
||||
|
||||
/* Sets the composed segmentedPanel as display component */
|
||||
|
|
@ -106,19 +106,19 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
|||
itemModel);
|
||||
|
||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.surname"),
|
||||
"cms.contenttypes.ui.genericperson.surname"),
|
||||
GenericPerson.SURNAME);
|
||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.givenname"),
|
||||
"cms.contenttypes.ui.genericperson.givenname"),
|
||||
GenericPerson.GIVENNAME);
|
||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.titlepre"),
|
||||
"cms.contenttypes.ui.genericperson.titlepre"),
|
||||
GenericPerson.TITLEPRE);
|
||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.titlepost"),
|
||||
"cms.contenttypes.ui.genericperson.titlepost"),
|
||||
GenericPerson.TITLEPOST);
|
||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.birthdate"),
|
||||
"cms.contenttypes.ui.genericperson.birthdate"),
|
||||
GenericPerson.BIRTHDATE,
|
||||
new DomainObjectPropertySheet.AttributeFormatter() {
|
||||
|
||||
|
|
@ -136,8 +136,8 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
|||
}
|
||||
});
|
||||
|
||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.gender"),
|
||||
sheet.add(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.genericperson.gender"),
|
||||
GenericPerson.GENDER,
|
||||
new DomainObjectPropertySheet.AttributeFormatter() {
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
|||
GenericPerson person = (GenericPerson) item;
|
||||
if (person.getGender() != null) {
|
||||
return (String) ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.gender."
|
||||
"cms.contenttypes.ui.genericperson.gender."
|
||||
+ person.getGender().toLowerCase()).localize();
|
||||
} else {
|
||||
return (String) GlobalizationUtil.globalize(
|
||||
|
|
@ -165,7 +165,7 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
|||
}
|
||||
|
||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.person.description"),
|
||||
"cms.contenttypes.ui.genericperson.description"),
|
||||
GenericPerson.DESCRIPTION);
|
||||
return sheet;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import com.arsdigita.cms.ItemSelectionModel;
|
|||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
|
@ -47,9 +48,13 @@ import org.apache.log4j.Logger;
|
|||
*
|
||||
* @author: Jens Pelzetter
|
||||
*/
|
||||
public class GenericPersonPropertyForm extends BasicPageForm implements FormProcessListener, FormInitListener, FormSubmissionListener {
|
||||
public class GenericPersonPropertyForm extends BasicPageForm
|
||||
implements FormProcessListener,
|
||||
FormInitListener,
|
||||
FormSubmissionListener {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(GenericPersonPropertyForm.class);
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(GenericPersonPropertyForm.class);
|
||||
private GenericPersonPropertiesStep m_step;
|
||||
public static final String PERSON = GenericPerson.PERSON;
|
||||
public static final String SURNAME = GenericPerson.SURNAME;
|
||||
|
|
@ -61,40 +66,66 @@ public class GenericPersonPropertyForm extends BasicPageForm implements FormProc
|
|||
public static final String DESCRIPTION = GenericPerson.DESCRIPTION;
|
||||
public static final String ID = "Person_edit";
|
||||
|
||||
/**
|
||||
* Constructor, creates an empty form.
|
||||
*
|
||||
* @param itemModel
|
||||
*/
|
||||
public GenericPersonPropertyForm(ItemSelectionModel itemModel) {
|
||||
this(itemModel, null);
|
||||
}
|
||||
|
||||
public GenericPersonPropertyForm(ItemSelectionModel itemModel, GenericPersonPropertiesStep step) {
|
||||
/**
|
||||
* Constructor, creates an empty form.
|
||||
* @param itemModel
|
||||
* @param step
|
||||
*/
|
||||
public GenericPersonPropertyForm(ItemSelectionModel itemModel,
|
||||
GenericPersonPropertiesStep step) {
|
||||
super(ID, itemModel);
|
||||
m_step = step;
|
||||
addSubmissionListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add widgets to the Form.
|
||||
*/
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
// Add standard widgets title / name .
|
||||
super.addWidgets();
|
||||
// Add mandatory widgets title/Surname/giben name/name appendix
|
||||
mandatoryFieldWidgets(this);
|
||||
|
||||
add(new Label(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.person.birthdate")));
|
||||
.globalize("cms.contenttypes.ui.genericperson.birthdate")));
|
||||
ParameterModel birthdateParam = new DateParameter(BIRTHDATE);
|
||||
com.arsdigita.bebop.form.Date birthdate = new com.arsdigita.bebop.form.Date(birthdateParam);
|
||||
com.arsdigita.bebop.form.Date birthdate = new
|
||||
com.arsdigita.bebop.form.Date(birthdateParam);
|
||||
Calendar today = new GregorianCalendar();
|
||||
birthdate.setYearRange(1900, today.get(Calendar.YEAR));
|
||||
add(birthdate);
|
||||
|
||||
add(new Label(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.person.gender")));
|
||||
.globalize("cms.contenttypes.ui.genericperson.gender")));
|
||||
ParameterModel genderParam = new StringParameter(GENDER);
|
||||
SingleSelect gender = new SingleSelect(genderParam);
|
||||
gender.addOption(new Option("", new Label((String) ContenttypesGlobalizationUtil.globalize("cms.ui.select_one").localize())));
|
||||
gender.addOption(new Option("f", new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.gender.f").localize())));
|
||||
gender.addOption(new Option("m", new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.gender.m").localize())));
|
||||
gender.addOption(new Option(
|
||||
"",
|
||||
new Label(GlobalizationUtil.globalize("cms.ui.select_one"))));
|
||||
gender.addOption(new Option(
|
||||
"f",
|
||||
new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericperson.gender.f"))));
|
||||
gender.addOption(new Option(
|
||||
"m",
|
||||
new Label(ContenttypesGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.genericperson.gender.m"))));
|
||||
add(gender);
|
||||
|
||||
add(new Label(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.person.description")));
|
||||
.globalize("cms.contenttypes.ui.genericperson.description")));
|
||||
ParameterModel descriptionParam = new StringParameter(DESCRIPTION);
|
||||
TextArea description = new TextArea(descriptionParam);
|
||||
description.setCols(50);
|
||||
|
|
@ -105,26 +136,26 @@ public class GenericPersonPropertyForm extends BasicPageForm implements FormProc
|
|||
|
||||
public static void mandatoryFieldWidgets(FormSection form) {
|
||||
form.add(new Label(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.person.titlepre")));
|
||||
.globalize("cms.contenttypes.ui.genericperson.titlepre")));
|
||||
ParameterModel titlepreParam = new StringParameter(TITLEPRE);
|
||||
TextField titlepre = new TextField(titlepreParam);
|
||||
form.add(titlepre);
|
||||
|
||||
form.add(new Label(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.person.surname")));
|
||||
.globalize("cms.contenttypes.ui.genericperson.surname")));
|
||||
ParameterModel surnameParam = new StringParameter(SURNAME);
|
||||
surnameParam.addParameterListener(new NotNullValidationListener());
|
||||
TextField surname = new TextField(surnameParam);
|
||||
form.add(surname);
|
||||
|
||||
form.add(new Label(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.person.givenname")));
|
||||
.globalize("cms.contenttypes.ui.genericperson.givenname")));
|
||||
ParameterModel givennameParam = new StringParameter(GIVENNAME);
|
||||
TextField givenname = new TextField(givennameParam);
|
||||
form.add(givenname);
|
||||
|
||||
form.add(new Label(ContenttypesGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.person.titlepost")));
|
||||
.globalize("cms.contenttypes.ui.genericperson.titlepost")));
|
||||
ParameterModel titlepostParam = new StringParameter(TITLEPOST);
|
||||
TextField titlepost = new TextField(titlepostParam);
|
||||
form.add(titlepost);
|
||||
|
|
@ -145,7 +176,8 @@ public class GenericPersonPropertyForm extends BasicPageForm implements FormProc
|
|||
|
||||
public void submitted(FormSectionEvent fse) {
|
||||
if (m_step != null
|
||||
&& getSaveCancelSection().getCancelButton().isSelected(fse.getPageState())) {
|
||||
&& getSaveCancelSection().getCancelButton()
|
||||
.isSelected(fse.getPageState())) {
|
||||
m_step.cancelStreamlinedCreation(fse.getPageState());
|
||||
}
|
||||
}
|
||||
|
|
@ -156,7 +188,8 @@ public class GenericPersonPropertyForm extends BasicPageForm implements FormProc
|
|||
GenericPerson person = (GenericPerson) super.processBasicWidgets(fse);
|
||||
|
||||
if (person != null
|
||||
&& getSaveCancelSection().getSaveButton().isSelected(fse.getPageState())) {
|
||||
&& getSaveCancelSection().getSaveButton()
|
||||
.isSelected(fse.getPageState())) {
|
||||
person.setTitlePre((String) data.get(TITLEPRE));
|
||||
person.setSurname((String) data.get(SURNAME));
|
||||
person.setGivenName((String) data.get(GIVENNAME));
|
||||
|
|
|
|||
Loading…
Reference in New Issue