Bugs div. und Contact erweitert
This commit is contained in:
parent
41d32d7afe
commit
c57b8bb9df
|
|
@ -32,6 +32,7 @@ class OrganizerAddContact(forms.ModelForm):
|
|||
model = AGContacts
|
||||
labels = {
|
||||
'personname' : "Ansprechpartner",
|
||||
'function' : "Funktion",
|
||||
'name' : "Organisation",
|
||||
'mail' : "E-Mailadresse",
|
||||
'phone1' : "Telefon 1",
|
||||
|
|
@ -43,12 +44,13 @@ class OrganizerAddContact(forms.ModelForm):
|
|||
'desc' : "Anmerkungen"
|
||||
}
|
||||
|
||||
fields = ['name', 'personname', 'mail', 'phone1', 'phone2', 'street', 'plz', 'city', "category", 'desc']
|
||||
fields = ['name', 'personname', 'function', 'mail', 'phone1', 'phone2', 'street', 'plz', 'city', "category", 'desc']
|
||||
|
||||
|
||||
def __init__(self, user, *args, **kwargs):
|
||||
super(OrganizerAddContact, self).__init__(*args, **kwargs)
|
||||
self.fields['name'].required = False
|
||||
self.fields['function'].required = False
|
||||
self.fields['personname'].required = False
|
||||
self.fields['mail'].required = False
|
||||
self.fields['phone1'].required = False
|
||||
|
|
@ -65,6 +67,7 @@ class OrganizerUpdateContact(forms.ModelForm):
|
|||
model = AGContacts
|
||||
labels = {
|
||||
'personname' : "Ansprechpartner",
|
||||
'function' : "Funktion",
|
||||
'name' : "Organisation",
|
||||
'mail' : "E-Mailadresse",
|
||||
'phone1' : "Telefon 1",
|
||||
|
|
@ -76,12 +79,13 @@ class OrganizerUpdateContact(forms.ModelForm):
|
|||
'desc' : "Anmerkungen"
|
||||
}
|
||||
|
||||
fields = ['name', 'personname', 'mail', 'phone1', 'phone2', 'street', 'plz', 'city', "category", 'desc']
|
||||
fields = ['name', 'personname', 'function', 'mail', 'phone1', 'phone2', 'street', 'plz', 'city', "category", 'desc']
|
||||
|
||||
def __init__(self, user, *args, **kwargs):
|
||||
super(OrganizerUpdateContact, self).__init__(*args, **kwargs)
|
||||
|
||||
self.fields['name'].required = False
|
||||
self.fields['function'].required = False
|
||||
self.fields['personname'].required = False
|
||||
self.fields['mail'].required = False
|
||||
self.fields['phone1'].required = False
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ class AGContactsCagetory(models.Model):
|
|||
class AGContacts(models.Model):
|
||||
agency = models.ForeignKey(Agency, on_delete=models.CASCADE)
|
||||
personname = models.CharField(default="", max_length=200, blank=False)
|
||||
function = models.CharField(default="", max_length=200, blank=False)
|
||||
name = models.CharField(default="", max_length=200, blank=False)
|
||||
mail = models.CharField(default="", max_length=200, blank=False)
|
||||
phone1 = models.CharField(default="", max_length=200, blank=False)
|
||||
|
|
@ -54,6 +55,7 @@ class AGContacts(models.Model):
|
|||
city = models.CharField(default="", max_length=200, blank=True)
|
||||
plz = models.CharField(default="", max_length=5, blank=True)
|
||||
desc = models.TextField(max_length=3000, blank=True)
|
||||
|
||||
category = models.ForeignKey("AGContactsCagetory", default=None, on_delete=models.SET_DEFAULT, null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Firma</th>
|
||||
<th scope="col">Ansprechpartner</th>
|
||||
<th scope="col">E-Mail</th>
|
||||
<th scope="col">Telefon</th>
|
||||
<th scope="col">Kategorie</th>
|
||||
|
|
@ -28,11 +29,15 @@
|
|||
<td>
|
||||
<a href="#" onclick="javascript:$('#infos_{{agc.pk}}').modal('toggle');">{{agc.name}}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{agc.personname}}
|
||||
</td>
|
||||
<td>
|
||||
{% if agc.mail|length > 0 %}
|
||||
<a href="mailto:{{agc.mail}}">{{agc.mail}}</a><br/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if agc.phone1|length > 0 %}
|
||||
<a href="tel::{{agc.phone1}}">{{agc.phone1}}</a>
|
||||
|
|
@ -75,8 +80,9 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
{% if agc.personname|length > 0 %}
|
||||
Ansprechpartner: {{agc.personname}}<br/>
|
||||
Ansprechpartner: {{agc.personname}} <br/>
|
||||
{% endif %}
|
||||
{% if agc.function|length > 0 %}Funktion: {{agc.function}}<br /> {% endif %}
|
||||
{% if agc.mail|length > 0 %}
|
||||
E-Mailadresse: <a href="mailto:{{agc.mail}}">{{agc.mail}}</a><br />
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ def TimeAdd(request, team=0, pk=0):
|
|||
|
||||
#end = datetime.datetime(int(workday.end.year), int(workday.end.month), int(workday.end.day), int(((str(form["end"].value()).split(":"))[0])), int(((str(form["end"].value()).split(":"))[1])))
|
||||
|
||||
workday = Workday(start=form.cleaned_data["start"], end=form.cleaned_data["end"], target=form.cleaned_data["target"], user=user, freefield=form.cleaned_data["freefield"], agency=request.user.profile.agency)
|
||||
workday = Workday(start=form.cleaned_data["start"], end=form.cleaned_data["end"], target=form.cleaned_data["target"], user=user, freefield=form.cleaned_data["freefield"], agency=request.user.profile.agency, lastManualChangeUser=user, lastManualChangeDate=date.today())
|
||||
|
||||
if workday.start.day != workday.end.day or workday.start.month != workday.end.month or workday.start.year != workday.end.year or workday.start > workday.end:
|
||||
messages.success(request, f'Der Arbeitstag darf nur an einem Tag stattfinden und das Ende muss nach dem Anfang liegen.')
|
||||
|
|
|
|||
|
|
@ -111,6 +111,9 @@
|
|||
{% if agc.personname|length > 0 %}
|
||||
Ansprechpartner: {{agc.personname}}<br/>
|
||||
{% endif %}
|
||||
{% if agc.function|length > 0 %}
|
||||
Funktion: {{agc.function}}<br/>
|
||||
{% endif %}
|
||||
{% if agc.mail|length > 0 %}
|
||||
E-Mailadresse: <a href="mailto:{{agc.mail}}">{{agc.mail}}</a><br />
|
||||
{% endif %}
|
||||
|
|
@ -128,7 +131,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal">Schließen</button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,24 +5,19 @@
|
|||
<h3>Supportanfrage stellen</h3>
|
||||
<small>Haben Sie schon in unserem <a href="https://digitale-agentur.com/" target="_blank">Wiki</a> nachgesehen? Dort finden Sie viele Tipps und Anregungen!</small>
|
||||
<hr>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<!-- TODO: Hier ein Modal oä einbauen, damit der Request in Ruhe durchlaufen kann und keine Tickets doppelt verschickt werden. Der JSON-Request dauert so lange, daher könnten Nutzer mehrere Tickets verschicken -->
|
||||
<form method="POST" enctype="multipart/form-data" id="supportform">
|
||||
{% csrf_token %}
|
||||
{{form|crispy}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Supportanfrage verschicken</button>
|
||||
<button type="submit" class="btn btn-primary" id="sendSupport" onclick="deactivateButton()">Supportanfrage verschicken</button>
|
||||
<a href="{% url 'users-dashboard' %}" class="btn">Abbrechen</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
$(document).ready(function() {
|
||||
$('#id_problem').summernote({
|
||||
height: 320,
|
||||
lang: "de-DE",
|
||||
disableDragAndDrop: true
|
||||
});
|
||||
});*/
|
||||
function deactivateButton(){
|
||||
$("#sendSupport").prop("disabled", true);
|
||||
$("#supportform").submit();
|
||||
}
|
||||
</script>
|
||||
{% endblock content %}
|
||||
|
|
@ -1362,7 +1362,7 @@ def support(request):
|
|||
|
||||
}
|
||||
json_data = json.dumps(ostdata)
|
||||
|
||||
|
||||
r = requests.post("https://support.vh-solutions.de/api/http.php/tickets.json", data=json_data, headers=headers)
|
||||
|
||||
# IF request FAILED error-Message
|
||||
|
|
@ -1372,7 +1372,7 @@ def support(request):
|
|||
messages.success(request, f'Supportanfrage erfolgreich! Ihre Ticketnummer ist '+ str(r.json()) +'!')
|
||||
msg_html = render_to_string('users/supportanswer_mail.html', { 'name' : name, 'text' : problem, 'number' : str(r.json())})
|
||||
send_mail("Re: Digitale Agentur: " + str(problemconc) + " [#" + str(r.json()) + "]","Hallo " + name + ", wir haben Ihre Anfrage unter der Ticketnummer " + str(r.json()) + " aufgenommen. Ihre Problembeschreibung: " + problem + " - Vielen Dank. Ihr Team der Digitalen Agentur ",'noreply@digitale-agentur.com',[mail],html_message=msg_html,fail_silently=True)
|
||||
|
||||
|
||||
return render(request, 'users/support_done.html', context)
|
||||
else:
|
||||
|
||||
|
|
@ -1845,14 +1845,13 @@ def cronactionsbill(request, code):
|
|||
if(json.loads(r.text)["voucherStatus"] == "paid"):
|
||||
bill.billstatus="paid"
|
||||
bill.save()
|
||||
mailstatus += "VOUCHERSTATUS BILL CHANGED TO PAID: " + str(bill.pk)
|
||||
mailstatus += "\n VOUCHERSTATUS BILL CHANGED TO PAID: " + str(bill.pk)
|
||||
else:
|
||||
bill.billstatus="open"
|
||||
bill.save()
|
||||
|
||||
|
||||
except:
|
||||
mailstatus += "VOUCHERSTATUS ERROR ON BILL " + str(bill.pk)
|
||||
mailstatus += "\n VOUCHERSTATUS ERROR ON BILL " + str(bill.pk)
|
||||
|
||||
|
||||
# Monatliche Berechnung
|
||||
|
|
@ -2011,13 +2010,13 @@ def cronactionsbill(request, code):
|
|||
email.send()
|
||||
#send_mail('Digitale Agentur | Rechnung', 'Sehr geehrte Nutzer, es wurde eine Rechnung für Ihre Digitale Agentur erstellt. Diese können Sie unter Einstellungen, Abrechnung einsehen.','noreply@digitale-agentur.com',[mail_to_send],html_message=msg_html,fail_silently=True)
|
||||
data.update({"newBill_" + str(agency.pk) : newbill.lexid})
|
||||
mailstatus += "NEW BILL FOR AGENCY " + str(agency.pk)
|
||||
mailstatus += "\n NEW BILL FOR AGENCY " + str(agency.pk)
|
||||
except:
|
||||
mailstatus += "ERROR BY SENDING NEW MAIL TO " + str(agency.pk)
|
||||
mailstatus += "\n ERROR BY SENDING NEW MAIL TO " + str(agency.pk)
|
||||
else:
|
||||
data.update({"status" : "failed"})
|
||||
|
||||
mailstatus += " END "
|
||||
mailstatus += "\n END "
|
||||
send_mail(
|
||||
'DA-CRON: BILLS',
|
||||
mailstatus,
|
||||
|
|
|
|||
Loading…
Reference in New Issue