Skip to content
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

Bugfix/restore users events edit views #3073

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/views/admin/events/new.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= form_for(@event, url: @url) do |f|
= render partial: 'proposals/form', locals: { f: f }
= render partial: 'shared/user_selectize'
10 changes: 10 additions & 0 deletions app/views/admin/users/edit.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.row
.col-md-12
.page-header
%h1
Edit User
= form_for [:admin, @user] do |f|
= render partial: 'users/form', locals: { f: f, full: true }
.form-group
.text-right
= f.submit nil, class: 'btn btn-primary'
47 changes: 47 additions & 0 deletions app/views/users/_form.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.form-group
= f.label :name
= f.text_field :name, class: 'form-control'
%span.help-block
This is your real name
.form-group
= f.label :nickname
= f.text_field :nickname, class: 'form-control'
- if full
.form-group
= f.label :email_public
%abbr{title: 'This field is required'}
= f.email_field :email, class: 'form-control', placeholder: 'Email'
.form-group
= f.label :languages
= f.select :languages, I18nData.languages.invert, { include_blank: 'Any Language', include_hidden: false }, { multiple: true, class: 'form-control' }
.checkbox
%label
= f.check_box :is_admin
is Admin?
%span.help-block
An admin can create a new conference, manage users and make other users admins.
.checkbox
%label
= f.check_box :is_disabled
Disabled
.form-group
= f.label :avatar
%br
= image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", alt: '', class: 'img-rounded')
%span.help-block
Change your avatar on
= link_to 'gravatar.com', 'https://gravatar.com'
.form-group
= f.label :affiliation
= f.text_field :affiliation, class: 'form-control'
%span.help-block
The company you work work, the user group you belong to, or nothing at all.
.form-group
= f.label :biography
= f.text_area :biography, rows: 5, data: { provide: 'markdown' }, class: 'form-control'
%span.help-block
You have used
%span#bio_length
= @user.biography ? @user.biography.split.length : 0
words. Biographies are limited to 150 words.
= markdown_hint
30 changes: 1 addition & 29 deletions app/views/users/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,7 @@
.row
.col-md-12
= form_for(@user) do |f|
.form-group
= f.label :name
= f.text_field :name, class: 'form-control'
%span.help-block
This is your real name
.form-group
= f.label :nickname
= f.text_field :nickname, class: 'form-control'
.form-group
= f.label :avatar
%br
= image_tag(@user.gravatar_url(size: '48'), title: "Yo #{@user.name}!", alt: '', class: 'img-rounded')
%span.help-block
Change your avatar on
= link_to 'gravatar.com', 'https://gravatar.com'
.form-group
= f.label :affiliation
= f.text_field :affiliation, class: 'form-control'
%span.help-block
The company you work work, the user group you belong to, or nothing at all.
.form-group
= f.label :biography
= f.text_area :biography, rows: 5, data: { provide: 'markdown' }, class: 'form-control'
%span.help-block
You have used
%span#bio_length
= @user.biography ? @user.biography.split.length : 0
words. Biographies are limited to 150 words.
= markdown_hint
= render partial: 'users/form', locals: { f: f, full: false }
.form-group
.text-right
= f.submit nil, class: 'btn btn-primary'
Expand Down