2014-10-15 13:58:44 +04:00
|
|
|
<?php
|
2020-08-17 18:16:50 +03:00
|
|
|
/** @var array $_ */
|
|
|
|
/** @var \OCP\IL10N $l */
|
2018-01-03 14:03:26 +03:00
|
|
|
style('core', 'guest');
|
2018-06-11 15:15:03 +03:00
|
|
|
style('core', 'publicshareauth');
|
|
|
|
script('core', 'publicshareauth');
|
2014-10-15 13:58:44 +04:00
|
|
|
?>
|
|
|
|
<form method="post">
|
2017-06-29 17:35:39 +03:00
|
|
|
<fieldset class="warning">
|
2013-10-07 19:38:27 +04:00
|
|
|
<?php if (!isset($_['wrongpw'])): ?>
|
|
|
|
<div class="warning-info"><?php p($l->t('This share is password-protected')); ?></div>
|
|
|
|
<?php endif; ?>
|
2013-07-05 12:37:24 +04:00
|
|
|
<?php if (isset($_['wrongpw'])): ?>
|
2013-10-07 19:38:27 +04:00
|
|
|
<div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
|
2013-07-02 05:16:42 +04:00
|
|
|
<?php endif; ?>
|
2014-05-06 14:43:52 +04:00
|
|
|
<p>
|
2013-02-28 00:37:14 +04:00
|
|
|
<label for="password" class="infield"><?php p($l->t('Password')); ?></label>
|
2014-10-15 13:58:44 +04:00
|
|
|
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
|
2014-02-26 17:48:15 +04:00
|
|
|
<input type="password" name="password" id="password"
|
2014-05-06 14:43:52 +04:00
|
|
|
placeholder="<?php p($l->t('Password')); ?>" value=""
|
2017-10-25 09:23:42 +03:00
|
|
|
autocomplete="new-password" autocapitalize="off" autocorrect="off"
|
2014-02-26 17:48:15 +04:00
|
|
|
autofocus />
|
Add event to load additional scripts in the auth page for public shares
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>
2018-07-12 15:52:36 +03:00
|
|
|
<input type="hidden" name="sharingToken" value="<?php p($_['share']->getToken()) ?>" id="sharingToken">
|
2016-03-08 01:55:35 +03:00
|
|
|
<input type="submit" id="password-submit"
|
|
|
|
class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
|
2012-08-27 23:46:05 +04:00
|
|
|
</p>
|
|
|
|
</fieldset>
|
2013-03-05 01:11:57 +04:00
|
|
|
</form>
|