source: arma2/idCentral/idcentral/templates/nuevo_usuario.html @ 2c1e9b313f17c3adcca1e53bbf5c32cba4db58e1

Revision 2c1e9b313f17c3adcca1e53bbf5c32cba4db58e1, 4.6 KB checked in by tin <tin@…>, 3 years ago (diff)

Vista lista, faltaría agregar comprobaciones como si el usuario existe y un par más

  • Property mode set to 100644
Line 
1<!DOCTYPE html
2    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml"
5      xmlns:py="http://genshi.edgewall.org/"
6      xmlns:xi="http://www.w3.org/2001/XInclude">
7  <xi:include href="layout.html" />
8  <xi:include href="macros.html" />
9  <head>
10    <title>Nuevo Usuario IdCentral</title>
11  </head>
12
13<script LANGUAGE="JavaScript">
14<!--
15window.onload = init;
16function init(){
17    checkPasswordStrengh(document.getElementById("password"));
18    checkPasswordStrengh(document.getElementById("confirm_passwd"));
19}
20
21function checkPasswordStrengh(fieldText){
22    var password = fieldText.value;
23    var score = 1;
24    if(password.length < 1){
25        score = 0;
26    }
27    if(password.length < 4 && password.length >= 1){
28        score = 1;
29    }
30    if(password.length >= 8){
31        score += 1;
32    }
33    if(password.length >= 11){
34        score += 1;
35    }
36    if(password.match(/\d+/)){
37        score += 1;
38    }
39    if(password.match(/[a-z]/) && password.match(/[A-Z]/)){
40        score += 1;
41    }
42    if(password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,£,(,)]/)){
43        score += 1;
44    }
45    fieldText.className = "strength" + score;
46}
47//-->
48</script>
49
50
51  <body>
52
53    <h1>Nuevo Usuario IdCentral</h1>
54
55    <p>${intro}</p>
56
57      <form method="post" id="newuser_form" action="">
58        <fieldset>
59          <legend>Requeridos</legend>
60          <input type="hidden" name="action" value="newuser" />
61
62          <div id="content" class="error">
63            <label>
64              <b>Nombre y Apellido:</b>
65              <input type="text" name="name_lastname" class="textwidget" size="40" value="$name_lastname" />
66              <py:if test="error_name_lastname">
67                <label class="message">${error_name_lastname}</label>
68              </py:if>
69              <div>
70                  <font color="Blue" size="-1">${sug_name_lastname}</font>
71              </div>
72            </label>
73          </div>
74
75          <div id="content" class="error">
76            <label><b>Usuario:</b>
77              <input type="text" name="userid" class="textwidget" size="20" value="$userid"/>
78              <py:if test="error_userid">
79                <label class="message">${error_userid}</label>
80              </py:if>
81              <div>
82                  <font color="Blue" size="-1">${sug_userid}</font>
83              </div>
84            </label>
85          </div>
86
87          <div id="content">
88            <label><b>Grupo de Usuario:</b>
89              <select name="lug">
90                  <py:for each="organization in orgs">
91                      <option value="${organization}" selected="${lug_selected==organization and 'selected' or None}">${organization}</option>
92                  </py:for>
93              </select>
94              <div>
95                  <font color="Blue" size="-1">${sug_usergroup}</font>
96              </div>
97            </label>
98          </div>
99
100          <div id="content" class="error">
101            <label><b>TextCha</b>
102              <input type="text" name="texcha_put" class="textwidget" size="20" value="$texcha_put"/>
103              <label><b>$texcha</b></label>
104              <py:if test="error_texcha">
105                <label class="message">${error_texcha}</label>
106              </py:if>
107              <div>
108                  <font color="Blue" size="-1">${sug_texcha}</font>
109              </div>
110            </label>
111          </div>
112
113          <div id="content" class="error">
114            <label><b>Contraseña</b>
115                <input id="password" name="passwd" class="strength0"
116                       size="20" value="$passwd" type="password" onkeyup="javascript:checkPasswordStrengh(this);"/>
117              <py:if test="error_passwd">
118                <label class="message">${error_passwd}</label>
119              </py:if>
120              <div>
121                <font color="Blue" size="-1">${sug_passwd}</font>
122              </div>
123            </label>
124          </div>
125
126          <div id="content" class="error">
127            <label><b>Confirmar contraseña</b>
128                <input id="confirm_passwd" name="confirm_passwd" class="strengh0"
129                       size="20" value="$confirm_passwd" type="password" onkeyup="javascript:checkPasswordStrengh(this);"/>
130              <py:if test="error_confirm_passwd">
131                <label class="message">${error_confirm_passwd}</label>
132              </py:if>
133              <div>
134                <font color="Blue" size="-1">${sug_confirm_passwd}</font>
135              </div>
136            </label>
137          </div>
138
139        </fieldset>
140        <input type="submit" value="Crear Usuario" />
141      </form>
142  </body>
143</html>
144
Note: See TracBrowser for help on using the repository browser.