summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/css/styles.css4
-rw-r--r--core/templates/login.php12
-rwxr-xr-xlib/app.php9
-rwxr-xr-xlib/util.php1
4 files changed, 26 insertions, 0 deletions
diff --git a/core/css/styles.css b/core/css/styles.css
index 35ef8c36ddf..9d403afc4cd 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -178,3 +178,7 @@ a.bookmarklet { background-color: #ddd; border:1px solid #ccc; padding: 5px;padd
div.crumb { float:left; display:block; background:no-repeat right 0; padding:.75em 1.5em 0 1em; height:2.9em; }
div.crumb:first-child { padding-left:1em; }
div.crumb.last { font-weight:bold; }
+
+/* Alternative Logins */
+#alternative-logins legend { margin-bottom:10px; }
+#alternative-logins li { height:40px; display:inline-block; white-space:nowrap; }
diff --git a/core/templates/login.php b/core/templates/login.php
index bb7a8337523..2cf7ee205f2 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -17,3 +17,15 @@
<input type="submit" id="submit" class="login" value="<?php echo $l->t( 'Log in' ); ?>" />
</fieldset>
</form>
+<?php if (!empty($_['alt_login'])) { ?>
+<form id="alternative-logins">
+ <fieldset>
+ <legend><?php echo $l->t('Alternative Logins') ?></legend>
+ <ul>
+ <?php foreach($_['alt_login'] as $login): ?>
+ <li><a class="button" href="<?php echo $login['href']; ?>" ><?php echo $login['name']; ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ </fieldset>
+</form>
+<?php }
diff --git a/lib/app.php b/lib/app.php
index 5551c111694..e0a99cfe17a 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -36,6 +36,7 @@ class OC_App{
static private $appTypes = array();
static private $loadedApps = array();
static private $checkedApps = array();
+ static private $altLogin = array();
/**
* @brief loads all apps
@@ -539,6 +540,14 @@ class OC_App{
self::$personalForms[]= $app.'/'.$page.'.php';
}
+ public static function registerLogIn($entry) {
+ self::$altLogin[] = $entry;
+ }
+
+ public static function getAlternativeLogIns() {
+ return self::$altLogin;
+ }
+
/**
* @brief: get a list of all apps in the apps folder
* @return array or app names (string IDs)
diff --git a/lib/util.php b/lib/util.php
index 75cc160c18c..f1aa94eb561 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -342,6 +342,7 @@ class OC_Util {
$redirect_url = $_SERVER['REQUEST_URI'];
}
$parameters['redirect_url'] = $redirect_url;
+ $parameters['alt_login'] = OC_App::getAlternativeLogIns();
OC_Template::printGuestPage("", "login", $parameters);
}