github.com/marinho/drone@v0.2.1-0.20140504195434-d3ba962e89a7/pkg/template/pages/repo_delete.html (about) 1 {{ define "title" }}{{.Repo.Slug}} ยท Delete{{ end }} 2 3 {{ define "content" }} 4 5 <div class="subhead"> 6 <div class="container"> 7 <ul class="nav nav-tabs pull-right"> 8 <li><a href="/{{.Repo.Slug}}">Commits</a></li> 9 <li class="active"><a href="/{{.Repo.Slug}}/settings">Settings</a></li> 10 </ul> <!-- ./nav --> 11 <h1> 12 <span>{{.Repo.Name}}</span> 13 <small>{{.Repo.Owner}}</small> 14 </h1> 15 </div><!-- ./container --> 16 </div><!-- ./subhead --> 17 18 19 <div class="container"> 20 <div class="row"> 21 <div class="col-xs-3"> 22 <ul class="nav nav-pills nav-stacked"> 23 <li><a href="/{{.Repo.Slug}}/settings">Repository</a></li> 24 <li><a href="/{{.Repo.Slug}}/params">Params</a></li> 25 <li><a href="/{{.Repo.Slug}}/keys">Key Pairs</a></li> 26 <li><a href="/{{.Repo.Slug}}/badges">Badges</a></li> 27 <li class="active"><a href="/{{.Repo.Slug}}/delete">Delete</a></li> 28 </ul> 29 </div><!-- ./col-xs-3 --> 30 31 <div class="col-xs-9" role="main"> 32 <div class="alert"> 33 <span>Delete this repository.</span> 34 <strong>Warning:</strong> 35 <span>this action cannot be undone.</span> 36 </div> 37 38 <form method="POST" role="form"> 39 <label>Enter your password to confim:</label> 40 <div> 41 <input class="form-control" type="password" name="password" value="" /> 42 </div> 43 <div class="alert alert-error hide" id="failureAlert"></div> 44 <div class="form-actions"> 45 <input class="btn btn-danger" id="submitButton" type="submit" value="Delete Repository" /> 46 <a class="btn btn-default" href="/{{.Repo.Slug}}/settings">Cancel</a> 47 </div> 48 </form> 49 </div><!-- ./col-xs-9 --> 50 </div><!-- ./row --> 51 </div><!-- ./container --> 52 {{ end }} 53 54 {{ define "script" }} 55 <script> 56 document.forms[0].onsubmit = function(event) { 57 58 $("#failureAlert").hide(); 59 $('#submitButton').button('loading'); 60 61 var form = event.target 62 var formData = new FormData(form); 63 xhr = new XMLHttpRequest(); 64 xhr.open('POST', form.action); 65 xhr.onload = function() { 66 if (this.status == 400) { 67 $("#failureAlert").text("The password you entered was incorrect."); 68 $("#failureAlert").show().removeClass("hide"); 69 $('#submitButton').button('reset') 70 } else { 71 window.location.href = "/dashboard"; 72 } 73 }; 74 xhr.send(formData); 75 return false; 76 } 77 </script> 78 {{ end }}