96108ab858
Before the public share authentication page is rendered now an event to load additional scripts is dispatched. Thanks to this any app can load its own scripts that, when run on the browser, adjust as needed the page generated by the server. Note, however, that during the handling of the event apps are only able to add scripts or styles to be loaded; they can not render arbitrary content on the page, or change how the content is rendered by the original template; all those changes have to be done by the scripts at run-time. This implies that the scripts of the apps can use only those parameters, like the token of the share, added to the page when it is generated by the "publicshareauth" template. Due to this, and given that the event is being introduced to be used by Talk to inject the UI needed to request the password for a share, the token of the share is now provided in the generated page, just like done in the public share page. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
28 lines
1.1 KiB
PHP
28 lines
1.1 KiB
PHP
<?php
|
|
/** @var $_ array */
|
|
/** @var $l \OCP\IL10N */
|
|
style('core', 'guest');
|
|
style('core', 'publicshareauth');
|
|
script('core', 'publicshareauth');
|
|
?>
|
|
<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="hidden" name="sharingToken" value="<?php p($_['share']->getToken()) ?>" id="sharingToken">
|
|
<input type="submit" id="password-submit"
|
|
class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
|
|
</p>
|
|
</fieldset>
|
|
</form>
|