mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-24 03:10:47 +02:00
refactor: migrate the frontend from AngularJS to Vue 3
This commit is contained in:
@@ -7,43 +7,21 @@
|
||||
</p>
|
||||
<div class="paper-settings-main claim-form">
|
||||
<p class="paper-section-copy">Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.</p>
|
||||
<form class="form needs-validation" name="claimForm" novalidate ng-submit="claim()">
|
||||
<form class="form needs-validation" name="claimForm" novalidate v-form="viewState" @submit.prevent="submitForm($event, () => { claim() })">
|
||||
<div class="form-group">
|
||||
<label class="paper-field-label" for="repoUrl">GitHub repository URL</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="repoUrl"
|
||||
id="repoUrl"
|
||||
required
|
||||
ng-class="{'is-invalid': claimForm.repoUrl.$invalid && (claimForm.repoUrl.$touched || claimForm.$submitted)}"
|
||||
ng-model="repoUrl"
|
||||
/>
|
||||
<div class="invalid-feedback" ng-show="claimForm.repoUrl.$error.not_found">
|
||||
<input type="text" class="form-control" name="repoUrl" id="repoUrl" required v-field="{ state: viewState, set: value => { repoUrl = value }, value: repoUrl, form: "claimForm", options: {} }" :class="{'is-invalid': claimForm?.repoUrl?.invalid && (claimForm?.repoUrl?.touched || claimForm?.submitted)}">
|
||||
<div class="invalid-feedback" v-show="claimForm?.repoUrl?.errors?.not_found">
|
||||
No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub.
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="paper-field-label" for="repoId">Anonymized repository ID</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="repoId"
|
||||
id="repoId"
|
||||
required
|
||||
ng-model="repoId"
|
||||
ng-class="{'is-invalid': claimForm.repoId.$invalid && (claimForm.repoId.$touched || claimForm.$submitted)}"
|
||||
/>
|
||||
<small id="idHelp" class="form-text text-muted"
|
||||
>The ID is the last part of the anonymized URL: <code>anonymous.4open.science/r/<ID></code>.</small
|
||||
>
|
||||
<input type="text" class="form-control" name="repoId" id="repoId" required v-field="{ state: viewState, set: value => { repoId = value }, value: repoId, form: "claimForm", options: {} }" :class="{'is-invalid': claimForm?.repoId?.invalid && (claimForm?.repoId?.touched || claimForm?.submitted)}">
|
||||
<small id="idHelp" class="form-text text-muted">The ID is the last part of the anonymized URL: <code>anonymous.4open.science/r/<ID></code>.</small>
|
||||
</div>
|
||||
|
||||
<button
|
||||
id="submit"
|
||||
type="submit"
|
||||
class="btn btn-ink"
|
||||
>
|
||||
<button id="submit" type="submit" class="btn btn-ink">
|
||||
Claim anonymization
|
||||
</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user