use of com.google.gerrit.client.info.AgreementInfo in project gerrit by GerritCodeReview.
the class NewAgreementScreen method renderSelf.
private void renderSelf() {
current = null;
agreementGroup.setVisible(false);
finalGroup.setVisible(false);
radios.clear();
final SmallHeading hdr = new SmallHeading();
if (available.isEmpty()) {
hdr.setText(Util.C.newAgreementNoneAvailable());
} else {
hdr.setText(Util.C.newAgreementSelectTypeHeading());
}
radios.add(hdr);
for (final AgreementInfo cla : available) {
final RadioButton r = new RadioButton("cla_id", cla.name());
r.addStyleName(Gerrit.RESOURCES.css().contributorAgreementButton());
radios.add(r);
if (mySigned.contains(cla.name())) {
r.setEnabled(false);
final Label l = new Label(Util.C.newAgreementAlreadySubmitted());
l.setStyleName(Gerrit.RESOURCES.css().contributorAgreementAlreadySubmitted());
radios.add(l);
} else {
r.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
showCLA(cla);
}
});
}
if (cla.description() != null && !cla.description().equals("")) {
final Label l = new Label(cla.description());
l.setStyleName(Gerrit.RESOURCES.css().contributorAgreementShortDescription());
radios.add(l);
}
}
}
Aggregations