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
Refactor the workshop edit to use the form partial #1155
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
= simple_form_for [:admin, @workshop], url: :admin_workshops do |f| | ||
= simple_form_for [:admin, @workshop], html: { novalidate: true } do |f| | ||
.row | ||
.medium-6.columns | ||
= f.association :chapter, as: :select, collection: Chapter.available_to_user(current_user) | ||
|
@@ -35,6 +35,8 @@ | |
= f.input :rsvp_open_local_time, as: :string, input_html: { data: { value: @workshop.rsvp_opens_at.try(:time).try(:strftime, '%H:%M') } } | ||
.row | ||
.large-6.columns | ||
%label Organisers | ||
= f.collection_select :organisers, Member.all, :id, :full_name, { selected: @workshop.organisers.map(&:id) }, { multiple: true } | ||
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. So, my first PR to the project was accepted in September. I say this because I have no project/business knowledge to fall back on. We are making a change in the behaviour of the code. Before |
||
= f.input :invitable | ||
.row | ||
.large-12.columns.text-right | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
.row | ||
.medium-12.columns | ||
%h2 Edit Workshop | ||
= render partial: 'edit_form' | ||
= render partial: 'form' |
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.
I haven't looked at this yet but I did a quick search for
novalidate
so my first question is going to be "whynovalidate
isn't used in any other forms?" So I can be reassured that introducing something new is the only option. A consistent project is an "easy" to maintain project and exceptions in the code makes maintenance harder.