Commit 437ef536 authored by David Haynes's avatar David Haynes 🙆
Browse files

default date is tomorrow, and div is shorter

- thanks to mrodgerfor doing the date calculation and looking at settings and
to dbond for the div change suggestion
- ...
- but mostly :dhaynes: for keeping everything from burning /s
parent 098c489c
...@@ -93,6 +93,7 @@ class URLForm(forms.ModelForm): ...@@ -93,6 +93,7 @@ class URLForm(forms.ModelForm):
options={ options={
"format": "MM-DD-YYYY", "format": "MM-DD-YYYY",
"pickTime": False, "pickTime": False,
"defaultDate": (datetime.date.today() + datetime.timedelta(hours=24)).strftime("%m-%d-%Y"),
}, },
icon_attrs={ icon_attrs={
"class": "fa fa-calendar", "class": "fa fa-calendar",
...@@ -112,9 +113,6 @@ class URLForm(forms.ModelForm): ...@@ -112,9 +113,6 @@ class URLForm(forms.ModelForm):
self.helper.label_class = 'col-md-1' self.helper.label_class = 'col-md-1'
self.helper.field_class = 'col-md-6' self.helper.field_class = 'col-md-6'
#Set Custom Date field initial value to the current date.
self.fields['expires_custom'].initial = datetime.date.today().strftime("%m-%d-%Y")
# The main "layout" defined # The main "layout" defined
self.helper.layout = Layout( self.helper.layout = Layout(
Fieldset('', Fieldset('',
...@@ -150,7 +148,7 @@ class URLForm(forms.ModelForm): ...@@ -150,7 +148,7 @@ class URLForm(forms.ModelForm):
<h4>Set when you would like your Go address to expire:</h4> <h4>Set when you would like your Go address to expire:</h4>
<br />"""), <br />"""),
'expires', 'expires',
'expires_custom', Field('expires_custom', template="crispy/customField.html"),
style="background: rgb(#F6F6F6);"), style="background: rgb(#F6F6F6);"),
active=True, active=True,
template='crispy/accordian-group.html'), template='crispy/accordian-group.html'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment