-
Notifications
You must be signed in to change notification settings - Fork 479
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
Add confirm delete progress admin page #42170
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
%h1 Delete User Progress | ||
|
||
%p You are about to <strong>permanently</strong> delete progress (level status and source code) for: | ||
|
||
= form_tag(delete_progress_path, method: :post) do | ||
=hidden_field_tag :user_id, @target_user.id | ||
User: | ||
%strong= @target_user.username | ||
%br | ||
=hidden_field_tag :script_id, @script.id | ||
Script: | ||
%strong= @script.name | ||
%br | ||
Levels affected: | ||
%strong= @user_level_count | ||
%br | ||
%br | ||
Reason: | ||
%br | ||
=text_area_tag :reason, '', placeholder: 'required' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see that the placeholder says 'required', do we want to disable the submit button if no reason was given? I'm also wondering if it may be useful to record the id of the admin that deleted the progress? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good suggestion but I think I want to keep the haml as simple as possible for now (similar to the other admin pages). I will run through this scenario where the admin does not provide a reason once everything is hooked up end-to-end and make sure that the experience is reasonable for an admin. If it's really bad, I'll add this. Yes, the id of the admin (the current logged in user) will be recorded in the firehose event. |
||
%br | ||
%br | ||
=submit_tag 'Delete Progress' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want a cancel button, or do you think it's obvious that you can just hit the browser back button? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about this and it didn't seem like other similar admin pages had a cancel button or link so I left it out? |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also mention other records that will be deleted as side effects like teacher feedback (I forget if there are others)?