Skip to content

Commit

Permalink
Correcting errors from moving views/Application/edit_basic.html to vi…
Browse files Browse the repository at this point in the history
…ews/User/profile.html
  • Loading branch information
fism88 committed May 1, 2012
1 parent 384a9a3 commit 746a665
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions app/controllers/Profiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static void updateBio(String bio){
profile.bio = "";

profile.save();
renderTemplate("Application/edit_basic.html", profile);
renderTemplate("Users/profile.html", profile);
}

public static void updateInformation(String birthday, String relationshipStatus, String gender, String interestedIn,
Expand All @@ -50,10 +50,12 @@ public static void updateInformation(String birthday, String relationshipStatus,
profile.gender = gender;
profile.interestedIn = interestedIn;
DateFormat anniversary_formatting = new SimpleDateFormat("MM/dd/yyyy");
try {
profile.anniversary = (Date) anniversary_formatting.parse(anniversary);
} catch (java.text.ParseException e) {
e.printStackTrace();
if(anniversary != null){
try {
profile.anniversary = (Date) anniversary_formatting.parse(anniversary);
} catch (java.text.ParseException e) {
e.printStackTrace();
}
}
// profile.relationshipStatus = relationshipStatus;

Expand All @@ -66,7 +68,7 @@ public static void updateInformation(String birthday, String relationshipStatus,

profile.political = political;
profile.save();
renderTemplate("Application/edit_basic.html", profile);
renderTemplate("Users/profile.html", profile);
}

public static void updateContactInfo(String phone, String address){
Expand All @@ -92,7 +94,7 @@ public static void updateContactInfo(String phone, String address){
profile.address = "";

profile.save();
renderTemplate("Application/edit_basic.html", profile);
renderTemplate("Users/profile.html", profile);
}

public static void updateWorkEdu(String edu, String work){
Expand Down Expand Up @@ -124,7 +126,7 @@ public static void updateWorkEdu(String edu, String work){
profile.work.add(employment);
*/
profile.save();
renderTemplate("Application/edit_basic.html", profile);
renderTemplate("Users/profile.html", profile);
}

public static void updateLiving(String hometown){
Expand All @@ -143,7 +145,7 @@ public static void updateLiving(String hometown){
profile.hometown = null;

profile.save();
renderTemplate("Application/edit_basic.html", profile);
renderTemplate("Users/profile.html", profile);
}

public static void updateQuote(String quotation){
Expand All @@ -156,6 +158,6 @@ public static void updateQuote(String quotation){
profile.quotes = "";

profile.save();
renderTemplate("Application/edit_basic.html", profile);
renderTemplate("Users/profile.html", profile);
}
}

0 comments on commit 746a665

Please sign in to comment.