Skip to content

Commit

Permalink
small improvements here and there
Browse files Browse the repository at this point in the history
  • Loading branch information
tobru committed May 30, 2024
1 parent 1a4c61c commit 73a0c8b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
14 changes: 6 additions & 8 deletions contactform/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class LeadForm(FlaskForm):
job_position = StringField("Job Position")
phone = TelField()
country = SelectField("Country", choices=load_countries(odoo_client))
notes = TextAreaField("What can VSHN help you with?")
notes = TextAreaField("What can VSHN help you with?", render_kw={"rows": 5})
submit = SubmitField()


Expand Down Expand Up @@ -140,12 +140,8 @@ def index():
logging.error(f"Couldn't create Lead in Odoo: {e}")

if config.PRINTING_ENABLED:
name_splitted = form.name.data.replace(" ","\n")
label_text = (
f"{config.LABEL_HEADER}\n"
"☺☺☺\n"
f"{name_splitted}"
)
name_splitted = form.name.data.replace(" ", "\n")
label_text = f"{config.LABEL_HEADER}\n" "☺☺☺\n" f"{name_splitted}"

parameters = LabelParameters(
configuration=printer_config,
Expand Down Expand Up @@ -190,7 +186,9 @@ def config_endpoint():

if form.validate_on_submit():
try:
config.CAMPAIGN_ID = odoo_client.find_id_by_name("utm.campaign", form.campaign_name.data)
config.CAMPAIGN_ID = odoo_client.find_id_by_name(
"utm.campaign", form.campaign_name.data
)
config.CAMPAIGN_NAME = form.campaign_name.data
config.PRINTING_ENABLED = form.printing_enabled.data
config.ODOO_CREATELEAD_ENABLED = form.odoo_leadcreation_enabled.data
Expand Down
19 changes: 18 additions & 1 deletion contactform/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@

@media (max-width: 767px) {
.bg-image {
background-image: url('/static/images/background-mobile.webp');
background-image: none;
background-color: #4081CB;
}
}

.container {
max-width: 850px;
}

.form-label {
color: white;
}

footer {
color: white;
}

footer a {
color: white;
}
Binary file modified contactform/static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion contactform/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<footer class="text-center m-5">
{% block footer %}
<small> &copy;
<script>document.write(new Date().getFullYear())</script> <a href="https://www.vshn.ch">VSHN</a>
<script>document.write(new Date().getFullYear())</script> <a href="https://www.vshn.ch">VSHN AG</a> - Made
with <a href="https://github.com/vshn/conferenceli/" target="_blank">conferenceli</a>
</small>
{% endblock %}
</footer>
Expand Down

0 comments on commit 73a0c8b

Please sign in to comment.