Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3c6361eb

Von Andreas Rudin vor fast 2 Jahren hinzugefügt

  • ID 3c6361ebd0ac651af0e881e2ef3391ed3dc660de
  • Vorgänger 81b0b21f
  • Nachfolger 8c1de77f

design40: Anpassungen beim Editieren von Benutzer*innen als Administrator

Unterschiede anzeigen:

templates/design40_webpages/admin/edit_user.html
10 10
<form method="post" action="controller.pl" id="form">
11 11
[% L.hidden_tag("user.id", SELF.user.id) %]
12 12
[% L.hidden_tag("action", "") %]
13
[% L.hidden_tag("check_previously_used", "0") %]
14
[% L.hidden_tag("assign_documents", "0") %]
13 15
[% SET props=SELF.user.config_values %]
14 16

  
15 17
<!-- <h2>[% #LxERP.t8("Settings") %]</h2> -->
......
40 42
  </tr>
41 43
  <tr>
42 44
    <th>[% LxERP.t8('Signature') %]</th>
43
    <td>[% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=24, class="wi-wide") %]</td>
45
    <td>[% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=24, class="texteditor wi-wide") %]</td>
44 46
  </tr>
45 47
  <tr>
46 48
    <th>[% LxERP.t8('Phone') %]</th>
......
139 141

  
140 142
<div class="buttons">
141 143
  [% L.link(SELF.url_for(action="show"), LxERP.t8("Back"), class="button neutral") %]
142
  [% L.button_tag("submit_with_action('save_user')", LxERP.t8("Save")) %]
144
  [% L.button_tag("save_new()", LxERP.t8("Save")) %]
143 145
  [% IF SELF.user.id %]
144 146
    [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
145 147
    [% L.button_tag("submit_delete()", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
......
164 166
    [% END %]
165 167
  }
166 168

  
169
  function save() {
170
    $("#action").val('Admin/save_user');
171
    var data = $('#form').serializeArray();
172
    $.post("controller.pl", data, kivi.eval_json_result);
173
  }
174

  
175
  function save_new() {
176
    $("#check_previously_used").val("1");
177
    save();
178
  }
179

  
167 180
  function save_as_new() {
168 181
    $("#user_id").val("");
169
    submit_with_action("save_user");
182
    $("#check_previously_used").val("1");
183
    save();
184
  }
185

  
186
  function show_loginname_previously_used_dialog() {
187
    var buttons = {};
188
    buttons[kivi.t8('Yes')] = function() {
189
      $("#check_previously_used").val("0");
190
      $("#assign_documents").val("1");
191
      save();
192
    };
193
    buttons[kivi.t8('No')] = function() {
194
      $("#check_previously_used").val("0");
195
      save();
196
    };
197
    buttons[kivi.t8('Cancel')] = function() { $( this ).dialog('close'); };
198

  
199
    kivi.popup_dialog({
200
      id: 'loginname_previously_used_dialog',
201
      html: kivi.t8('The login name you entered was previously used. Do you want to assign documents from the former user that had the same username to the new user?'),
202
      dialog: {
203
        title:  kivi.t8('Login name was previously used'),
204
        width:  400,
205
        height: 250,
206
        buttons: buttons
207
      }
208
    });
170 209
  }
171 210
--></script>

Auch abrufbar als: Unified diff