-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Editing of reservation questions #153
Comments
I think it might not be too hard to re-answer/redo the questions, but pre-filling with previous answers looks much more challenging |
Would it be possible to make an AJAX (or other) request to the API to get the reservation question data (since you'll have the ID)? That comes back in the same format the form expects, so that would be a convenient way to get it, but I'm not sure if the API functions (or the Python code that power them) are available from that part of the web interface. |
I can do the reset part and have a link on the reservation details to reset/redo the questions. It would replace previous answers, and since this seems to be what users are doing anyway, it would at least prevent the whole cancelling/recreating reservations. I could probably do that for 4.6.0 which is to be released this week. At some later time I could look at the rest. I would also accept a PR if you are willing to take a crack at it. Getting the user inputs is one piece of it, which I think I could figure out, but then there is the part where the questions need to be rendered with the initial data, which is more challenging especially with group questions that would need to be rendered as many times as they were added previously. |
Following up on Josh's suggestion. For me it's often just one part of the information that needs to be changed or updated. So I'd like if it would pre-fill with anything that was there. I see the struggle on how to render the questions/answers. As a user I'd be ok with viewing or editing something that's in more of a 'raw' format that the record gets stored as (.json, .md, etc). If the record's already there, it's more about not removing some of the formatting. I don't know if that's along the idea of the server side editing you'd mentioned. |
Thanks, I totally understand, and I did think about that solution as well. |
I agree leaving users to mess with raw json data is probably not great for a variety of reasons, but may be a good short term solution since it doesn't require an additional rendering step. Could the validation be done before overwriting? I see this in a cycle of 'initiate changes'->'make copy of original'-> 'modify copy'->'validate copy'->'replace original with copy'. It sounds like validation is already part of the initial submission, could it just be redone? |
That's the problem, the validation is only handled client side with input patterns and input types. |
I just want to add that this feature could be used for editing post usage questions as well, which I have received requests in the past about implementing. |
This is kind of a follow-on of #152 based off a conversation I was having with one of our users. Since we make heavy use of the "reservation question" feature, it can be a bit of a nuisance for people to have to cancel and recreate a reservation if they want to make a change to their answers for the questions (e.g. they're actually going to look at a different sample than they originally thought or something).
Would it be super hard to implement a similar "update" button for the reservation questions? Something like the following mock up?
Where if you clicked on the "Edit answers" button, you'd get the same reservation question form, but pre-filled with your previous answers? That seems like it could re-use a lot of existing functionality without too much trouble, but I'm not overly familiar with this part of the code, so I'm not sure how involved of a change I'm requesting 😅
The text was updated successfully, but these errors were encountered: