Skip to content

show input fields if they are not empty but disable them in global scale mode - #5287

Merged
nickvergessen merged 2 commits into
masterfrom
personal-page-gs-mode
Jun 8, 2017
Merged

show input fields if they are not empty but disable them in global scale mode#5287
nickvergessen merged 2 commits into
masterfrom
personal-page-gs-mode

Conversation

@schiessle

Copy link
Copy Markdown
Member

In global scale mode we don't allow to enter additional user information used for the lookup sever but we should still show the user existing data stored.

fix#5275

Steps to test:

  1. Install Nextcloud
  2. set 'gs.enabled' => true in the config.php
  3. look at the personal settings page. You should only see the email and display name input field
  4. set 'gs.enabled' => false in the config.php
  5. reload the personal page
  6. add some values to some of the additional input fields
  7. set 'gs.enabled' => true in the config.php
  8. reload the personal page -> you should see the additional input fields which have a value but you should not be able to change it

@mention-bot

Copy link
Copy Markdown

@schiessle, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @ChristophWurst and @icewind1991 to be potential reviewers.

Comment threadsettings/templates/personal.php Outdated
</h2>
<input type="tel" id="phone" name="phone"
value="<?php p($_['phone']) ?>"
<input type="tel" id="phone" name="phone" <?php if(!$_['lookupServerUploadEnabled']) p('disabled="1"'); ?>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean print_unescaped, or do you want disabled=&quot;1&quot;

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works also this way... 😉 But I will fix it...

…ale mode
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
@schiessle
schiessleforce-pushed the personal-page-gs-mode branch from 3271c3d to f5731e1CompareJune 7, 2017 15:13
@codecov

codecovBot commented Jun 7, 2017

Copy link
Copy Markdown

Codecov Report

Merging #5287 into master will increase coverage by <.01%.
The diff coverage is 0%.

@@ Coverage Diff @@## master #5287 +/- ##
============================================
+ Coverage 54.16% 54.16% +<.01% 
Complexity 22311 22311 ============================================
Files 1380 1380 Lines 85406 85406 Branches 1321 1321 ============================================
+ Hits 46257 46260 +3 + Misses 39149 39146 -3
Impacted FilesCoverage ΔComplexity Δ
settings/templates/personal.php0% <0%> (ø)0 <0> (ø)⬇️
lib/private/Server.php93.27% <0%> (-0.15%)120% <0%> (ø)
lib/private/Security/CertificateManager.php91.83% <0%> (+1.02%)39% <0%> (ø)⬇️
lib/private/Files/Cache/Propagator.php96.2% <0%> (+1.26%)16% <0%> (ø)⬇️
apps/comments/lib/EventHandler.php87.5% <0%> (+8.33%)7% <0%> (ø)⬇️

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not be a disabled input field, but only text. The same as it if, once you set allow_user_to_change_display_name to false in the config.php:

bildschirmfoto 2017-06-07 um 10 25 40

@schiessle

Copy link
Copy Markdown
MemberAuthor

@MorrisJobke now they should all look the same

…ut fields
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
@schiessle
schiessleforce-pushed the personal-page-gs-mode branch from 0735d06 to 1ad4268CompareJune 7, 2017 16:08

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@nickvergessen
nickvergessen merged commit 3384c5f into masterJun 8, 2017
@nickvergessen
nickvergessen deleted the personal-page-gs-mode branch June 8, 2017 13:04
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show personal details even if they are not updatable

4 participants

@schiessle@mention-bot@nickvergessen@MorrisJobke