mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-30 08:32:26 +00:00
Crée un champ téléphone
This commit is contained in:
parent
6f55c492e8
commit
c0410f9faf
3 changed files with 33 additions and 11 deletions
20
users/migrations/0051_user_telephone.py
Normal file
20
users/migrations/0051_user_telephone.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2017-06-25 02:06
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0050_serviceuser_comment'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='telephone',
|
||||
field=models.CharField(blank=True, max_length=15, null=True),
|
||||
),
|
||||
]
|
|
@ -163,6 +163,7 @@ class User(AbstractBaseUser):
|
|||
pwd_ntlm = models.CharField(max_length=255)
|
||||
state = models.IntegerField(choices=STATES, default=STATE_ACTIVE)
|
||||
registered = models.DateTimeField(auto_now_add=True)
|
||||
telephone = models.CharField(max_length=15, blank=True, null=True)
|
||||
uid_number = models.IntegerField(default=auto_uid, unique=True)
|
||||
rezo_rez_uid = models.IntegerField(unique=True, blank=True, null=True)
|
||||
|
||||
|
@ -683,6 +684,7 @@ class BaseInfoForm(ModelForm):
|
|||
'school',
|
||||
'comment',
|
||||
'room',
|
||||
'telephone',
|
||||
]
|
||||
|
||||
class EditInfoForm(BaseInfoForm):
|
||||
|
@ -696,6 +698,7 @@ class EditInfoForm(BaseInfoForm):
|
|||
'comment',
|
||||
'room',
|
||||
'shell',
|
||||
'telephone',
|
||||
]
|
||||
|
||||
class InfoForm(EditInfoForm):
|
||||
|
@ -822,7 +825,3 @@ class WhitelistForm(ModelForm):
|
|||
if date_end < timezone.now():
|
||||
raise forms.ValidationError("Triple buse, la date de fin ne peut pas être avant maintenant... Re2o ne voyage pas dans le temps")
|
||||
return date_end
|
||||
|
||||
|
||||
class ProfilForm(Form):
|
||||
user = forms.CharField(label='Ok', max_length=100)
|
||||
|
|
|
@ -69,17 +69,24 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<th>E-mail</th>
|
||||
<td>{{ user.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Chambre</th>
|
||||
<td>{{ user.room }}</td>
|
||||
<th>Téléphone</th>
|
||||
<td>{{ user.telephone }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>École</th>
|
||||
<td>{{ user.school }}</td>
|
||||
<th>Commentaire</th>
|
||||
<td>{{ user.comment }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Chambre</th>
|
||||
<td>{{ user.room }}</td>
|
||||
<th>Date d'inscription</th>
|
||||
<td>{{ user.registered }}</td>
|
||||
<th>Dernière connexion</th>
|
||||
<td>{{ user.last_login }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Fin d'adhésion</th>
|
||||
|
@ -123,10 +130,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% else %}
|
||||
<td>Aucun</td>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>Dernière connexion</th>
|
||||
<td>{{ user.last_login }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Machines :</h2>
|
||||
<h4><a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-machine' user.id %}"><i class="glyphicon glyphicon-phone"></i> Ajouter une machine</a></h4>
|
||||
|
|
Loading…
Reference in a new issue