-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f094d68
commit 4770d95
Showing
19 changed files
with
251 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from django import template | ||
from django.forms.boundfield import BoundField | ||
|
||
register = template.Library() | ||
|
||
|
||
@register.filter(name="is_fieldset") | ||
def is_fieldset(field: BoundField) -> bool: | ||
return True if field in ["genero", "agendamento_fixo"] else False | ||
|
||
|
||
@register.filter(name="set_label") | ||
def set_label(field: BoundField) -> str: | ||
|
||
fields = {"genero": "Gênero", "agendamento_fixo": "Agendamento Fixo"} | ||
|
||
return f"{fields[field.name]} *" if field.errors else fields[field.name] | ||
|
||
|
||
@register.filter(name="set_column_input") | ||
def set_column_input(field: BoundField) -> str: | ||
|
||
fields = { | ||
"nome": "col-5", | ||
"data_de_nascimento": "col-1", | ||
"genero": "col-5", | ||
"cartao_sus": "col-2", | ||
"agendamento_fixo": "col-5", | ||
"telefone": "col-2", | ||
"rua": "col-5", | ||
"numero": "col-2", | ||
"complemento": "col-4", | ||
"ponto_referencia": "col-4", | ||
} | ||
|
||
return fields[field.name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
.form_row { | ||
position: relative; | ||
border-radius: 5px; | ||
background-color: #f9fafc; | ||
padding: 30px; | ||
} | ||
|
||
.form_row h2 { | ||
text-align: center; | ||
} | ||
|
||
.form_row .error { | ||
color: #FF204E; | ||
/* color: red; */ | ||
font-weight: bold; | ||
} | ||
|
||
.form_row .error ul { | ||
list-style-type: none; | ||
margin: 0; | ||
padding: 0; | ||
font-style: italic; | ||
} | ||
|
||
.form_row input:focus { | ||
outline: none; | ||
} | ||
|
||
.form_row label { | ||
font-size: 20px; | ||
} | ||
|
||
.form_row input { | ||
box-shadow: 0 5px 25px 0 rgba(30, 30, 30, 0.15); | ||
/* appearance: none; */ | ||
border-color: transparent; | ||
font-size: 18px; | ||
} | ||
|
||
.form_row input::placeholder { | ||
/* font-weight: bold; */ | ||
/* opacity: 0.5; */ | ||
opacity: 1.5; | ||
color: #079c7e; | ||
} | ||
|
||
.form_row fieldset { | ||
border: 2px solid black; | ||
border-radius: 8px; | ||
padding: 20px; | ||
} | ||
|
||
.form_row legend { | ||
font-size: 20px; | ||
} | ||
|
||
.form_row input[type=text] { | ||
color: #079c7e; | ||
border-radius: 4px; | ||
border: none; | ||
width: 100%; | ||
padding: 5px 20px; | ||
/* margin: 8px 0; */ | ||
box-sizing: border-box; | ||
} | ||
|
||
.form_row input[type=number] { | ||
color: #079c7e; | ||
border-radius: 4px; | ||
border: none; | ||
width: 100%; | ||
padding: 5px 20px; | ||
/* margin: 8px 0; */ | ||
box-sizing: border-box; | ||
} | ||
|
||
.form_row input[type=date] { | ||
color: #079c7e; | ||
padding: 5px 20px; | ||
border-radius: 4px; | ||
border: none; | ||
/* margin: 8px 0; */ | ||
box-sizing: border-box; | ||
} | ||
|
||
.form_row input[type=submit] { | ||
width: 100%; | ||
background-color: #079c7e; | ||
cursor: pointer; | ||
padding: 13px 35px; | ||
border-radius: 5px; | ||
border: none; | ||
color: white !important; | ||
font-size: 16px; | ||
font-weight: 500; | ||
text-transform: uppercase; | ||
margin: 20px 0px 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.