]> source.dussan.org Git - nextcloud-server.git/commitdiff
add GUI option to set the $home placeholder
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 13 Feb 2019 11:42:41 +0000 (12:42 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 14 Feb 2019 14:22:22 +0000 (15:22 +0100)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/user_ldap/js/wizard/wizardTabAdvanced.js
apps/user_ldap/templates/settings.php

index 9302104b1f62dbe750cc28a98476c815eb8dd279..1545147f64c8bdb0104bf7b53f53a6a1ba466595 100644 (file)
@@ -120,7 +120,11 @@ OCA = OCA || {};
                                home_folder_naming_rule: {
                                        $element: $('#home_folder_naming_rule'),
                                        setMethod: 'setHomeFolderAttribute'
-                               }
+                               },
+                               ldap_ext_storage_home_attribute: {
+                                       $element: $('#ldap_ext_storage_home_attribute'),
+                                       setMethod: 'setExternalStorageHomeAttribute'
+                               },
                        };
                        this.setManagedItems(items);
                },
@@ -326,6 +330,15 @@ OCA = OCA || {};
                        this.setElementValue(this.managedItems.ldap_email_attr.$element, attribute);
                },
 
+               /**
+                * sets the external storage home attribute
+                *
+                * @param {string} attribute
+                */
+               setExternalStorageHomeAttribute: function(attribute) {
+                       this.setElementValue(this.managedItems.ldap_ext_storage_home_attribute.$element, attribute);
+               },
+
                /**
                 * sets the quota attribute
                 *
index 6d69d0aeb1596a351ea0ee64ac71de391b2329d2..7c41363c635180fad1b79620931fe15bf3e9de41 100644 (file)
@@ -108,6 +108,7 @@ style('user_ldap', 'settings');
                                <p><label for="ldap_quota_def"><?php p($l->t('Quota Default'));?></label><input type="text" id="ldap_quota_def" name="ldap_quota_def" data-default="<?php p($_['ldap_quota_def_default']); ?>" title="<?php p($l->t('Override default quota for LDAP users who do not have a quota set in the Quota Field.'));?>" /></p>
                                <p><label for="ldap_email_attr"><?php p($l->t('Email Field'));?></label><input type="text" id="ldap_email_attr" name="ldap_email_attr" data-default="<?php p($_['ldap_email_attr_default']); ?>" title="<?php p($l->t('Set the user\'s email from their LDAP attribute. Leave it empty for default behaviour.'));?>" /></p>
                                <p><label for="home_folder_naming_rule"><?php p($l->t('User Home Folder Naming Rule'));?></label><input type="text" id="home_folder_naming_rule" name="home_folder_naming_rule" title="<?php p($l->t('Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute.'));?>" data-default="<?php p($_['home_folder_naming_rule_default']); ?>" /></p>
+                               <p><label for="ldap_ext_storage_home_attribute"> <?php p($l->t('"$home" Placeholder Field')); ?></label><input type="text" id="ldap_ext_storage_home_attribute" name="ldap_ext_storage_home_attribute" title="<?php p($l->t('$home in an external storage configuration will replaced with the value of the specified attribute')); ?>" data-default="<?php p($_['ldap_ext_storage_home_attribute_default']); ?>"></p>
                        </div>
                </div>
                <?php print_unescaped($_['settingControls']); ?>