RandomSec/extensions/wikidata/module/scripts/dialogs/owner-only-consumer-login-dialog.html
Lu Liu 335e81a26c OAuth support for the Wikidata extension (#2661)
Closes #1612 

Merges @afkbrb work to finish @wetneb protype, including:
* adding support for OAuth in addition to basic auth
* supporting registration of single user Wikidata OAuth consumers.
* adding extensive tests
* cleaning up the login dialog

This depends on the next release of the Wikidata Toolkit, but we're currently publishing our own snapshot that includes the necessary changes (thanks @wetneb!)

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
2020-06-18 23:51:22 -04:00

54 lines
2.7 KiB
HTML

<div class="dialog-frame" style="width: 800px;">
<div class="dialog-header" bind="dialogHeader"></div>
<div class="dialog-body" bind="dialogBody" style="position: relative; height: 240px">
<div class="wikidata-logo">
<a href="https://www.wikidata.org/" target="_blank">
<img src="extension/wikidata/images/wikidata.png" alt="Wikidata logo"/>
</a>
</div>
<div class="right-of-logo">
<p class="body-text" bind="explainLogIn"></p>
<p class="body-text" bind="explainOwnerOnlyConsumerWiki"></p>
<div class="wikibase-user-management-area">
<div class="wikibase-user-login" bind="loginArea">
<p bind="invalidCredentials" class="wikibase-invalid-credentials"></p>
<form bind="loginForm" class="wikibase-login-form" method="post">
<table>
<tr>
<td><label for="wb-consumer-token" bind="consumerTokenLabel"></label></td>
<td><input name="wb-consumer-token" id="wb-consumer-token" type="text" bind="consumerTokenInput"/></td>
</tr>
<tr>
<td><label for="wb-consumer-secret" bind="consumerSecretLabel"></label></td>
<td><input name="wb-consumer-secret" id="wb-consumer-secret" type="password" bind="consumerSecretInput"/></td>
</tr>
<tr>
<td><label for="wb-access-token" bind="accessTokenLabel"></label></td>
<td><input name="wb-access-token" id="wb-access-token" type="text" bind="accessTokenInput"/></td>
</tr>
<tr>
<td><label for="wb-access-secret" bind="accessSecretLabel"></label></td>
<td><input name="wb-access-secret" id="wb-access-secret" type="password" bind="accessSecretInput"/></td>
</tr>
<tr>
<td><input type="checkbox" name="remember-credentials" id="remember-credentials" bind="rememberCredentials"/></td>
<td>
<span><label for="remember-credentials"bind="rememberMe"></label></span>
<span><img src="extension/wikidata/images/Information.png" style="height: 0.8rem;" alt="information" bind="ownerOnlyConsumerRememberMeTitle"/></span>
</td>
</tr>
</table>
<div class="wikibase-login-buttons">
<button class="button cancel-button" type="button" bind="cancelButton"></button>
<button class="button button-primary" type="submit" bind="loginButton"></button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="dialog-footer wikibase-login-dialog-footer">
<span bind="explainPasswordLogin"></span>
</div>
</div>