gray out button on click

This commit is contained in:
Tommy Parnell
2016-01-29 12:40:14 -05:00
parent 49a7023b80
commit 21c700f9e2

View File

@@ -2,11 +2,11 @@
@if(Model.Any()) @if(Model.Any())
{ {
@using(Html.BeginForm("AddStars", "Manage", FormMethod.Get)) @using(Html.BeginForm("AddStars", "Manage", FormMethod.Get, new { id = "formpost" }))
{ {
<div class="jumbotron"> <div class="jumbotron">
<h2>Star your Repos: <button type="submit" class="btn btn-success" value="Star"><span class="octicon octicon-star"></span>Star My Repos</button></h2> <h2>Star your Repos: <button type="submit" class="btn btn-success starbutton" value="Star"><span class="octicon octicon-star"></span>Star My Repos</button></h2>
</div> </div>
} }
@@ -17,4 +17,12 @@ else
<h2>Congrats! You have stared all your repos</h2> <h2>Congrats! You have stared all your repos</h2>
</div> </div>
}
@section scripts{
<script type="text/javascript">
$('#formpost').on('submit', function () {
$('.btn').prop('disabled', true);
})
</script>
} }