jorgearanda / fish

A fish banks simulator to conduct environmental psychology studies
MIT License
5 stars 5 forks source link

[Do not merge] Experimenter update feature #171

Closed btruhand closed 9 years ago

btruhand commented 9 years ago

To do

btruhand commented 9 years ago

Hi Jorge,

I was wondering how you'd like the front end for the experimenters to update their data to be like

jorgearanda commented 9 years ago

Let's add a button, "Change my User Profile", at the end of the experimenter's dashboard page. The button takes the experimenter into a different page, in which they get a form to change their profile information.

btruhand commented 9 years ago

After they submit the form, where will the users be taken to?

jorgearanda commented 9 years ago

Back to the dashboard

btruhand commented 9 years ago

So I've added the front end so that experimenters can update their data. Tell me what you think of it

Also I was wondering what should happen in the case of the update not going smoothly i.e it couldn't update their data probably. Should it stay in the same page indicating that there was some kind of error? Or should it go back to the dashboard indicating that there was some kind of error (and if it does the latter should the users be notified if the update is a success or not)?

jorgearanda commented 9 years ago

In the case of error, we should notify the user on the same editing screen. We should always offer an option to Cancel and go back to the dashboard. And thanks for the changes--I'll take a look at them later!

jorgearanda commented 9 years ago

Nice, Btara, thanks! A couple of minor things: could you please put the button at the end of the dashboard, rather than at the beginning? It should be a rarely used feature. And could you add a Cancel button on the new page?

btruhand commented 9 years ago

I've moved the button at the end of the dashboard and I've added a cancel button to the new page. I've done some error handling in the server side (in case people turn off javascript on the client side), though I've only handled the case when none of the fields are filled and verifying email format so that it looks like a legit email (though not checking the domain).

I only added an alert box for handling the errors and a general error message. Tell me if you want me to handle more specific cases and output more specific error message for each kind

jorgearanda commented 9 years ago

Thanks Btara--I'll take a look at this tomorrow.

jorgearanda commented 9 years ago

It's getting close, Btara, thanks for your work!

btruhand commented 9 years ago

I've done what you asked (or should have). Check out how it is now Jorge. I also separated the alert messages depending on the type of error now

jorgearanda commented 9 years ago

Thanks, Btara!

jorgearanda commented 9 years ago

BTW, Btara, please check my latest commit—moved some stuff around.