Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,57 @@
<html>
<head>
<title>BroncoBoard</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
</head>

<body>
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<span class="glyphicon glyphicon-lock"></span> Login</div>
<div class="panel-body">
<form class="form-horizontal" role="form" action="/login">
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">
Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email" required>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">
Password</label>
<div class="col-sm-9">
<input type="password" class="form-control" id="inputPassword3" placeholder="Password" required>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox"/>
Remember me
</label>
</div>
</div>
</div>
<div class="form-group last">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-success btn-sm">Sign in</button>
</div>
</div>
</form>
</div>
<div class="panel-footer">Not Registered? <a href="/help">Register here</a></div>
</div>
</div>
</div>
</div>
</body>
</html>

Large diffs are not rendered by default.

@@ -0,0 +1,83 @@

function healthCheck() {
$.ajax(
{
type : "GET",
url : "/cs480/ping",
data : {
},
success : function(result) {
$('#status').text(result);
},
error: function (jqXHR, exception) {
$('#status').text("Failed to get the status");
}
});
}


function deleteUser(userId) {
$.ajax(
{
type : "DELETE",
url : "/cs480/user/" + userId,
data : {
},
success : function(result) {
location.reload();
},
error: function (jqXHR, exception) {
alert("Failed to delete the photo.");
}
});
}

function addUser() {

var userId = $('#input_id').val();
var userName = $('#input_name').val();
var userMajor = $('#input_major').val();

if (userId) {
$.ajax(
{
type : "POST",
url : "/cs480/user/" + userId,
data : {
"name" : userName,
"major" : userMajor
},
success : function(result) {
location.reload();
},
error: function (jqXHR, exception) {
alert("Failed to add the user. Please check the inputs.");
}
});
} else {
alert("Invalid user Id");
}
}

function getUser(userId) {
var userId = $('#query_id').val();
if (userId) {
$.ajax(
{
type : "GET",
url : "/cs480/user/" + userId,
data : {
},
success : function(result) {
$('#result_id').text(result.id);
$('#result_name').text(result.name);
$('#result_major').text(result.major);
},
error: function (jqXHR, exception) {
alert("Failed to get the user.");
}
});
} else {
alert("Invalid user Id");
}
}
@@ -0,0 +1,15 @@
<html>
<head>
<title>BroncoBoard</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link href="../static/css/bootstrap.min.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
</head>

<body>
<div class="container">
<h1>Sample</h1>
</div>
</body>
</html>
Binary file not shown.
@@ -0,0 +1,15 @@
package edu.csupomona.cs480;
//This manages what certain pages will be used when we try to go to that page
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {

@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/login").setViewName("login");
}

}
@@ -0,0 +1,57 @@
<html>
<head>
<title>BroncoBoard</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
</head>

<body>
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<span class="glyphicon glyphicon-lock"></span> Login</div>
<div class="panel-body">
<form class="form-horizontal" role="form" action="/login">
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">
Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email" required>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">
Password</label>
<div class="col-sm-9">
<input type="password" class="form-control" id="inputPassword3" placeholder="Password" required>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox"/>
Remember me
</label>
</div>
</div>
</div>
<div class="form-group last">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-success btn-sm">Sign in</button>
</div>
</div>
</form>
</div>
<div class="panel-footer">Not Registered? <a href="/registration">Register here</a></div>
</div>
</div>
</div>
</div>
</body>
</html>
@@ -0,0 +1,27 @@
<html xmlns:th="http://www.thymeleaf.org" xmlns:tiles="http://www.thymeleaf.org">
<head>
<title tiles:fragment="title">Messages : Create</title>
</head>
<body>
<div tiles:fragment="content">
<form name="f" th:action="@{/login}" method="post">
<fieldset>
<legend>Please Login</legend>
<div th:if="${param.error}" class="alert alert-error">
Invalid username and password.
</div>
<div th:if="${param.logout}" class="alert alert-success">
You have been logged out.
</div>
<label for="username">Username</label>
<input type="text" id="username" name="username"/>
<label for="password">Password</label>
<input type="password" id="password" name="password"/>
<div class="form-actions">
<button type="submit" class="btn">Log in</button>
</div>
</fieldset>
</form>
</div>
</body>
</html>
@@ -0,0 +1,15 @@
<html>
<head>
<title>BroncoBoard</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link href="../static/css/bootstrap.min.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
</head>

<body>
<div class="container">
<h1>success</h1>
</div>
</body>
</html>