-
Notifications
You must be signed in to change notification settings - Fork 0
/
agregar_usuario.php
75 lines (69 loc) · 3.19 KB
/
agregar_usuario.php
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<div class="row-fluid">
<!-- block -->
<div class="block">
<div class="navbar navbar-inner block-header">
<div class="muted pull-left"><i class="icon-plus-sign icon-large"></i> Agregar Usuario</div>
</div>
<div class="block-content collapse in">
<div class="span12">
<form method="post" id="add_user">
<div class="control-group">
<div class="controls">
<label>Estado</label>
<select name="estado" placeholder = "Categoria">
<option></option>
<option value ="administrator">Administrador</option>
<option value ="secretaria">Secretaria</option>
<option value ="preceptor">Preceptor</option>
<option value ="profesor">Profesor</option>
<option value ="alumno">Alumno</option>
</select>
</div>
</div>
<div class="control-group">
<div class="controls">
<label>Primer Nombre</label>
<input class="input focused" name="nombre" id="focusedInput" type="text" placeholder = "Primer Nombre" required>
</div>
</div>
<div class="control-group">
<div class="controls">
<label>Apellidos</label>
<input class="input focused" name="apellido" id="focusedInput" type="text" placeholder = "Apellido" required>
</div>
</div>
<div class="control-group">
<div class="controls">
<button data-placement="right" title="Click para Salvar" id="save" name="save" class="btn btn-inverse"><i class="icon-save icon-large"></i> Guardar</button>
<script type="text/javascript">
$(document).ready(function(){
$('#save').tooltip('show');
$('#save').tooltip('hide');
});
</script>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- /block -->
</div>
<script>
jQuery(document).ready(function($){
$("#add_user").submit(function(e){
e.preventDefault();
var _this = $(e.target);
var formData = $(this).serialize();
$.ajax({
type: "POST",
url: "guardar_usuario.php",
data: formData,
success: function(html){
$.jGrowl("usuario agregado con exito", { header: 'Usuario Agregado' });
window.location = 'usuarios.php';
}
});
});
});
</script>