Upgrade notes
@@ -34,6 +35,11 @@ This is a list of API changes for all LAM releases.
supportsAdminInterface(): Can be used mark modules that only support the self service.
+Meta HTML:
+
+
Input fields support autocompletion
+
+
3.7 -> 3.8
diff --git a/lam/docs/manual-sources/howto.xml b/lam/docs/manual-sources/howto.xml
index 722ab034..9f0a20f5 100644
--- a/lam/docs/manual-sources/howto.xml
+++ b/lam/docs/manual-sources/howto.xml
@@ -2186,6 +2186,30 @@ Have fun!
+
+ You can define a list of services in your LAM server profile
+ that is used for autocompletion.
+
+
+
+
+
+
+
+
+
+ The autocompletion will show all values that contains the
+ entered text. To display the whole list you can press backspace in the
+ empty input field. Of course, you can also insert a service name that
+ is not in the list.
+
+
+
+
+
+
+
+
@@ -3059,7 +3083,7 @@ Run slapindex to rebuild the index.
LAM Pro allows you to manage automount entries. Please activate
the account type "Automount objects" in your LAM Pro server
- profile:
+ profile.
@@ -3069,6 +3093,18 @@ Run slapindex to rebuild the index.
+ Then add the correct automount module. Usually, this is "Automount
+ entry (automount)". If you use Suse Linux with RFC2307bis schema please
+ select "Automount entry (rfc2307bisAutomount)".
+
+
+
+
+
+
+
+
+
This will add a new tab to LAM Pro's main screen which includes a
list of all automount entries. Here you can easily create new
entries.
@@ -4988,7 +5024,7 @@ Run slapindex to rebuild the index.
automount
- autofs.schema
+ autofs.schema, rfc2307bis.schemaAutofs LDAP
diff --git a/lam/docs/manual-sources/images/automount3.png b/lam/docs/manual-sources/images/automount3.png
new file mode 100644
index 00000000..590143ff
Binary files /dev/null and b/lam/docs/manual-sources/images/automount3.png differ
diff --git a/lam/docs/manual-sources/images/mod_authorizedServices2.png b/lam/docs/manual-sources/images/mod_authorizedServices2.png
new file mode 100644
index 00000000..1b843530
Binary files /dev/null and b/lam/docs/manual-sources/images/mod_authorizedServices2.png differ
diff --git a/lam/docs/manual-sources/images/mod_authorizedServices3.png b/lam/docs/manual-sources/images/mod_authorizedServices3.png
new file mode 100644
index 00000000..6cd6503b
Binary files /dev/null and b/lam/docs/manual-sources/images/mod_authorizedServices3.png differ
diff --git a/lam/lib/html.inc b/lam/lib/html.inc
index 4df40fea..3b6b7254 100644
--- a/lam/lib/html.inc
+++ b/lam/lib/html.inc
@@ -364,6 +364,12 @@ class htmlInputField extends htmlElement {
protected $required = false;
/** validation rule */
private $validationRule = null;
+ /** enable autocomplete */
+ private $autocomplete = false;
+ /** autocompletion suggestions */
+ private $autocompleteValues = array();
+ /** autocomplete start at this input length */
+ private $autocompleteMinLength = 1;
/**
* Constructor
@@ -437,6 +443,15 @@ class htmlInputField extends htmlElement {
$disabled = ' disabled';
}
echo '';
+ // autocompletion
+ if ($this->autocomplete) {
+ echo "";
+ }
if ($this->transient) {
return array();
}
@@ -520,6 +535,21 @@ class htmlInputField extends htmlElement {
public function setValidationRule($rule) {
$this->validationRule = $rule;
}
+
+ /**
+ * Enables autocompletion for this input field.
+ *
+ * @param array $values list of values to suggest
+ * @param int $minLength autocompletion starts after this number of caracters entered (default 1; 0 means immediate start)
+ */
+ public function enableAutocompletion($values, $minLength = 1) {
+ for ($i = 0; $i < sizeof($values); $i++) {
+ $values[$i] = '"' . htmlspecialchars($values[$i]) . '"';
+ }
+ $this->autocomplete = true;
+ $this->autocompleteValues = $values;
+ $this->autocompleteMinLength = $minLength;
+ }
}
diff --git a/lam/lib/modules/authorizedServiceObject.inc b/lam/lib/modules/authorizedServiceObject.inc
index e6e5bc59..91731286 100644
--- a/lam/lib/modules/authorizedServiceObject.inc
+++ b/lam/lib/modules/authorizedServiceObject.inc
@@ -81,8 +81,16 @@ class authorizedServiceObject extends baseModule {
'autoAdd' => array(
"Headline" => _("Automatically add this extension"),
"Text" => _("This will enable the extension automatically if this profile is loaded.")
+ ),
+ 'predefinedServices' => array(
+ "Headline" => _("Predefined services"),
+ "Text" => _("These services will show up as hint if you enter a new service.")
)
);
+ // config options
+ $configContainer = new htmlTable();
+ $configContainer->addElement(new htmlTableExtendedInputTextarea('authorizedServiceObject_services', "sshd\r\nimap", 30, 5, _('Predefined services'), 'predefinedServices'));
+ $return['config_options']['all'] = $configContainer;
// upload fields
$return['upload_columns'] = array(
array(
@@ -146,6 +154,10 @@ class authorizedServiceObject extends baseModule {
}
$return = new htmlTable();
if (in_array('authorizedServiceObject', $this->attributes['objectClass'])) {
+ $autocompleteValues = array();
+ if (isset($this->moduleSettings['authorizedServiceObject_services'])) {
+ $autocompleteValues = $this->moduleSettings['authorizedServiceObject_services'];
+ }
$ASCount = 0;
// list current authorizedService's
if (isset($this->attributes['authorizedService'])) {
@@ -158,6 +170,7 @@ class authorizedServiceObject extends baseModule {
$return->addElement(new htmlOutputText(''));
}
$ASInput = new htmlInputField('authorizedService' . $i, $this->attributes['authorizedService'][$i]);
+ $ASInput->enableAutocompletion($autocompleteValues, 0);
$return->addElement($ASInput);
$return->addElement(new htmlButton('delAS' . $i, 'del.png', true));
$return->addElement(new htmlHelpLink('authorizedService'), true);
@@ -166,6 +179,7 @@ class authorizedServiceObject extends baseModule {
// input box for new Service
$return->addElement(new htmlOutputText(_('New Authorized Service')));
$newASInput = new htmlInputField('authorizedService', '');
+ $newASInput->enableAutocompletion($autocompleteValues, 0);
$return->addElement($newASInput);
$return->addElement(new htmlButton('addAS', 'add.png', true));
$return->addElement(new htmlHelpLink('authorizedService'));
diff --git a/lam/style/120_jquery-ui-1.8.2.custom.css b/lam/style/120_jquery-ui-1.8.2.custom.css
index 30b2d2ec..8e9a5073 100644
--- a/lam/style/120_jquery-ui-1.8.2.custom.css
+++ b/lam/style/120_jquery-ui-1.8.2.custom.css
@@ -334,6 +334,7 @@
float: left;
clear: left;
width: 100%;
+ background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
}
.ui-menu .ui-menu-item a {
text-decoration:none;