]> git.llucax.com Git - z.facultad/75.43/tp1.git/commitdiff
Se agrega formulario para agregar créditos.
authorLeandro Lucarella <llucax@gmail.com>
Thu, 5 May 2005 05:50:42 +0000 (05:50 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Thu, 5 May 2005 05:50:42 +0000 (05:50 +0000)
src/lib/admin.forms.php

index 5ac17043b7422e6b82b7326d660c48b1207bb415..c79f7f264f21bcd179de4a9fc544b513bf5f855c 100644 (file)
@@ -110,6 +110,41 @@ function admin_form_log_desde($anio = null, $mes = null, $dia = null, $action =
                     $s = ($d == $dia) ? ' selected="selected"' : '';
                     echo "<option$s>$d</option>\n";
                 } ?>
                     $s = ($d == $dia) ? ' selected="selected"' : '';
                     echo "<option$s>$d</option>\n";
                 } ?>
+                </select>
+            </p>
+        </form>
+<?php
+}
+
+/// Formulario para asociar a un nuevo integrante.
+function admin_form_creditos($users, $user = '', $creditos = 1, $action = 'admin.creditos.php')
+{
+?>
+        <form name="admin_creditos" action="<?php echo $action ?>"
+                method="post" onSubmit="return admin_validar_creditos(this);">
+            <script type="text/javascript" language="JavaScript">
+                <!--
+                function admin_validar_creditos(f)
+                {
+                    if (!check_numero(f.admin_cred, 'Creditos')) return false;
+                    if (!check_vacio(f.admin_cred_pass, 'Contraseña')) return false;
+                    return true;
+                }
+                -->
+            </script>
+            <p>
+                <input type="submit" value="Agregar" />
+                <input type="text" name="admin_cred" size="1" maxlength="1" value="<?php echo $creditos ?>" />
+                créditos a
+                <select name="admin_cred_user">
+                <?php foreach ($users as $u)
+                {
+                    printf("<option value=\"%s\"%s>%s %s (%d)</option>\n",
+                        $u->getId(), ($u->getId() == $user) ? ' selected="selected"' : '',
+                        $u->getNombre(), $u->getApellido(), $u->getCreditos());
+                } ?>
+                </select><br />
+                Contraseña: <input type="password" name="admin_cred_pass" /> (esta operación requiere contraseña)
             </p>
         </form>
 <?php
             </p>
         </form>
 <?php