Skip to content
Snippets Groups Projects
Commit 9e94e81e authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Include datepicker in aub form [NOT FINISHED]

parent e77c3aab
No related branches found
No related tags found
1 merge request!86Merge school-apps
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="Django default" read-only="true" uuid="ef6730d6-e849-4772-acac-62469acab4d2">
<driver-ref>mysql</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<remarks>$PROJECT_DIR$/schoolapps/schoolapps/settings.py</remarks>
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://localhost:3306/schoolapps</jdbc-url>
<driver-properties>
<property name="autoReconnect" value="true" />
<property name="zeroDateTimeBehavior" value="convertToNull" />
<property name="tinyInt1isBit" value="false" />
<property name="characterEncoding" value="utf8" />
<property name="characterSetResults" value="utf8" />
<property name="yearIsDateType" value="false" />
</driver-properties>
</data-source>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
......@@ -2,6 +2,7 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/../bwinf-36-2/.idea/bwinf-36-2.iml" filepath="$PROJECT_DIR$/../bwinf-36-2/.idea/bwinf-36-2.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/school-apps.iml" filepath="$PROJECT_DIR$/.idea/school-apps.iml" />
</modules>
</component>
......
......@@ -16,6 +16,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jquery-3.2.1" level="application" />
<orderEntry type="module" module-name="bwinf-36-2" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
# Generated by Django 2.0 on 2017-12-22 16:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('aub', '0003_auto_20171221_1206'),
]
operations = [
migrations.AlterModelOptions(
name='aub',
options={'permissions': (('apply_for_aub', 'Apply for a AUB'), ('allow_request', 'Allow a request'),
('check_request', 'Check a request'))},
),
]
# Generated by Django 2.0 on 2017-12-22 16:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('aub', '0004_auto_20171222_1722'),
]
operations = [
migrations.AlterModelOptions(
name='aub',
options={'permissions': (
('apply_for_aub', 'Apply for a AUB'), ('allow_aub', 'Allow a AUB'), ('check_aub', 'Check a AUB'))},
),
]
# Generated by Django 2.0 on 2017-12-22 16:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('aub', '0005_auto_20171222_1723'),
]
operations = [
migrations.RemoveField(
model_name='aub',
name='from_lesson',
),
migrations.RemoveField(
model_name='aub',
name='to_lesson',
),
]
# Generated by Django 2.0 on 2017-12-22 16:38
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('aub', '0006_auto_20171222_1736'),
]
operations = [
migrations.RemoveField(
model_name='aub',
name='from_date',
),
migrations.RemoveField(
model_name='aub',
name='from_time',
),
migrations.RemoveField(
model_name='aub',
name='to_date',
),
migrations.RemoveField(
model_name='aub',
name='to_time',
),
migrations.AddField(
model_name='aub',
name='from_dt',
field=models.DateTimeField(default=django.utils.timezone.now),
),
migrations.AddField(
model_name='aub',
name='to_dt',
field=models.DateTimeField(default=django.utils.timezone.now),
),
]
......@@ -5,6 +5,26 @@
<form action="" method="post">
{% csrf_token %}
<p class="flow-text red-text">
{{ form.non_field_errors }}
</p>
<div class="input-field">
<p class="red-text">{{ form.from_dt.errors }}</p>
<input id="{{ form.from_dt.id_for_label }}" type="text" name="{{ form.from_dt.html_name }}"
class="datepicker">
<label for="{{ form.from_dt.id_for_label }}">Beginn der Befreiung</label>
<span>{{ form.from_dt.help_text }}</span>
</div>
<div class="input-field">
<p class="red-text">{{ form.to_dt.errors }}</p>
<input id="{{ form.to_dt.id_for_label }}" type="text" name="{{ form.to_dt.html_name }}" class="datepicker">
<label for="{{ form.to_dt.id_for_label }}">Ende der Befreiung</label>
<span>{{ form.to_dt.help_text }}</span>
</div>
<table>
{{ form }}
</table>
......
# Generated by Django 2.0 on 2017-12-22 16:22
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0004_notification'),
]
operations = [
migrations.AlterField(
model_name='notification',
name='to',
field=models.ManyToManyField(related_name='notifications', to=settings.AUTH_USER_MODEL),
),
]
......@@ -23,7 +23,28 @@
<script src="{% static 'materialize/dist/js/materialize.min.js' %}"></script>
<script>
$(document).ready(function () {
// Initialize sidenav [MAT]
$(".sidenav").sidenav();
// Initialize datepicker [MAT]
$('.datepicker').datepicker({
// Translate to German
i18n: {
months: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
monthsShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
weekdays: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
weekdaysShort: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
weekdaysAbbrev: ['S', 'M', 'D', 'M', 'D', 'F', 'S'],
// Buttons
today: 'Heute',
clear: 'Löschen',
done: 'OK',
},
// Set monday as first day of week
firstDay: 1
});
});
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment