github.com/marinho/drone@v0.2.1-0.20140504195434-d3ba962e89a7/pkg/template/pages/team_profile.html (about)

     1  {{ define "title" }}{{.Team.Name}} ยท Profile{{ end }}
     2  
     3  {{ define "content" }}
     4  
     5  	<div class="subhead">
     6  		<div class="container">
     7  			<ul class="nav nav-tabs pull-right">
     8  				<li>
     9  					<a href="/dashboard/team/{{.Team.Slug}}">Dashboard</a>
    10  				</li>
    11  				<li class="active">
    12  					<a href="/account/team/{{.Team.Slug}}/profile">Team Settings</a>
    13  				</li>
    14  			</ul> <!-- ./nav -->
    15  			<h1 class="user">
    16  				<img src="{{.Team.Image}}">
    17  				<span>{{.Team.Name}}</span>
    18  			</h1>
    19  		</div><!-- ./container -->
    20  	</div><!-- ./subhead -->
    21  
    22  
    23  	<div class="container">
    24  		<div class="row">
    25  
    26  			<div class="col-xs-3">
    27  				<ul class="nav nav-pills nav-stacked">
    28  					<li class="active"><a href="/account/team/{{.Team.Slug}}/profile">Profile</a></li>
    29  					<li><a href="/account/team/{{.Team.Slug}}/members">Members</a></li>
    30  					<li><a href="/account/team/{{.Team.Slug}}/delete">Delete</a></li>
    31  				</ul>
    32  			</div><!-- ./col-xs-3 -->
    33  
    34  			<div class="col-xs-9" role="main" style="padding-left:20px;">
    35  				<div class="alert">Manage your team's Profile.</div>
    36  
    37  					<div class="col-xs-5">
    38  						<form action="/account/team/{{.Team.Slug}}/profile" method="POST" role="form">
    39  							<label>Team Name:</label>
    40  							<div>
    41  								<input class="form-control" type="text" name="name" value="{{.Team.Name}}" />
    42  							</div>
    43  							<label>Gravatar Email Address:</label>
    44  							<div>
    45  								<input class="form-control" type="text" name="email" value="{{.Team.Email}}" />
    46  							</div>
    47  							<div class="alert alert-success hide" id="successAlert"></div>
    48  							<div class="alert alert-error hide" id="failureAlert"></div>
    49  							<div class="form-actions">
    50  								<input class="btn btn-primary" id="submitButton" type="submit" value="Save" data-loading-text="Saving .." />
    51  								<a class="btn btn-default" href="/account/team/{{.Team.Slug}}/profile">Cancel</a>
    52  							</div>
    53  						</form>
    54  					</div>
    55  					<div class="col-xs-7">
    56  						<a class="avatar-link" href="https://gravatar.com/" target="_blank">
    57  							<img src="{{.Team.ImageLarge}}" />
    58  							<span>edit gravatar</span>
    59  						</a>
    60  					</div>
    61  
    62  			</div><!-- ./col-xs-9 -->
    63  		</div><!-- ./row -->
    64  
    65  	</div><!-- ./container -->
    66  {{ end }}
    67  
    68  {{ define "script" }}
    69  	<script>
    70  				document.forms[0].onsubmit = function(event) {
    71  						$("#successAlert").hide();
    72  						$("#failureAlert").hide();
    73  						$('#submitButton').button('loading');
    74  
    75  						var form = event.target;
    76  						var formData = new FormData(form);
    77  						xhr = new XMLHttpRequest();
    78  						xhr.open('POST', form.action);
    79  						xhr.onload = function() {
    80  								if (this.status == 200) {
    81  										$("#successAlert").text("The Team profile was successfully updated");
    82  										$("#successAlert").show().removeClass("hide");
    83  										$('#submitButton').button('reset')
    84  								} else {
    85  										$("#failureAlert").text("Failed to update the Team profile.");
    86  										$("#failureAlert").show().removeClass("hide");
    87  										$('#submitButton').button('reset');
    88  								};
    89  						};
    90  						xhr.send(formData);
    91  						return false;
    92  				}
    93  	</script>
    94  {{ end }}