-# haml-lint:disable InstanceVariables - user = @user || current_user -# haml-lint:enable InstanceVariables = form_for user, url: { controller: 'elabs/member/users', action: :update } do |f| - if user.errors.any? .error %h2= format(n_('An error prevented your account from being updated:', '%i errors prevented your account from being updated:', user.errors.count), nb: user.errors.count) %ul - user.errors.full_messages.each do |message| %li= message .field = f.label :real_name .field-input= f.text_field :real_name .field = f.label :biography .field-input = f.text_area :biography .field-hint= raw format(_('Markdown supported. %s'), preview_button: content_tag('a', _('Preview'), href: '#', onclick: 'mdPreviewBiography(event)')) .actions = f.submit _('Save'), class: 'btn btn--save' = render 'elabs/member/layouts/markdown-preview' :javascript var biographyCM = initializeCodeMirrorIn(document.getElementById('user_biography')) var mdPreviewBiography = createMDPreviewer(biographyCM)