<?php
	/** @var $_ array */
	/** @var $l \OCP\IL10N */
	style('files_sharing', 'authenticate');
	script('files_sharing', 'authenticate'); 
?>
<form method="post">
	<fieldset class="warning">
		<?php if (!isset($_['wrongpw'])): ?>
			<div class="warning-info"><?php p($l->t('This share is password-protected')); ?></div>
		<?php endif; ?>
		<?php if (isset($_['wrongpw'])): ?>
			<div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
		<?php endif; ?>
		<p>
			<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" id="password-submit" 
				class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
		</p>
	</fieldset>
</form>

<?php
	/** @var $_ array */
	/** @var $l \OCP\IL10N */
	style('files_sharing', 'authenticate');
	script('files_sharing', 'authenticate'); 
?>
<form method="post">
	<fieldset class="warning">
		<?php if (!isset($_['wrongpw'])): ?>
			<div class="warning-info"><?php p($l->t('This share is password-protected')); ?></div>
		<?php endif; ?>
		<?php if (isset($_['wrongpw'])): ?>
			<div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
		<?php endif; ?>
		<p>
			<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="new-password" autocapitalize="off" autocorrect="off"
				autofocus />
			<input type="submit" id="password-submit" 
				class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
		</p>
	</fieldset>
</form>

Use new-password as autocomplete on share auth page
Use new-password as autocomplete on share auth page

Fixes #6821

This makes sure that (supported) browsers will not prefill the password
field if a user has a password saved for that nextcloud.

Signed-off-by: Roeland Jago Douma <982d370f7dc34a05b4abe8788f899578d515262d@famdouma.nl>
