support for dynamic self service options
This commit is contained in:
parent
53b9165e54
commit
4733dbf95c
|
@ -1271,12 +1271,13 @@ abstract class baseModule {
|
|||
* and save settings. We recommend to use the module name as prefix for them
|
||||
* (e.g. posixAccount_homeDirectory) to avoid naming conflicts.
|
||||
*
|
||||
* @param selfServiceProfile $profile currently edited profile
|
||||
* @return htmlElement meta HTML object
|
||||
*
|
||||
* @see baseModule::get_metaData()
|
||||
* @see htmlElement
|
||||
*/
|
||||
public function getSelfServiceSettings() {
|
||||
public function getSelfServiceSettings($profile) {
|
||||
if (isset($this->meta['selfServiceSettings'])) {
|
||||
return $this->meta['selfServiceSettings'];
|
||||
}
|
||||
|
|
|
@ -2164,7 +2164,7 @@ class htmlHiddenInput extends htmlElement {
|
|||
*/
|
||||
function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
|
||||
echo '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '">';
|
||||
return array();
|
||||
return array($this->name => 'hidden');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -237,14 +237,15 @@ function isSelfServiceProfileWritable($name, $scope) {
|
|||
* Returns a hash array (module name => elements) of all module options for the configuration page.
|
||||
*
|
||||
* @param string $scope account type
|
||||
* @param selfServiceProfile $profile currently edited profile
|
||||
* @return array configuration options
|
||||
*/
|
||||
function getSelfServiceSettings($scope) {
|
||||
function getSelfServiceSettings($scope, $profile) {
|
||||
$return = array();
|
||||
$modules = getAvailableModules($scope);
|
||||
for ($i = 0; $i < sizeof($modules); $i++) {
|
||||
$m = new $modules[$i]($scope);
|
||||
$return[$modules[$i]] = $m->getSelfServiceSettings();
|
||||
$return[$modules[$i]] = $m->getSelfServiceSettings($profile);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue