osem-fcy/app/views/users/_personal_info_fields.html.haml

18 lines
873 B
Text

= semantic_form_for(user, url: user_path(user.id), remote: true) do |f|
= f.input :name, as: :string
= f.input :nickname, as: :string
.control-label
= "Avatar"
= image_tag(user.gravatar_url(size: '48'), title: "Yo #{user.name}!", :alt => '')
= link_to 'Change your avatar here', 'https://gravatar.com'
= f.input :affiliation, as: :string,
hint: 'This could be a company, a user group, or nothing at all.'
= f.input :website_url, type: :url, label: 'Personal Website'
= f.input :biography, input_html: { rows: 5, data: { provide: 'markdown-editable' }, 'onkeyup' => "word_count(this, 'biography-count', 150)" },hint: markdown_hint
You have used
%span#bio_length
= user.biography ? user.biography.split.length : 0
words. Biographies are limited to 150 words.
%br
%br
= f.action :submit, as: :button, label: 'Update', button_html: {class: 'btn btn-primary'}