summaryrefslogtreecommitdiff
path: root/lib/kolab_api_service.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-12-22 12:10:39 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-12-22 12:10:39 (GMT)
commit47b1217a1c494dc428f4ff16e026f44abd3f3ed3 (patch)
tree63e50a0756e70beaff0e4fdc2c14817a2ae0c704 /lib/kolab_api_service.php
parentd1f86621d0ffdbdb536fb352d9b3a74397aa04c2 (diff)
downloadkolab-wap-47b1217a1c494dc428f4ff16e026f44abd3f3ed3.tar.gz
Add support for autocompletion on text fields (#3885)
- to enable that define field as 'text-autocompletion' in settings or just add 'autocomplete' = true to the form_field params.
Diffstat (limited to 'lib/kolab_api_service.php')
-rw-r--r--lib/kolab_api_service.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php
index 9cd37de..6809bd5 100644
--- a/lib/kolab_api_service.php
+++ b/lib/kolab_api_service.php
@@ -311,6 +311,10 @@ abstract class kolab_api_service
foreach ($type_attrs['form_fields'] as $key => $value) {
Log::trace("Running parse input attributes for key $key");
+ if (($value['type'] == 'text' || empty($value['type'])) && is_array($attribs[$key])) {
+ $attribs[$key] = array_shift($attribs[$key]);
+ }
+
if (empty($attribs[$key]) && empty($value['optional'])) {
Log::error("\$attribs['" . $key . "'] is empty, and the field is not optional");
throw new Exception("Missing input value for $key", 345);