Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply new auth form design #846

Merged
merged 3 commits into from
Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ config = {
'phpunit': {
'reducedDatabases' : {
'phpVersions': [
'7.2',
'7.3',
'7.4',
],
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Media gallery that adds image viewing capabilities to files view and public link
<bugs>https://github.com/owncloud/gallery/issues</bugs>
<repository type="git">https://github.com/owncloud/gallery.git</repository>
<dependencies>
<owncloud min-version="10.2" max-version="10"/>
<owncloud min-version="10.8" max-version="10"/>
</dependencies>
<default_enable />
</info>
9 changes: 6 additions & 3 deletions css/authenticate.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#password {
width: 190px !important;
padding: 10px;
margin: 6px;
margin: 6px;
}

input[type='submit'] {
width: 45px;
height: 45px;
margin: 6px;
margin: 6px;
}

#body-login input[type='submit'] {
Expand All @@ -19,3 +18,7 @@ input[type='submit'] {
fieldset > p {
position: relative;
}

form #password-protected-share legend {
margin-bottom: 15px;
}
43 changes: 28 additions & 15 deletions templates/authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,37 @@
*/
style('gallery', 'authenticate');
?>
<form method="post">
<fieldset>
<?php if (!isset($_['password'])): ?>
<div
class="warning-info"><?php p($l->t('This share is password-protected')); ?></div>
<?php endif; ?>
<?php if (isset($_['password'])): ?>
<div
class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
<?php endif; ?>
<form method="post" autocapitalize="none">
<fieldset id="password-protected-share">
<legend>
<?php if (!isset($_['password'])): ?>
<div class="warning-info"><?php p($l->t('This share is password-protected')); ?></></div>
<?php endif; ?>
</legend>
<p>
<label for="password" class="infield"><?php p($l->t('Password')); ?></label>
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>"/>
<label for="password"
class="infield"><?php p($l->t('Password')); ?></label>
<input type="hidden" name="requesttoken"
value="<?php p($_['requesttoken']) ?>"/>
<input type="password" name="password" id="password"
placeholder="<?php p($l->t('Password')); ?>" value=""
autocomplete="off" autocapitalize="off" autocorrect="off"
autofocus/>
<input type="submit" value="" class="svg icon-confirm input-button-inline"/>
autocomplete="off" autocorrect="off" autofocus/>
</p>
</fieldset>

<div class="submit-wrap">
<?php if (isset($_['password'])): ?>
<div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
<?php endif; ?>

<button type="submit" id="password-submit">
<span><?php p($l->t('Proceed')); ?></span>
<div class="loading-spinner">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</button>
</div>
</form>