Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_form.haml « registrations « views « app - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9cd6ce0f798a11647164e37b971fb1ba3d5873a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
= form_for(resource, url: registration_path(resource_name), html: {class: "form-horizontal block-form", autocomplete: "off"}) do |f|

  %fieldset
    - if mobile
      %legend
        = image_tag("branding/logos/header-logo2x.png", height: 40, width: 40)
        = AppConfig.settings.pod_name

    - if mobile
      = f.label :email, t("registrations.new.email"), class: "control-label", id: "emailLabel"
    - else
      = f.label :email, t("registrations.new.email"), class: "sr-only control-label", id: "emailLabel"
      %i.entypo-mail
    = f.email_field :email,
                    autofocus:   true,
                    class:       "input-block-level form-control",
                    data:        {content: t("users.edit.your_email_private")},
                    placeholder: t("registrations.new.email"),
                    required:    true,
                    title:       t("registrations.new.enter_email"),
                    aria:        {labelledby: "emailLabel"}

    - if mobile
      %label.control-label#usernameLabel{for: "user_username"}
        = t("registrations.new.username")
    - else
      %label.sr-only.control-label#usernameLabel{for: "user_username"}
        = t("registrations.new.username")
      %i.entypo-user
    = f.text_field :username,
                   class:       "input-block-level form-control",
                   placeholder: t("registrations.new.username"),
                   title:       t("registrations.new.enter_username"),
                   required:    true,
                   pattern:     "[A-Za-z0-9_]+",
                   aria:        {labelledby: "usernameLabel"}

    - if mobile
      %label.control-label#passwordLabel{for: "user_password"}
        = t("registrations.new.password")
    - else
      %label.sr-only.control-label#passwordLabel{for: "user_password"}
        = t("registrations.new.password")
      %i.entypo-lock
    = f.password_field :password,
                       class:       "input-block-level form-control",
                       placeholder: t("registrations.new.password"),
                       title:       t("registrations.new.enter_password"),
                       required:    true,
                       pattern:     "......+",
                       aria:        {labelledby: "passwordLabel"}

    - if mobile
      %label.control-label#passwordConfirmationLabel{for: "user_password_confirmation"}
        = t("registrations.new.password_confirmation")
    - else
      %label.sr-only.control-label#passwordConfirmationLabel{for: "user_password_confirmation"}
        = t("registrations.new.password_confirmation")
      %i.entypo-lock
    = f.password_field :password_confirmation,
                       class:       "input-block-level form-control",
                       placeholder: t("registrations.new.password_confirmation"),
                       title:       t("registrations.new.enter_password_again"),
                       required:    true,
                       pattern:     "......+",
                       aria:        {labelledby: "passwordConfirmationLabel"}

    - if AppConfig.settings.captcha.enable?
      = show_simple_captcha object: "user",
                            code_type: "numeric",
                            class: "simple-captcha-image",
                            input_html: {class: "form-control captcha-input"}

    = invite_hidden_tag(invite)

  - if AppConfig.settings.terms.enable?
    %p.terms.text-center#terms
      = t('registrations.new.terms', terms_link: link_to(t('registrations.new.terms_link'), terms_path, target: "_blank")).html_safe

  = f.submit t("registrations.new.sign_up"), class: "btn btn-block btn-large btn-primary",
    data: {disable_with: t("registrations.new.submitting")}