userdata.html.tmpl 2.89 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 24 25 26 27 28 29 30 31
[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Bug Tracking System.
  #
  # Contributor(s): Marc Schumann <wurblzap@gmail.com>
  #%]

[%# 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
  #%]

<tr>
  <th><label for="login">Login name:</label></th>
  <td>
    [% IF editusers %]
      <input size="64" maxlength="255" name="login" 
             id="login" value="[% otheruser.login FILTER html %]" />
      [% IF editform %]
        <input type="hidden" name="loginold"
32 33 34
               value="[% otheruser.login FILTER html %]" />
        [% IF !otheruser.groups.bz_sudo_protect %]
          <br />
35
          <a href="relogin.cgi?action=prepare-sudo&amp;target_login=
36 37
          [%- otheruser.login FILTER html %]">Impersonate this user</a>
        [% END %]
38 39 40 41 42 43 44 45 46 47 48
      [% END %]
    [% ELSE %]
      [% otheruser.login FILTER html %]
    [% END %]
  </td>
</tr>
<tr>
  <th><label for="name">Real name:</label></th>
  <td>
    [% IF editusers %]
      <input size="64" maxlength="255" name="name"
49
             autocomplete="off"
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
             id="name" value="[% otheruser.name FILTER html %]" />
      [% IF editform %]
        <input type="hidden" name="nameold"
               value="[% otheruser.name FILTER html %]" />
      [% END %]
    [% ELSE %]
      [% otheruser.name FILTER html %]
    [% END %]
  </td>
</tr>
[% IF editusers %]
  <tr>
    <th><label for="password">Password:</label></th>
    <td>
      <input type="password" size="16" maxlength="16" name="password"
65
             autocomplete="off"
66 67 68 69 70 71 72 73 74
             id="password" value="" />
      [% IF editform %]<br />
        (Enter new password to change.)
      [% END %]
    </td>
  </tr>
  <tr>
    <th><label for="disabledtext">Disable text:</label></th>
    <td>
75 76 77 78 79 80 81 82 83
      [% INCLUDE global/textarea.html.tmpl
         name           = 'disabledtext'
         id             = 'disabledtext'
         minrows        = 2
         maxrows        = 10
         defaultrows    = 10
         cols           = 60
         defaultcontent = otheruser.disabledtext
       %]<br>
84 85 86 87 88 89 90 91 92
      (If non-empty, then the account will be disabled, and this text should
      explain why.)
      [% IF editform %]
        <input type="hidden" name="disabledtextold"
               value="[% otheruser.disabledtext FILTER html %]" />
      [% END %]
    </td>
  </tr>
[% END %]