summaryrefslogtreecommitdiff
path: root/app/views/admin/application_settings/_signup.html.haml
blob: 50c455f8686db2351f8e882e3801b95eef6b617b (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
= form_for @application_setting, url: admin_application_settings_path, html: { class: 'fieldset-form' } do |f|
  = form_errors(@application_setting)

  %fieldset
    .form-group.row
      .offset-sm-2.col-sm-10
        .form-check
          = f.label :signup_enabled do
            = f.check_box :signup_enabled
            Sign-up enabled
    .form-group.row
      .offset-sm-2.col-sm-10
        .form-check
          = f.label :send_user_confirmation_email do
            = f.check_box :send_user_confirmation_email
            Send confirmation email on sign-up
    .form-group.row
      = f.label :domain_whitelist, 'Whitelisted domains for sign-ups', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.text_area :domain_whitelist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8
        .form-text.text-muted ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com
    .form-group.row
      = f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'col-form-label col-sm-2'
      .col-sm-10
        .form-check
          = f.label :domain_blacklist_enabled do
            = f.check_box :domain_blacklist_enabled
            Enable domain blacklist for sign ups
    .form-group.row
      .offset-sm-2.col-sm-10
        .form-check
          = label_tag :blacklist_type_file do
            = radio_button_tag :blacklist_type, :file
            .option-title
              Upload blacklist file
        .form-check
          = label_tag :blacklist_type_raw do
            = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank?
            .option-title
              Enter blacklist manually
    .form-group.row.blacklist-file
      = f.label :domain_blacklist_file, 'Blacklist file', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.file_field :domain_blacklist_file, class: 'form-control', accept: '.txt,.conf'
        .form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines or commas for multiple entries.
    .form-group.row.blacklist-raw
      = f.label :domain_blacklist, 'Blacklisted domains for sign-ups', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.text_area :domain_blacklist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8
        .form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com

    .form-group.row
      = f.label :after_sign_up_text, class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.text_area :after_sign_up_text, class: 'form-control', rows: 4
        .form-text.text-muted Markdown enabled

  = f.submit 'Save changes', class: "btn btn-success"