mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-26 02:47:47 +02:00
fix bugs
This commit is contained in:
+14
-1
@@ -92,7 +92,9 @@
|
||||
<small class="form-text text-muted">When the anonymous repository.</small>
|
||||
<input class="form-control .form-control-lg" type="date" name="expiration_date" id="date" value="{% if repo.expiration_date %}{{ repo.expiration_date.date().isoformat() }}{% endif %}" />
|
||||
</div>
|
||||
<button type="submit" class="white_border">Submit</button>`
|
||||
<button id="submit" type="submit" class="white_border">Submit</button>`
|
||||
|
||||
<button id="delete" class="white_border" style="color: red;">Delete</button>`
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -246,6 +248,17 @@
|
||||
$('.main-options').show();
|
||||
return false;
|
||||
})
|
||||
$('#delete').on('click', e => {
|
||||
e.preventDefault();
|
||||
if (confirm("Are you sure you want to delete the repository?")) {
|
||||
$('#expiration')[0].value = 'remove';
|
||||
var date = new Date();
|
||||
date.setDate(date.getDate() - 1);
|
||||
$('#date')[0].value = date.toISOString().split('T')[0];
|
||||
$('#submit').click();
|
||||
}
|
||||
return false;
|
||||
})
|
||||
$('#edit-button').on('click', e=> {
|
||||
e.preventDefault();
|
||||
$('.view').removeClass('active')
|
||||
|
||||
Reference in New Issue
Block a user