Skip to content

Commit

Permalink
Added spaces between brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Jan 11, 2019
1 parent cbd8566 commit da826f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion portal/forms/aimmo_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def clean(self):
]

if name in playable_games_names:
raise ValidationError("Sorry, a game with that name already exists.")
raise ValidationError("Sorry, a game with this name already exists.")

return self.cleaned_data

Expand Down
16 changes: 8 additions & 8 deletions portal/static/portal/js/join_create_game_toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ $(document).ready(function() {
var create_new_game_button = $('#create_new_game_button');
var back_button = $('#back_button');

if(game_name_input.val()){
if(game_name_input.val()) {
showCreateGameForm();
game_name_input.val("");
showInputError("Sorry, a game with this name already exists...");
}

create_new_game_button.click(function(){
create_new_game_button.click(function() {
showCreateGameForm();
});

back_button.click(function(){
back_button.click(function() {
showJoinGameForm();
});

create_game_button.click(function(){
if(!game_name_input.val() || game_name_input.val() === ""){
create_game_button.click(function() {
if(!game_name_input.val() || game_name_input.val() === "") {
showInputError("Give your new game a name...");
}
else {
Expand All @@ -73,17 +73,17 @@ $(document).ready(function() {
game_name_input.removeClass('input-invalid');
});

function showCreateGameForm(){
function showCreateGameForm() {
join_game_section.addClass("hidden");
create_game_section.removeClass("hidden");
}

function showJoinGameForm(){
function showJoinGameForm() {
create_game_section.addClass("hidden");
join_game_section.removeClass("hidden");
}

function showInputError(error_message){
function showInputError(error_message) {
game_name_input.attr("placeholder", error_message);
game_name_input.addClass('input-invalid');
}
Expand Down
4 changes: 2 additions & 2 deletions portal/templates/portal/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

{% block google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function() {
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
Expand All @@ -59,7 +59,7 @@
ga('create', 'UA-49883146-1', 'auto');
ga('send', 'pageview');

function send_event(category_name, action, label_name){
function send_event(category_name, action, label_name) {
ga('send', {
hitType: 'event',
eventCategory: category_name,
Expand Down

0 comments on commit da826f4

Please sign in to comment.