diff --git a/src/main/java/org/sigmah/client/ui/presenter/CreateProjectPresenter.java b/src/main/java/org/sigmah/client/ui/presenter/CreateProjectPresenter.java index bc4dd761c..fb08079c5 100644 --- a/src/main/java/org/sigmah/client/ui/presenter/CreateProjectPresenter.java +++ b/src/main/java/org/sigmah/client/ui/presenter/CreateProjectPresenter.java @@ -1,27 +1,27 @@ -package org.sigmah.client.ui.presenter; - -/* - * #%L - * Sigmah - * %% - * Copyright (C) 2010 - 2016 URD - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * . - * #L% - */ - +package org.sigmah.client.ui.presenter; + +/* + * #%L + * Sigmah + * %% + * Copyright (C) 2010 - 2016 URD + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * . + * #L% + */ + import java.util.Date; import java.util.HashMap; @@ -86,6 +86,9 @@ */ @Singleton public class CreateProjectPresenter extends AbstractPagePresenter { + public NGO.counter=0; + public FUNDING.counter=0; + public LOCAL_PARTNER.counter=0; /** * View interface. @@ -433,6 +436,11 @@ public void componentSelected(ButtonEvent ce) { } }); + + if(type==NGO){NGO.counter++; } + else if(type==FUNDING){FUNDING.counter++;} + else if(type==LOCAL_PARTNER){LOCAL_PARTNER.counter++;} + else{} } diff --git a/src/main/java/org/sigmah/client/ui/widget/form/ProjectModelTypeField.java b/src/main/java/org/sigmah/client/ui/widget/form/ProjectModelTypeField.java index 142653ba4..d7feab28a 100644 --- a/src/main/java/org/sigmah/client/ui/widget/form/ProjectModelTypeField.java +++ b/src/main/java/org/sigmah/client/ui/widget/form/ProjectModelTypeField.java @@ -27,6 +27,7 @@ import org.sigmah.client.ui.res.icon.dashboard.funding.FundingIconProvider; import org.sigmah.client.ui.res.icon.dashboard.funding.FundingIconProvider.IconSize; +import org.sigmah.client.ui.presenter; import org.sigmah.client.util.ClientUtils; import org.sigmah.shared.dto.referential.ProjectModelType; @@ -104,7 +105,7 @@ public ProjectModelTypeField(final String fieldLabel, final boolean mandatory, f icon.getElement().getStyle().setMarginTop(-2, Unit.PX); icon.getElement().getStyle().setPaddingRight(6, Unit.PX); - radio.setBoxLabel(icon.toString() + ProjectModelType.getName(projectModelType)); + radio.setBoxLabel(icon.toString() + ProjectModelType.getName(projectModelType) + "(" + ProjectModelType.counter + ")"); radioGroup.add(radio); radios.put(projectModelType, radio);