Style cleanup settings
This commit is contained in:
parent
1a747b3e48
commit
83f161d3f9
|
@ -10,7 +10,9 @@ OCP\JSON::callCheck();
|
||||||
|
|
||||||
$username = isset($_POST["username"])?$_POST["username"]:'';
|
$username = isset($_POST["username"])?$_POST["username"]:'';
|
||||||
|
|
||||||
if(($username == '' && !OC_User::isAdminUser(OC_User::getUser()))|| (!OC_User::isAdminUser(OC_User::getUser()) && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username))) {
|
if(($username == '' && !OC_User::isAdminUser(OC_User::getUser()))
|
||||||
|
|| (!OC_User::isAdminUser(OC_User::getUser())
|
||||||
|
&& !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username))) {
|
||||||
$l = OC_L10N::get('core');
|
$l = OC_L10N::get('core');
|
||||||
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
|
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
|
||||||
exit();
|
exit();
|
||||||
|
|
|
@ -13,7 +13,9 @@ if($username == OC_User::getUser() && $group == "admin" && OC_User::isAdminUser
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!OC_User::isAdminUser(OC_User::getUser()) && (!OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username) || !OC_SubAdmin::isGroupAccessible(OC_User::getUser(), $group))) {
|
if(!OC_User::isAdminUser(OC_User::getUser())
|
||||||
|
&& (!OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)
|
||||||
|
|| !OC_SubAdmin::isGroupAccessible(OC_User::getUser(), $group))) {
|
||||||
$l = OC_L10N::get('core');
|
$l = OC_L10N::get('core');
|
||||||
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
|
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
|
||||||
exit();
|
exit();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('../lib/base.php');
|
require_once '../lib/base.php';
|
||||||
// Logic
|
// Logic
|
||||||
$operation = isset($_GET['operation']) ? $_GET['operation'] : '';
|
$operation = isset($_GET['operation']) ? $_GET['operation'] : '';
|
||||||
$server = OC_OAuth_server::init();
|
$server = OC_OAuth_server::init();
|
||||||
|
@ -23,7 +23,8 @@ switch($operation){
|
||||||
$callbackfail = empty($_GET['callback_fail']) ? null : $_GET['callback_fail'];
|
$callbackfail = empty($_GET['callback_fail']) ? null : $_GET['callback_fail'];
|
||||||
$consumer = OC_OAuth_Server::register_consumer($_GET['name'], $_GET['url'], $callbacksuccess, $callbackfail);
|
$consumer = OC_OAuth_Server::register_consumer($_GET['name'], $_GET['url'], $callbacksuccess, $callbackfail);
|
||||||
|
|
||||||
echo 'Registered consumer successfully! </br></br>Key: ' . $consumer->key . '</br>Secret: ' . $consumer->secret;
|
echo 'Registered consumer successfully! </br></br>Key: ' . $consumer->key
|
||||||
|
. '</br>Secret: ' . $consumer->secret;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -61,9 +62,11 @@ switch($operation){
|
||||||
if(!empty($notfound)) {
|
if(!empty($notfound)) {
|
||||||
// We need more apps :( Show error
|
// We need more apps :( Show error
|
||||||
if(count($notfound)==1) {
|
if(count($notfound)==1) {
|
||||||
$message = 'requires that you have an extra app installed on your ownCloud. Please contact your ownCloud administrator and ask them to install the app below.';
|
$message = 'requires that you have an extra app installed on your ownCloud.'
|
||||||
|
.' Please contact your ownCloud administrator and ask them to install the app below.';
|
||||||
} else {
|
} else {
|
||||||
$message = 'requires that you have some extra apps installed on your ownCloud. Please contract your ownCloud administrator and ask them to install the apps below.';
|
$message = 'requires that you have some extra apps installed on your ownCloud.'
|
||||||
|
.' Please contract your ownCloud administrator and ask them to install the apps below.';
|
||||||
}
|
}
|
||||||
$t = new OC_Template('settings', 'oauth-required-apps', 'guest');
|
$t = new OC_Template('settings', 'oauth-required-apps', 'guest');
|
||||||
OC_Util::addStyle('settings', 'oauth');
|
OC_Util::addStyle('settings', 'oauth');
|
||||||
|
|
|
@ -40,7 +40,7 @@ $this->create('settings_ajax_removegroup', '/settings/ajax/removegroup.php')
|
||||||
$this->create('settings_ajax_changepassword', '/settings/ajax/changepassword.php')
|
$this->create('settings_ajax_changepassword', '/settings/ajax/changepassword.php')
|
||||||
->actionInclude('settings/ajax/changepassword.php');
|
->actionInclude('settings/ajax/changepassword.php');
|
||||||
$this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
|
$this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
|
||||||
->actionInclude('settings/ajax/changedisplayname.php');
|
->actionInclude('settings/ajax/changedisplayname.php');
|
||||||
// personel
|
// personel
|
||||||
$this->create('settings_ajax_lostpassword', '/settings/ajax/lostpassword.php')
|
$this->create('settings_ajax_lostpassword', '/settings/ajax/lostpassword.php')
|
||||||
->actionInclude('settings/ajax/lostpassword.php');
|
->actionInclude('settings/ajax/lostpassword.php');
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
* This file is licensed under the Affero General Public License version 3 or later.
|
* This file is licensed under the Affero General Public License version 3 or later.
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/?>
|
*/?>
|
||||||
<script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('apps_custom');?>?appid=<?php echo $_['appid']; ?>"></script>
|
<script type="text/javascript"
|
||||||
|
src="<?php echo OC_Helper::linkToRoute('apps_custom');?>?appid=<?php echo $_['appid']; ?>"></script>
|
||||||
<script type="text/javascript" src="<?php echo OC_Helper::linkTo('settings/js', 'apps.js');?>"></script>
|
<script type="text/javascript" src="<?php echo OC_Helper::linkTo('settings/js', 'apps.js');?>"></script>
|
||||||
|
|
||||||
<div id="controls">
|
<div id="controls">
|
||||||
|
@ -12,21 +13,27 @@
|
||||||
</div>
|
</div>
|
||||||
<ul id="leftcontent" class="applist hascontrols">
|
<ul id="leftcontent" class="applist hascontrols">
|
||||||
<?php foreach($_['apps'] as $app):?>
|
<?php foreach($_['apps'] as $app):?>
|
||||||
<li <?php if($app['active']) echo 'class="active"'?> data-id="<?php echo $app['id'] ?>" <?php if ( isset( $app['ocs_id'] ) ) { echo "data-id-ocs=\"{$app['ocs_id']}\""; } ?>
|
<li <?php if($app['active']) echo 'class="active"'?> data-id="<?php echo $app['id'] ?>"
|
||||||
|
<?php if ( isset( $app['ocs_id'] ) ) { echo "data-id-ocs=\"{$app['ocs_id']}\""; } ?>
|
||||||
data-type="<?php echo $app['internal'] ? 'internal' : 'external' ?>" data-installed="1">
|
data-type="<?php echo $app['internal'] ? 'internal' : 'external' ?>" data-installed="1">
|
||||||
<a class="app<?php if(!$app['internal']) echo ' externalapp' ?>" href="?appid=<?php echo $app['id'] ?>"><?php echo htmlentities($app['name']) ?></a>
|
<a class="app<?php if(!$app['internal']) echo ' externalapp' ?>"
|
||||||
<?php if(!$app['internal']) echo '<small class="'.$app['internalclass'].' list">'.$app['internallabel'].'</small>' ?>
|
href="?appid=<?php echo $app['id'] ?>"><?php echo htmlentities($app['name']) ?></a>
|
||||||
|
<?php if(!$app['internal'])
|
||||||
|
echo '<small class="'.$app['internalclass'].' list">'.$app['internallabel'].'</small>' ?>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="rightcontent">
|
<div id="rightcontent">
|
||||||
<div class="appinfo">
|
<div class="appinfo">
|
||||||
<h3><strong><span class="name"><?php echo $l->t('Select an App');?></span></strong><span class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3>
|
<h3><strong><span class="name"><?php echo $l->t('Select an App');?></span></strong><span
|
||||||
|
class="version"></span><small class="externalapp" style="visibility:hidden;"></small></h3>
|
||||||
<span class="score"></span>
|
<span class="score"></span>
|
||||||
<p class="description"></p>
|
<p class="description"></p>
|
||||||
<img src="" class="preview" />
|
<img src="" class="preview" />
|
||||||
<p class="appslink hidden"><a href="#" target="_blank"><?php echo $l->t('See application page at apps.owncloud.com');?></a></p>
|
<p class="appslink hidden"><a href="#" target="_blank"><?php
|
||||||
<p class="license hidden"><?php echo $l->t('<span class="licence"></span>-licensed by <span class="author"></span>');?></p>
|
echo $l->t('See application page at apps.owncloud.com');?></a></p>
|
||||||
|
<p class="license hidden"><?php
|
||||||
|
echo $l->t('<span class="licence"></span>-licensed by <span class="author"></span>');?></p>
|
||||||
<input class="enable hidden" type="submit" />
|
<input class="enable hidden" type="submit" />
|
||||||
<input class="update hidden" type="submit" value="<?php echo($l->t('Update')); ?>" />
|
<input class="update hidden" type="submit" value="<?php echo($l->t('Update')); ?>" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,14 +1,20 @@
|
||||||
<div id="controls">
|
<div id="controls">
|
||||||
<?php if($_['admin']) { ?>
|
<?php if($_['admin']) { ?>
|
||||||
<a class="button newquestion <?php echo($_['style1']); ?>" href="<?php echo($_['url1']); ?>"><?php echo $l->t( 'User Documentation' ); ?></a>
|
<a class="button newquestion <?php echo($_['style1']); ?>"
|
||||||
<a class="button newquestion <?php echo($_['style2']); ?>" href="<?php echo($_['url2']); ?>"><?php echo $l->t( 'Administrator Documentation' ); ?></a>
|
href="<?php echo($_['url1']); ?>"><?php echo $l->t( 'User Documentation' ); ?></a>
|
||||||
|
<a class="button newquestion <?php echo($_['style2']); ?>"
|
||||||
|
href="<?php echo($_['url2']); ?>"><?php echo $l->t( 'Administrator Documentation' ); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="button newquestion" href="http://owncloud.org/support" target="_blank"><?php echo $l->t( 'Online Documentation' ); ?></a>
|
<a class="button newquestion" href="http://owncloud.org/support" target="_blank"><?php
|
||||||
<a class="button newquestion" href="http://forum.owncloud.org" target="_blank"><?php echo $l->t( 'Forum' ); ?></a>
|
echo $l->t( 'Online Documentation' ); ?></a>
|
||||||
|
<a class="button newquestion" href="http://forum.owncloud.org" target="_blank"><?php
|
||||||
|
echo $l->t( 'Forum' ); ?></a>
|
||||||
<?php if($_['admin']) { ?>
|
<?php if($_['admin']) { ?>
|
||||||
<a class="button newquestion" href="https://github.com/owncloud/core/issues" target="_blank"><?php echo $l->t( 'Bugtracker' ); ?></a>
|
<a class="button newquestion" href="https://github.com/owncloud/core/issues" target="_blank"><?php
|
||||||
|
echo $l->t( 'Bugtracker' ); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="button newquestion" href="http://owncloud.com" target="_blank"><?php echo $l->t( 'Commercial Support' ); ?></a>
|
<a class="button newquestion" href="http://owncloud.com" target="_blank"><?php
|
||||||
|
echo $l->t( 'Commercial Support' ); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="help-includes">
|
<div class="help-includes">
|
||||||
<iframe src="<?php echo($_['url']); ?>" class="help-iframe">abc</iframe>
|
<iframe src="<?php echo($_['url']); ?>" class="help-iframe">abc</iframe>
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
*/?>
|
*/?>
|
||||||
|
|
||||||
<div id="quota" class="personalblock"><div style="width:<?php echo $_['usage_relative'];?>%;">
|
<div id="quota" class="personalblock"><div style="width:<?php echo $_['usage_relative'];?>%;">
|
||||||
<p id="quotatext"><?php echo $l->t('You have used <strong>%s</strong> of the available <strong>%s</strong>', array($_['usage'], $_['total_space']));?></p>
|
<p id="quotatext"><?php echo $l->t('You have used <strong>%s</strong> of the available <strong>%s</strong>',
|
||||||
|
array($_['usage'], $_['total_space']));?></p>
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +38,8 @@ if($_['passwordChangeSupported']) {
|
||||||
<div id="passwordchanged"><?php echo $l->t('Your password was changed');?></div>
|
<div id="passwordchanged"><?php echo $l->t('Your password was changed');?></div>
|
||||||
<div id="passworderror"><?php echo $l->t('Unable to change your password');?></div>
|
<div id="passworderror"><?php echo $l->t('Unable to change your password');?></div>
|
||||||
<input type="password" id="pass1" name="oldpassword" placeholder="<?php echo $l->t('Current password');?>" />
|
<input type="password" id="pass1" name="oldpassword" placeholder="<?php echo $l->t('Current password');?>" />
|
||||||
<input type="password" id="pass2" name="password" placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#personal-show" />
|
<input type="password" id="pass2" name="password"
|
||||||
|
placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#personal-show" />
|
||||||
<input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label>
|
<input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label>
|
||||||
<input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" />
|
<input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
@ -66,7 +68,8 @@ if($_['displayNameChangeSupported']) {
|
||||||
<form id="lostpassword">
|
<form id="lostpassword">
|
||||||
<fieldset class="personalblock">
|
<fieldset class="personalblock">
|
||||||
<legend><strong><?php echo $l->t('Email');?></strong></legend>
|
<legend><strong><?php echo $l->t('Email');?></strong></legend>
|
||||||
<input type="text" name="email" id="email" value="<?php echo $_['email']; ?>" placeholder="<?php echo $l->t('Your email address');?>" /><span class="msg"></span><br />
|
<input type="text" name="email" id="email" value="<?php echo $_['email']; ?>"
|
||||||
|
placeholder="<?php echo $l->t('Your email address');?>" /><span class="msg"></span><br />
|
||||||
<em><?php echo $l->t('Fill in an email address to enable password recovery');?></em>
|
<em><?php echo $l->t('Fill in an email address to enable password recovery');?></em>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
@ -79,7 +82,8 @@ if($_['displayNameChangeSupported']) {
|
||||||
<option value="<?php echo $language['code'];?>"><?php echo $language['name'];?></option>
|
<option value="<?php echo $language['code'];?>"><?php echo $language['name'];?></option>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
</select>
|
</select>
|
||||||
<a href="https://www.transifex.net/projects/p/owncloud/team/<?php echo $_['languages'][0]['code'];?>/" target="_blank"><em><?php echo $l->t('Help translate');?></em></a>
|
<a href="https://www.transifex.net/projects/p/owncloud/team/<?php echo $_['languages'][0]['code'];?>/"
|
||||||
|
target="_blank"><em><?php echo $l->t('Help translate');?></em></a>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -96,8 +100,12 @@ if($_['displayNameChangeSupported']) {
|
||||||
|
|
||||||
<fieldset class="personalblock">
|
<fieldset class="personalblock">
|
||||||
<legend><strong><?php echo $l->t('Version');?></strong></legend>
|
<legend><strong><?php echo $l->t('Version');?></strong></legend>
|
||||||
<strong>ownCloud</strong> <?php echo(OC_Util::getVersionString()); ?> <?php echo(OC_Util::getEditionString()); ?> <br />
|
<strong>ownCloud</strong> <?php echo(OC_Util::getVersionString()); ?>
|
||||||
<?php echo $l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.'); ?>
|
<?php echo(OC_Util::getEditionString()); ?> <br />
|
||||||
|
<?php echo $l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>,'
|
||||||
|
.' the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed'
|
||||||
|
.' under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr'
|
||||||
|
.' title="Affero General Public License">AGPL</abbr></a>.'); ?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,14 @@ foreach($quotaPreset as &$preset) {
|
||||||
$quotaPreset=array_diff($quotaPreset, array('default', 'none'));
|
$quotaPreset=array_diff($quotaPreset, array('default', 'none'));
|
||||||
|
|
||||||
$defaultQuota=OC_Appconfig::getValue('files', 'default_quota', 'none');
|
$defaultQuota=OC_Appconfig::getValue('files', 'default_quota', 'none');
|
||||||
$defaultQuotaIsUserDefined=array_search($defaultQuota, $quotaPreset)===false && array_search($defaultQuota, array('none', 'default'))===false;
|
$defaultQuotaIsUserDefined=array_search($defaultQuota, $quotaPreset)===false
|
||||||
|
&& array_search($defaultQuota, array('none', 'default'))===false;
|
||||||
|
|
||||||
// load users and quota
|
// load users and quota
|
||||||
foreach($accessibleusers as $uid => $displayName) {
|
foreach($accessibleusers as $uid => $displayName) {
|
||||||
$quota=OC_Preferences::getValue($uid, 'files', 'quota', 'default');
|
$quota=OC_Preferences::getValue($uid, 'files', 'quota', 'default');
|
||||||
$isQuotaUserDefined=array_search($quota, $quotaPreset)===false && array_search($quota, array('none', 'default'))===false;
|
$isQuotaUserDefined=array_search($quota, $quotaPreset)===false
|
||||||
|
&& array_search($quota, array('none', 'default'))===false;
|
||||||
|
|
||||||
$name = $displayName;
|
$name = $displayName;
|
||||||
if ( $displayName != $uid ) {
|
if ( $displayName != $uid ) {
|
||||||
|
|
Loading…
Reference in New Issue