Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add location controller for printing envelopes #40

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def get_context_data(self, **kwargs):
context.update({
'report_titles': self.request.GET.get('reportTitle', '').split('\n'),
'report_dates': self.request.GET.get('reportDate', '').split('\n'),
'sender_color': self.request.GET.get('senderColor', '#000000'),
'sender_inner_width': self.request.GET.get('senderInnerWidth', '12rem'),
'sender_outer_width': self.request.GET.get('senderOuterWidth', '22rem'),
'meet_slug': self.request.GET.get('meet', ''),
'families': families,
'newLines': range(int(self.request.GET.get('newLines', '2'))),
Expand Down
9 changes: 0 additions & 9 deletions attendees/static/css/attendingmeet_envelopes_list_view.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ div.d-flex {
display: flex;
}

div.sender {
flex-basis: 25rem;
}

h6.center-text {
text-align: center;
width: 22rem;
}

div.recipient:hover {
background: LightSkyBlue;
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ Attendees.attendingmeetPrintConfiguration = {
{
dataField: "reportTitle",
editorType: 'dxTextArea',
helpText: '(Optional) Sender address line 1 on envelope, or the Title on reports. Enter for new lines.',
label: {
text: 'Text 1',
},
editorOptions: {
height: 100,
autoResizeEnabled: true,
value: 'Sample title',
showClearButton: true,
Expand All @@ -56,10 +58,12 @@ Attendees.attendingmeetPrintConfiguration = {
{
dataField: "reportDate",
editorType: 'dxTextArea',
helpText: '(Optional) Sender address line 2 on envelope, or the date on reports.',
label: {
text: 'Text 2',
},
editorOptions: {
height: 70,
autoResizeEnabled: true,
value: new Date().toLocaleDateString('en', { day: '2-digit', month: 'long', year: 'numeric' }),
showClearButton: true,
Expand Down Expand Up @@ -107,7 +111,7 @@ Attendees.attendingmeetPrintConfiguration = {
},
{
dataField: 'showPaused',
helpText: 'show paused participations in report',
helpText: 'show paused participations in reports',
label: {
text: 'Show paused participations?',
},
Expand All @@ -116,9 +120,9 @@ Attendees.attendingmeetPrintConfiguration = {
},
{
dataField: 'newLines',
helpText: 'Number of new lines above the recipient label on envelopes',
helpText: 'Number of new lines above the recipient label on envelopes only',
label: {
text: '# of new lines above recipient',
text: '# of new lines above recipient on envelope',
},
dataType: 'number',
editorType: 'dxNumberBox',
Expand All @@ -128,6 +132,37 @@ Attendees.attendingmeetPrintConfiguration = {
showClearButton: true,
},
},
{
dataField: 'senderColor',
helpText: 'Change the color of the sender address on envelopes only',
label: {
text: 'Color of the sender on envelopes',
},
editorType: 'dxColorBox',
editorOptions: {
value: '#0062AE',
},
},
{
dataField: 'senderInnerWidth',
helpText: 'The inner width of the sender address controls its position, controls the left margin of the sender address. it should be smaller than outer width. Better to bigger than 16rem',
label: {
text: 'Inner width of the sender on envelopes',
},
editorOptions: {
value: '17rem',
},
},
{
dataField: 'senderOuterWidth',
helpText: 'The inner width of the sender address controls its position, controls the left margin of the recipient address. it should be bigger than inner width. Better to smaller than 29rem',
label: {
text: 'Outer width of the sender on envelopes',
},
editorOptions: {
value: '19rem',
},
},
{
dataField: 'divisions',
editorType: 'dxTagBox',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
{% for folk in families %}
{% if folk.families and folk.families|length > 0 %}
<div class="d-flex">
<div class="sender">
<h6 class="center-text">
<div class="sender"
style="flex-basis: {{sender_outer_width}};">
<h6 class="center-text"
style="color:{{sender_color}}; width:{{sender_inner_width}}; text-align: center;">
{% for report_title in report_titles %}
{{ report_title }}
<br>
Expand Down
Loading