userdata.html.tmpl 4.98 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[%# INTERFACE:
  #
  # editform:  is this an edit form? (It's a create form otherwise)
  # editusers: is viewing user member of editusers?
  # otheruser: Bugzilla::User object of user to edit
  #%]

<script type="text/javascript">
  var disable_mail_manually_set = [% (otheruser.email_disabled ? 1 : 0) FILTER js %];
</script>

<tr>
  <th><label for="login">Учетная запись:</label></th>
  <td>
    [% IF editusers %]
24 25 26
      <input size="64" maxlength="255" id="login" name="login"
             value="[% otheruser.login FILTER html %]"
             [%- " autofocus" UNLESS editform %] required>
27 28
      [% IF editform %]
        [% IF !otheruser.in_group('bz_sudo_protect') %]
29
          <br>
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
          <a href="relogin.cgi?action=prepare-sudo&amp;target_login=
          [%- otheruser.login FILTER uri %]">Сеанс от его имени</a>
        [% END %]
      [% END %]
    [% ELSE %]
      [% otheruser.login FILTER html %]
    [% END %]
  </td>
</tr>
[% IF default_authorizer.extern_id_used %]
  <tr>
    <th><label for="extern_id">ID внешней учетной записи:</label></th>
    <td>
      [% IF editusers %]
        <input size="64" maxlength="64" name="extern_id"
               id="extern_id" value="[% otheruser.extern_id FILTER html %]">
      [% ELSE %]
        [% otheruser.extern_id FILTER html %]
      [% END %]
    </td>
  </tr>
[% END %]
<tr>
  <th><label for="name">Полное имя:</label></th>
  <td>
    [% IF editusers %]
56 57
      <input size="64" maxlength="255" id="name" name="name"
             autocomplete="off" value="[% otheruser.name FILTER html %]">
58 59 60 61 62 63 64 65 66 67
    [% ELSE %]
      [% otheruser.name FILTER html %]
    [% END %]
  </td>
</tr>

[%# XXX This condition (can_change_password) will cause a problem
  # if we ever have a login system that can create accounts through
  # createaccount.cgi but can't change passwords.
  #%]
68
  [% password_complexity = Param('password_complexity') %]
69 70 71 72 73 74
[% IF editusers %]
  [% IF user.authorizer.can_change_password %]
  <tr>
    <th><label for="password">Пароль:</label></th>
    <td>
      <input type="password" size="16" name="password" id="password"
75 76 77 78 79 80 81 82 83
             value="" autocomplete="off" [% 'required' IF !editform %]>
      [% IF password_complexity == "mixed_letters" %] 
        (Пароль должен содержать по меньшей мере одну букву в ВЕРХНЕМ и одну букву в нижнем регистре.)
      [% ELSIF password_complexity == "letters_numbers" %] 
        (Пароль должен содержать по меньшей мере одну букву в ВЕРХНЕМ регистре, одну букву в нижнем регистре и одну цифру.)
      [% ELSIF password_complexity == "letters_numbers_specialchars" %] 
        (Пароль должен содержать по меньшей мере одну букву, одну цифру и один специальный символ.)
      [% END %]
      [% IF editform %]<br>
84 85 86 87 88 89
        (Для смены пароля укажите новый.)
      [% END %]
    </td>
  </tr>
  [% END %]
  <tr>
90
    <th><label for="disable_mail">Отключение почты:</label></th>
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
    <td>
      <input type="checkbox" name="disable_mail" id="disable_mail" value="1" 
             [% IF otheruser.email_disabled %] checked="checked" [% END %]
             onchange="disable_mail_manually_set=1;">
      (Действует на подписку и оповещения, не запрещает сброс пароля и другие
      административные сообщения)
    </td>
  </tr>
  <tr>
    <th><label for="disabledtext">Блокировка пользователя:</label></th>
    <td>
      [% INCLUDE global/textarea.html.tmpl
         name           = 'disabledtext'
         id             = 'disabledtext'
         minrows        = 2
         maxrows        = 10
         defaultrows    = 10
         cols           = 60
         defaultcontent = otheruser.disabledtext
         onchange       = "userDisabledTextOnChange(this);"
       %]<br>
      (Причина блокировки — пользователь не может войти с помощью этой
113 114 115 116 117 118 119 120 121 122
       учётной записи, когда это поле не пусто.)
    </td>
  </tr>
[% END %]
[% UNLESS editform %]
  <tr>
    <th><label for="notify_user">Уведомление пользователя:</label></th>
    <td>
      <input type="checkbox" name="notify_user" id="notify_user" value="1">
      (Отправить пользователя информацию по его учетной записи. Пароль не отправляется.)
123 124 125
    </td>
  </tr>
[% END %]