mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-28 04:32:26 +02:00
@ -26,7 +26,7 @@ class ActivityForm(forms.ModelForm):
|
||||
clubs = list(Club.objects.filter(PermissionBackend
|
||||
.filter_queryset(get_current_request(), Club, "view")).all())
|
||||
shuffle(clubs)
|
||||
self.fields["organizer"].widget.attrs["placeholder"] = ", ".join(club.name for club in clubs[:4]) + ", ..."
|
||||
self.fields["organizer"].widget.attrs["placeholder"] = ", ".join(club.name for club in clubs[:4]) + ",…"
|
||||
|
||||
def clean_organizer(self):
|
||||
organizer = self.cleaned_data['organizer']
|
||||
@ -53,7 +53,7 @@ class ActivityForm(forms.ModelForm):
|
||||
model=Note,
|
||||
attrs={
|
||||
"api_url": "/api/note/note/",
|
||||
'placeholder': 'Note de l\'événement sur laquelle envoyer les crédits d\'invitation ...'
|
||||
'placeholder': 'Note de l\'événement sur laquelle envoyer les crédits d\'invitation…'
|
||||
},
|
||||
),
|
||||
"attendees_club": Autocomplete(
|
||||
@ -115,7 +115,7 @@ class GuestForm(forms.ModelForm):
|
||||
# We don't evaluate the content type at launch because the DB might be not initialized
|
||||
'api_url_suffix':
|
||||
lambda: '&polymorphic_ctype=' + str(ContentType.objects.get_for_model(NoteUser).pk),
|
||||
'placeholder': 'Note ...',
|
||||
'placeholder': 'Note…',
|
||||
},
|
||||
),
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ class Activity(models.Model):
|
||||
@transaction.atomic
|
||||
def save(self, *args, **kwargs):
|
||||
"""
|
||||
Update the activity wiki page each time the activity is updated (validation, change description, ...)
|
||||
Update the activity wiki page each time the activity is updated (validation, change description,…)
|
||||
"""
|
||||
if self.date_end < self.date_start:
|
||||
raise ValidationError(_("The end date must be after the start date."))
|
||||
|
@ -37,7 +37,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<button class="btn btn-light">{% trans "Return to activity page" %}</button>
|
||||
</a>
|
||||
|
||||
<input id="alias" type="text" class="form-control" placeholder="Nom/note ...">
|
||||
<input id="alias" type="text" class="form-control" placeholder="Nom/note…">
|
||||
|
||||
<hr>
|
||||
|
||||
|
@ -210,7 +210,7 @@ class MembershipForm(forms.ModelForm):
|
||||
attrs={
|
||||
'api_url': '/api/user/',
|
||||
'name_field': 'username',
|
||||
'placeholder': 'Nom ...',
|
||||
'placeholder': 'Nom…',
|
||||
},
|
||||
),
|
||||
'date_start': DatePickerInput(),
|
||||
@ -227,7 +227,7 @@ class MembershipRolesForm(forms.ModelForm):
|
||||
attrs={
|
||||
'api_url': '/api/user/',
|
||||
'name_field': 'username',
|
||||
'placeholder': 'Nom ...',
|
||||
'placeholder': 'Nom…',
|
||||
},
|
||||
),
|
||||
)
|
||||
|
@ -26,7 +26,7 @@ class TransactionTemplateForm(forms.ModelForm):
|
||||
# We don't evaluate the content type at launch because the DB might be not initialized
|
||||
'api_url_suffix':
|
||||
lambda: '&polymorphic_ctype=' + str(ContentType.objects.get_for_model(NoteClub).pk),
|
||||
'placeholder': 'Note ...',
|
||||
'placeholder': 'Note…',
|
||||
},
|
||||
),
|
||||
'amount': AmountInput(),
|
||||
@ -43,7 +43,7 @@ class SearchTransactionForm(forms.Form):
|
||||
resetable=True,
|
||||
attrs={
|
||||
'api_url': '/api/note/alias/',
|
||||
'placeholder': 'Note ...',
|
||||
'placeholder': 'Note…',
|
||||
},
|
||||
),
|
||||
)
|
||||
@ -57,7 +57,7 @@ class SearchTransactionForm(forms.Form):
|
||||
resetable=True,
|
||||
attrs={
|
||||
'api_url': '/api/note/alias/',
|
||||
'placeholder': 'Note ...',
|
||||
'placeholder': 'Note…',
|
||||
},
|
||||
),
|
||||
)
|
||||
|
@ -19,7 +19,7 @@ class Migration(migrations.Migration):
|
||||
('trusting', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trusting', to='note.Note', verbose_name='trusting')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'frienship',
|
||||
'verbose_name': 'friendship',
|
||||
'verbose_name_plural': 'friendships',
|
||||
'unique_together': {('trusting', 'trusted')},
|
||||
},
|
||||
|
@ -240,7 +240,7 @@ class Trust(models.Model):
|
||||
)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("frienship")
|
||||
verbose_name = _("friendship")
|
||||
verbose_name_plural = _("friendships")
|
||||
unique_together = ("trusting", "trusted")
|
||||
|
||||
|
@ -20,7 +20,7 @@ class TemplateCategory(models.Model):
|
||||
"""
|
||||
Defined a recurrent transaction category
|
||||
|
||||
Example: food, softs, ...
|
||||
Example: food, softs,…
|
||||
"""
|
||||
name = models.CharField(
|
||||
verbose_name=_("name"),
|
||||
@ -40,7 +40,7 @@ class TransactionTemplate(models.Model):
|
||||
"""
|
||||
Defined a recurrent transaction
|
||||
|
||||
associated to selling something (a burger, a beer, ...)
|
||||
associated to selling something (a burger, a beer,…)
|
||||
"""
|
||||
name = models.CharField(
|
||||
verbose_name=_('name'),
|
||||
|
@ -40,7 +40,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{# User search with autocompletion #}
|
||||
<div class="card-footer">
|
||||
<input class="form-control mx-auto d-block"
|
||||
placeholder="{% trans "Name or alias..." %}" type="text" id="note" autofocus />
|
||||
placeholder="{% trans "Name or alias…" %}" type="text" id="note" autofocus />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -66,7 +66,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<option value="{{ special_type.id }}">{{ special_type.special_type }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input class="form-control mx-auto" type="text" id="source_note" placeholder="{% trans "Name or alias..." %}" />
|
||||
<input class="form-control mx-auto" type="text" id="source_note" placeholder="{% trans "Name or alias…" %}" />
|
||||
<div id="source_me_div">
|
||||
<hr>
|
||||
<a class="btn-block btn btn-secondary" href="#" id="source_me" data-turbolinks="false">
|
||||
@ -93,14 +93,14 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<option value="{{ special_type.id }}">{{ special_type.special_type }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input class="form-control mx-auto" type="text" id="dest_note" placeholder="{% trans "Name or alias..." %}" />
|
||||
<input class="form-control mx-auto" type="text" id="dest_note" placeholder="{% trans "Name or alias…" %}" />
|
||||
<ul class="list-group list-group-flush" id="dest_alias_matched">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Information on transaction (amount, reason, name,...) #}
|
||||
{# Information on transaction (amount, reason, name,…) #}
|
||||
<div class="col-md" id="external_div">
|
||||
<div class="card bg-light mb-4">
|
||||
<div class="card-header">
|
||||
|
@ -10,7 +10,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col-md-10 text-center">
|
||||
{# Search field , see js #}
|
||||
<input class="form-control mx-auto w-25" type="text" id="search_field" placeholder="{% trans "Name of the button..." %}" value="{{ request.GET.search }}">
|
||||
<input class="form-control mx-auto w-25" type="text" id="search_field" placeholder="{% trans "Name of the button…" %}" value="{{ request.GET.search }}">
|
||||
<hr>
|
||||
<a class="btn btn-primary text-center my-1" href="{% url 'note:template_create' %}" data-turbolinks="false">{% trans "New button" %}</a>
|
||||
</div>
|
||||
@ -19,7 +19,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<div class="col-md-12">
|
||||
<div class="card card-border shadow">
|
||||
<div class="card-header text-center">
|
||||
<h5> {% trans "buttons listing "%}</h5>
|
||||
<h5>{% trans "buttons listing"%}</h5>
|
||||
</div>
|
||||
<div class="card-body px-0 py-0" id="buttons_table">
|
||||
{% render_table table %}
|
||||
@ -70,11 +70,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
headers: {"X-CSRFTOKEN": CSRF_TOKEN}
|
||||
})
|
||||
.done(function() {
|
||||
addMsg('{% trans "button successfully deleted "%}','success');
|
||||
addMsg('{% trans "button successfully deleted"%}','success');
|
||||
$("#buttons_table").load(location.pathname + "?search=" + $("#search_field").val().replace(" ", "%20") + " #buttons_table");
|
||||
})
|
||||
.fail(function() {
|
||||
addMsg('{% trans "Unable to delete button "%} #' + button_id, 'danger')
|
||||
addMsg('{% trans "Unable to delete button"%} #' + button_id, 'danger')
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1572,7 +1572,7 @@
|
||||
"mask": 1,
|
||||
"field": "information_json",
|
||||
"permanent": false,
|
||||
"description": "Modifier les informations (sondage 1A, ...) d'une inscription WEI"
|
||||
"description": "Modifier les informations (sondage 1A,…) d'une inscription WEI"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ class InstancedPermission:
|
||||
|
||||
# Force insertion, no data verification, no trigger
|
||||
obj._force_save = True
|
||||
# We don't want to trigger any signal (log, ...)
|
||||
# We don't want to trigger any signal (log,…)
|
||||
obj._no_signal = True
|
||||
Model.save(obj, force_insert=True)
|
||||
ret = self.model.model_class().objects.filter(self.query & Q(pk=0)).exists()
|
||||
@ -227,7 +227,7 @@ class Permission(models.Model):
|
||||
def compute_param(value, **kwargs):
|
||||
"""
|
||||
A parameter is given by a list. The first argument is the name of the parameter.
|
||||
The parameters are the user, the club, and some classes (Note, ...)
|
||||
The parameters are the user, the club, and some classes (Note,…)
|
||||
If there are more arguments in the list, then attributes are queried.
|
||||
For example, ["user", "note", "balance"] will return the balance of the note of the user.
|
||||
If an argument is a list, then this is interpreted with a function call:
|
||||
|
Submodule apps/scripts updated: 86bc2d2698...48d9a8b5d2
@ -174,7 +174,7 @@ class SogeCreditForm(forms.ModelForm):
|
||||
attrs={
|
||||
'api_url': '/api/user/',
|
||||
'name_field': 'username',
|
||||
'placeholder': 'Nom ...',
|
||||
'placeholder': 'Nom…',
|
||||
},
|
||||
),
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ class SogeCredit(models.Model):
|
||||
def invalidate(self):
|
||||
"""
|
||||
Invalidating a Société générale delete the transaction of the bank if it was already created.
|
||||
Treasurers must know what they do, With Great Power Comes Great Responsibility...
|
||||
Treasurers must know what they do, With Great Power Comes Great Responsibility…
|
||||
"""
|
||||
if self.valid:
|
||||
self.credit_transaction.valid = False
|
||||
@ -422,7 +422,7 @@ class SogeCredit(models.Model):
|
||||
"""
|
||||
Deleting a SogeCredit is equivalent to say that the Société générale didn't pay.
|
||||
Treasurers must know what they do, this is difficult to undo this operation.
|
||||
With Great Power Comes Great Responsibility...
|
||||
With Great Power Comes Great Responsibility…
|
||||
"""
|
||||
|
||||
total_fee = sum(transaction.total for transaction in self.transactions.all() if not transaction.valid)
|
||||
|
@ -29,7 +29,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<div class="input-group">
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note…">
|
||||
<div class="input-group-append">
|
||||
<button id="add_sogecredit" class="btn btn-success" data-toggle="modal" data-target="#add-sogecredit-modal">{% trans "Add" %}</button>
|
||||
</div>
|
||||
|
@ -45,7 +45,7 @@ class WEIRegistrationForm(forms.ModelForm):
|
||||
attrs={
|
||||
'api_url': '/api/user/',
|
||||
'name_field': 'username',
|
||||
'placeholder': 'Nom ...',
|
||||
'placeholder': 'Nom …',
|
||||
},
|
||||
),
|
||||
"birth_date": DatePickerInput(options={'minDate': '1900-01-01',
|
||||
@ -130,14 +130,14 @@ class WEIMembershipForm(forms.ModelForm):
|
||||
Bus,
|
||||
attrs={
|
||||
'api_url': '/api/wei/bus/',
|
||||
'placeholder': 'Bus ...',
|
||||
'placeholder': 'Bus…',
|
||||
}
|
||||
),
|
||||
"team": Autocomplete(
|
||||
BusTeam,
|
||||
attrs={
|
||||
'api_url': '/api/wei/team/',
|
||||
'placeholder': 'Équipe ...',
|
||||
'placeholder': 'Équipe…',
|
||||
},
|
||||
resetable=True,
|
||||
),
|
||||
@ -167,7 +167,7 @@ class BusForm(forms.ModelForm):
|
||||
WEIClub,
|
||||
attrs={
|
||||
'api_url': '/api/wei/club/',
|
||||
'placeholder': 'WEI ...',
|
||||
'placeholder': 'WEI…',
|
||||
},
|
||||
),
|
||||
}
|
||||
@ -182,7 +182,7 @@ class BusTeamForm(forms.ModelForm):
|
||||
Bus,
|
||||
attrs={
|
||||
'api_url': '/api/wei/bus/',
|
||||
'placeholder': 'Bus ...',
|
||||
'placeholder': 'Bus…',
|
||||
},
|
||||
),
|
||||
"color": ColorWidget(),
|
||||
|
@ -153,7 +153,7 @@ class BusTeam(models.Model):
|
||||
|
||||
class WEIRole(Role):
|
||||
"""
|
||||
A Role for the WEI can be bus chief, team chief, free electron, ...
|
||||
A Role for the WEI can be bus chief, team chief, free electron,…
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
@ -258,7 +258,7 @@ class WEIRegistration(models.Model):
|
||||
@property
|
||||
def information(self):
|
||||
"""
|
||||
The information about the registration (the survey for the new members, the bus for the older members, ...)
|
||||
The information about the registration (the survey for the new members, the bus for the older members,…)
|
||||
are stored in a dictionary that can evolve following the years. The dictionary is stored as a JSON string.
|
||||
"""
|
||||
return json.loads(self.information_json)
|
||||
|
@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% block profile_content %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/bus/équipe ...">
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/bus/équipe…">
|
||||
<hr>
|
||||
|
||||
<div id="memberships_table">
|
||||
@ -24,7 +24,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
<div class="card-footer text-center">
|
||||
<a href="{% url 'wei:wei_registrations' pk=club.pk %}">
|
||||
<button class="btn btn-block btn-info">{% trans "View unvalidated registrations..." %}</button>
|
||||
<button class="btn btn-block btn-info">{% trans "View unvalidated registrations…" %}</button>
|
||||
</a>
|
||||
<hr>
|
||||
<a href="{% url 'wei:wei_memberships_pdf' wei_pk=club.pk %}" data-turbolinks="false">
|
||||
|
@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% block profile_content %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
|
||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note…">
|
||||
<hr>
|
||||
|
||||
<div id="registrations_table">
|
||||
@ -24,7 +24,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
<div class="card-footer text-center">
|
||||
<a href="{% url 'wei:wei_memberships' pk=club.pk %}">
|
||||
<button class="btn btn-block btn-info">{% trans "View validated memberships..." %}</button>
|
||||
<button class="btn btn-block btn-info">{% trans "View validated memberships…" %}</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1235,7 +1235,7 @@ class WEIAttributeBus1ANextView(LoginRequiredMixin, RedirectView):
|
||||
raise Http404
|
||||
wei = wei.get()
|
||||
qs = WEIRegistration.objects.filter(wei=wei, membership__isnull=False, membership__bus__isnull=True)
|
||||
qs = qs.filter(information_json__contains='selected_bus_pk') # not perfect, but works...
|
||||
qs = qs.filter(information_json__contains='selected_bus_pk') # not perfect, but works…
|
||||
if qs.exists():
|
||||
return reverse_lazy('wei:wei_bus_1A', args=(qs.first().pk, ))
|
||||
return reverse_lazy('wei:wei_1A_list', args=(wei.pk, ))
|
||||
|
Reference in New Issue
Block a user