diff --git a/src/main/java/org/olat/registration/RegistrationAdminController.java b/src/main/java/org/olat/registration/RegistrationAdminController.java index aa793917abbe355d11306c953288b156dee413d1..1738ca9f33844696a93f9774455bb80133052c86 100644 --- a/src/main/java/org/olat/registration/RegistrationAdminController.java +++ b/src/main/java/org/olat/registration/RegistrationAdminController.java @@ -135,13 +135,8 @@ public class RegistrationAdminController extends FormBasicController { String domainsList = registrationModule.getDomainListRaw(); domainListElement = uifactory.addTextAreaElement("registration.domain.list", "admin.registration.domains", 2000, 10, 65, true, domainsList, domainsContainer); - FormLayoutContainer buttonGroupLayout = FormLayoutContainer.createButtonLayout("buttons", getTranslator()); - buttonGroupLayout.setRootForm(mainForm); - uifactory.addFormSubmitButton("save", buttonGroupLayout); - formLayout.add(buttonGroupLayout); - //static property - staticPropContainer = FormLayoutContainer.createDefaultFormLayout("domains", getTranslator()); + staticPropContainer = FormLayoutContainer.createDefaultFormLayout("propertiesmapping", getTranslator()); staticPropContainer.setRootForm(mainForm); staticPropContainer.contextPut("off_title", translate("admin.registration.staticprop.title")); formLayout.add(staticPropContainer); @@ -165,6 +160,11 @@ public class RegistrationAdminController extends FormBasicController { String propertyValue = registrationModule.getStaticPropertyMappingValue(); propertyValueElement = uifactory.addTextElement("admin.registration.prop.value", "admin.registration.propertyValue", 255, propertyValue, staticPropContainer); + FormLayoutContainer buttonGroupLayout = FormLayoutContainer.createButtonLayout("buttons", getTranslator()); + buttonGroupLayout.setRootForm(mainForm); + uifactory.addFormSubmitButton("save", buttonGroupLayout); + formLayout.add(buttonGroupLayout); + updateUI(); } @@ -205,10 +205,11 @@ public class RegistrationAdminController extends FormBasicController { domainsContainer.setVisible(enableDomains); //static prop - staticPropContainer.setVisible(enableMain); + boolean enableProps = enableMain && (registrationLinkElement.isSelected(0) || registrationLoginElement.isSelected(0)); + staticPropContainer.setVisible(enableProps); boolean enabledProp = staticPropElement.isSelected(0); - propertyElement.setVisible(enableMain && enabledProp); - propertyValueElement.setVisible(enableMain && enabledProp); + propertyElement.setVisible(enableProps && enabledProp); + propertyValueElement.setVisible(enableProps && enabledProp); } @Override diff --git a/src/main/java/org/olat/registration/_content/admin.html b/src/main/java/org/olat/registration/_content/admin.html index 5122a54042d2c1b5f633c83335aef06c5faba692..84dca7ddba02b22e876ebd4713b782bfb3992331 100644 --- a/src/main/java/org/olat/registration/_content/admin.html +++ b/src/main/java/org/olat/registration/_content/admin.html @@ -1,3 +1,4 @@ $r.render("settings") $r.render("domains") +$r.render("propertiesmapping") $r.render("buttons") \ No newline at end of file