diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-08-08 23:32:54 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-08-08 23:46:52 +0200 |
commit | 7b38e5d7c73cb29a5b57bb36b9f22ce2672cb325 (patch) | |
tree | 132b282b41ab4ac2c2374b455255b8514b6b000c /apps | |
parent | 82d2c45e14e5089defef8712dafa0fe97e16f8e0 (diff) | |
download | nextcloud-server-7b38e5d7c73cb29a5b57bb36b9f22ce2672cb325.tar.gz nextcloud-server-7b38e5d7c73cb29a5b57bb36b9f22ce2672cb325.zip |
apps can now add their own forms to the Personal page
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_openid/appinfo/app.php | 2 | ||||
-rw-r--r-- | apps/user_openid/js/settings.js | 12 | ||||
-rw-r--r-- | apps/user_openid/settings.php | 10 | ||||
-rw-r--r-- | apps/user_openid/templates/settings.php | 6 |
4 files changed, 30 insertions, 0 deletions
diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php index 93b178ac706..3cdf2664e81 100644 --- a/apps/user_openid/appinfo/app.php +++ b/apps/user_openid/appinfo/app.php @@ -19,6 +19,8 @@ if(strpos($_SERVER["REQUEST_URI"],'?') and !strpos($_SERVER["REQUEST_URI"],'=')) OC_Util::addHeader('link',array('rel'=>'openid.server', 'href'=>$urlBase.OC_Helper::linkTo( "user_openid", "user.php" ).'/'.$userName)); OC_Util::addHeader('link',array('rel'=>'openid.delegate', 'href'=>$urlBase.OC_Helper::linkTo( "user_openid", "user.php" ).'/'.$userName)); +OC_APP::registerPersonal('user_openid','settings'); + require_once 'apps/user_openid/user_openid.php'; //active the openid backend diff --git a/apps/user_openid/js/settings.js b/apps/user_openid/js/settings.js new file mode 100644 index 00000000000..b85ce2d3522 --- /dev/null +++ b/apps/user_openid/js/settings.js @@ -0,0 +1,12 @@ +$(document).ready(function(){ + $('#openidform input').blur(function(event){ + event.preventDefault(); + var post = $( "#openidform" ).serialize(); + $.post( 'ajax/openid.php', post, function(data){ + if( data.status == "success" ){ + }else{ + alert('error while setting OpenID'); + } + }); + }); +}); diff --git a/apps/user_openid/settings.php b/apps/user_openid/settings.php new file mode 100644 index 00000000000..d85eaebb5ee --- /dev/null +++ b/apps/user_openid/settings.php @@ -0,0 +1,10 @@ +<?php + +$tmpl = new OC_Template( 'user_openid', 'settings'); +$identity=OC_Preferences::getValue(OC_User::getUser(),'user_openid','identity',''); +$tmpl->assign('identity',$identity); + +OC_Util::addScript('user_openid','settings'); + +return $tmpl->fetchPage(); +?>
\ No newline at end of file diff --git a/apps/user_openid/templates/settings.php b/apps/user_openid/templates/settings.php new file mode 100644 index 00000000000..fff1eff09e0 --- /dev/null +++ b/apps/user_openid/templates/settings.php @@ -0,0 +1,6 @@ +<form id="openidform"> + <fieldset> + <legend><?php echo $l->t( 'OpenID' );?></legend> + <input type="text" name='identity' id='identity' value="<?php echo $_['identity']; ?>" placeholder="OpenID for <?php echo OC_User::getUser();?>" /> + </fieldset> +</form>
\ No newline at end of file |