mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 23:42:14 +00:00
Change to just using online auth for internal clients.
This effectively reverts 067e03b.
This commit is contained in:
@@ -137,6 +137,7 @@ class EventDuplicate(EventUpdate):
|
||||
old = super(EventDuplicate, self).get_object(queryset) # Get the object (the event you're duplicating)
|
||||
new = copy.copy(old) # Make a copy of the object in memory
|
||||
new.based_on = old # Make the new event based on the old event
|
||||
new.purchase_order = None
|
||||
|
||||
# Remove all the authorisation information from the new event
|
||||
new.auth_request_to = None
|
||||
@@ -256,20 +257,12 @@ class EventAuthorise(generic.UpdateView):
|
||||
return getattr(self.event, 'authorisation', None)
|
||||
|
||||
def get_form_class(self):
|
||||
if self.event.organisation is not None and self.event.organisation.union_account:
|
||||
return forms.InternalClientEventAuthorisationForm
|
||||
else:
|
||||
return forms.ExternalClientEventAuthorisationForm
|
||||
return forms.InternalClientEventAuthorisationForm
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(EventAuthorise, self).get_context_data(**kwargs)
|
||||
context['event'] = self.event
|
||||
|
||||
if self.get_form_class() is forms.InternalClientEventAuthorisationForm:
|
||||
context['internal'] = True
|
||||
else:
|
||||
context['internal'] = False
|
||||
|
||||
context['tos_url'] = settings.TERMS_OF_HIRE_URL
|
||||
return context
|
||||
|
||||
@@ -304,6 +297,7 @@ class EventAuthorise(generic.UpdateView):
|
||||
"This URL is invalid. Please ask your TEC contact for a new URL")
|
||||
return super(EventAuthorise, self).dispatch(request, *args, **kwargs)
|
||||
|
||||
|
||||
class EventAuthorisationRequest(generic.FormView, generic.detail.SingleObjectMixin):
|
||||
model = models.Event
|
||||
form_class = forms.EventAuthorisationRequestForm
|
||||
|
||||
Reference in New Issue
Block a user