Added fields for name addendum and description in GenericOrganization.
git-svn-id: https://svn.libreccm.org/ccm/trunk@165 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
8a91443473
commit
b0362fa220
|
|
@ -24,6 +24,8 @@ import com.arsdigita.cms.ContentPage;
|
||||||
|
|
||||||
object type GenericOrganization extends ContentPage {
|
object type GenericOrganization extends ContentPage {
|
||||||
String[0..1] organizationname = ct_genericorganizations.organizationname VARCHAR(512);
|
String[0..1] organizationname = ct_genericorganizations.organizationname VARCHAR(512);
|
||||||
|
String[0..1] organizationnameaddendum = ct_genericorganizations.organizationnameaddendum VARCHAR(512);
|
||||||
|
String[0..1] description = ct_genericorganizations.description VARCHAR(2000);
|
||||||
|
|
||||||
reference key (ct_genericorganizations.organization_id);
|
reference key (ct_genericorganizations.organization_id);
|
||||||
}
|
}
|
||||||
|
|
@ -36,6 +36,8 @@ import java.math.BigDecimal;
|
||||||
public class GenericOrganization extends ContentPage {
|
public class GenericOrganization extends ContentPage {
|
||||||
|
|
||||||
public static final String ORGANIZATIONNAME = "organizationname";
|
public static final String ORGANIZATIONNAME = "organizationname";
|
||||||
|
public static final String ORGANIZATIONNAMEADDENDUM = "organizationnameaddendum";
|
||||||
|
public static final String DESCRIPTION = "description";
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.GenericOrganization";
|
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.GenericOrganization";
|
||||||
private static final GenericOrganizationConfig s_config = new GenericOrganizationConfig();
|
private static final GenericOrganizationConfig s_config = new GenericOrganizationConfig();
|
||||||
|
|
@ -85,4 +87,20 @@ public class GenericOrganization extends ContentPage {
|
||||||
public void setOrganizationName(String name) {
|
public void setOrganizationName(String name) {
|
||||||
set(ORGANIZATIONNAME, name);
|
set(ORGANIZATIONNAME, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOrganizationNameAddendum() {
|
||||||
|
return (String)get(ORGANIZATIONNAMEADDENDUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrganizationNameAddendum(String addendum) {
|
||||||
|
set(ORGANIZATIONNAMEADDENDUM, addendum);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return (String)get(DESCRIPTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
set(DESCRIPTION, description);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -58,7 +58,9 @@ public class GenericOrganizationPropertiesStep extends SimpleEditStep {
|
||||||
public static Component getGenericOrganizationPropertySheet(ItemSelectionModel itemModel) {
|
public static Component getGenericOrganizationPropertySheet(ItemSelectionModel itemModel) {
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add((String)GlobalizationUtil.globalize("cms.contenttypes.ui.organizationname").localize(), GenericOrganization.ORGANIZATIONNAME);
|
sheet.add((String)GlobalizationUtil.globalize("cms.contenttypes.ui.genericorganization.name").localize(), GenericOrganization.ORGANIZATIONNAME);
|
||||||
|
sheet.add((String)GlobalizationUtil.globalize("cms.contenttypes.ui.genericorganization.nameaddendum").localize(), GenericOrganization.ORGANIZATIONNAMEADDENDUM);
|
||||||
|
sheet.add((String)GlobalizationUtil.globalize("cms.contenttypes.ui.genericorganization.description").localize(), GenericOrganization.DESCRIPTION);
|
||||||
|
|
||||||
if(!ContentSection.getConfig().getHideLaunchDate()) {
|
if(!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
sheet.add((String)GlobalizationUtil.globalize("cms.ui.authoring.page_launch_date").localize(),
|
sheet.add((String)GlobalizationUtil.globalize("cms.ui.authoring.page_launch_date").localize(),
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,8 @@ public class GenericOrganizationPropertyForm extends BasicPageForm implements Fo
|
||||||
private GenericOrganizationPropertiesStep m_step;
|
private GenericOrganizationPropertiesStep m_step;
|
||||||
|
|
||||||
public static final String ORGANIZATIONNAME = GenericOrganization.ORGANIZATIONNAME;
|
public static final String ORGANIZATIONNAME = GenericOrganization.ORGANIZATIONNAME;
|
||||||
|
public static final String ORGANIZATIONNAMEADDENDUM = GenericOrganization.ORGANIZATIONNAMEADDENDUM;
|
||||||
|
public static final String DESCRIPTION = GenericOrganization.DESCRIPTION;
|
||||||
|
|
||||||
public static final String ID = "GenericOrganization_edit";
|
public static final String ID = "GenericOrganization_edit";
|
||||||
|
|
||||||
|
|
@ -78,7 +80,19 @@ public class GenericOrganizationPropertyForm extends BasicPageForm implements Fo
|
||||||
add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.genericorganization.organizationname")));
|
add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.genericorganization.organizationname")));
|
||||||
ParameterModel organizationNameParam = new StringParameter(ORGANIZATIONNAME);
|
ParameterModel organizationNameParam = new StringParameter(ORGANIZATIONNAME);
|
||||||
TextField organizationName = new TextField(organizationNameParam);
|
TextField organizationName = new TextField(organizationNameParam);
|
||||||
add(organizationName);
|
add(organizationName);
|
||||||
|
|
||||||
|
add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.genericorganization.organizationnameaddendum")));
|
||||||
|
ParameterModel organizationNameAddendumParam = new StringParameter(ORGANIZATIONNAMEADDENDUM);
|
||||||
|
TextField organizationNameAddendum = new TextField(organizationNameAddendumParam);
|
||||||
|
add(organizationNameAddendum);
|
||||||
|
|
||||||
|
add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.genericorganization.description")));
|
||||||
|
ParameterModel descriptionParam = new StringParameter(DESCRIPTION);
|
||||||
|
TextArea description = new TextArea(descriptionParam);
|
||||||
|
description.setCols(40);
|
||||||
|
description.setRows(5);
|
||||||
|
add(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(FormSectionEvent fse) {
|
public void init(FormSectionEvent fse) {
|
||||||
|
|
@ -86,6 +100,8 @@ public class GenericOrganizationPropertyForm extends BasicPageForm implements Fo
|
||||||
GenericOrganization orga = (GenericOrganization)super.initBasicWidgets(fse);
|
GenericOrganization orga = (GenericOrganization)super.initBasicWidgets(fse);
|
||||||
|
|
||||||
data.put(ORGANIZATIONNAME, orga.getOrganizationName());
|
data.put(ORGANIZATIONNAME, orga.getOrganizationName());
|
||||||
|
data.put(ORGANIZATIONNAMEADDENDUM, orga.getOrganizationNameAddendum());
|
||||||
|
data.put(DESCRIPTION, orga.getDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void submitted(FormSectionEvent fse) {
|
public void submitted(FormSectionEvent fse) {
|
||||||
|
|
@ -104,6 +120,8 @@ public class GenericOrganizationPropertyForm extends BasicPageForm implements Fo
|
||||||
&& getSaveCancelSection().getSaveButton().isSelected(fse.getPageState())) {
|
&& getSaveCancelSection().getSaveButton().isSelected(fse.getPageState())) {
|
||||||
|
|
||||||
orga.setOrganizationName((String)data.get(ORGANIZATIONNAME));
|
orga.setOrganizationName((String)data.get(ORGANIZATIONNAME));
|
||||||
|
orga.setOrganizationNameAddendum((String)data.get(ORGANIZATIONNAMEADDENDUM));
|
||||||
|
orga.setDescription((String)data.get(DESCRIPTION));
|
||||||
|
|
||||||
orga.save();
|
orga.save();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue