diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-08-29 18:24:24 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-08-29 18:24:24 +0200 |
commit | 0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a (patch) | |
tree | 418924df2d8c10698a251b53d9fda2dc86ea18e7 | |
parent | better download html (diff) | |
download | scout-subs-0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a.tar.gz scout-subs-0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a.zip |
school year format, fix overlapping text in docs
Diffstat (limited to '')
-rw-r--r-- | accounts/views.py | 7 | ||||
-rw-r--r-- | client/templates/client/about.html | 52 | ||||
-rw-r--r-- | server/templates/server/download_doc.html | 62 |
3 files changed, 88 insertions, 33 deletions
diff --git a/accounts/views.py b/accounts/views.py index 696391d..230e3e1 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -114,7 +114,12 @@ def personal(request): usercode.home_phone = request.POST["home_phone"] usercode.phone = request.POST["phone"] usercode.school = request.POST["school"] - usercode.year = request.POST["year"] + if request.POST["year"].isdigit(): + usercode.year = request.POST["year"] + else: + error = True + error_text = "L'anno scolastico deve essere un numero" + usercode.save() medic.emer_name = request.POST["emer_name"] diff --git a/client/templates/client/about.html b/client/templates/client/about.html index 64db725..ea32787 100644 --- a/client/templates/client/about.html +++ b/client/templates/client/about.html @@ -9,7 +9,7 @@ {% block content %} <div class="row"> - <div class="col l4 offset-l4 m8 offset-m2 s12"> + <div class="col l6 offset-l3 m8 offset-m2 s12"> <div class="card"> <div class="card-content"> <p> @@ -32,10 +32,60 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <a href=https://www.gnu.org/licenses>https://www.gnu.org/licenses/</a>. </blockquote> + <br> <h5>Codice sorgente</h5> <blockquote> <a href="https://git.thearcway.org/mafaldo/scout-subs/">https://git.thearcway.org/mafaldo/scout-subs/</a> </blockquote> + <br> + <h5>Licenze Open-Source<h5> + <h6>MaterializeCSS <a href="https://github.com/Dogfalo/materialize">https://github.com/Dogfalo/materialize</a> + </h6> + <blockquote> + Copyright (c) 2014-2019 Materialize + <br><br> + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + <br><br> + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + <br><br> + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + </blockquote> + <h6>jQuery <a href="https://github.com/jquery/jquery">https://github.com/jquery/jquery</a> + </h6> + <blockquote> + Copyright OpenJS Foundation and other contributors, <a href="https://openjsf.org/">https://openjsf.org/</a> + <br><br> + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + <br><br> + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + <br><br> + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + </blockquote> </div> </div> </div> diff --git a/server/templates/server/download_doc.html b/server/templates/server/download_doc.html index 3098fe0..fe7cf18 100644 --- a/server/templates/server/download_doc.html +++ b/server/templates/server/download_doc.html @@ -37,59 +37,59 @@ <div class="row"> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.0.user.first_name}}" id="first_name" type="text" > - <label for="first_name">Nome</label> + <label class="active" for="first_name">Nome</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.0.user.last_name}}" id="last_name" type="text" > - <label for="last_name">Cognome</label> + <label class="active" for="last_name">Cognome</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.2.born_date}}" id="birth_date" type="text"> - <label for="birth_date">Data di nascita</label> + <label class="active" for="birth_date">Data di nascita</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.4}}" id="branca" type="text"> - <label for="branca">Branca</label> + <label class="active" for="branca">Branca</label> </div> <div class="input-field col l8 s12"> <input placeholder=" " value="{{doc.2.parent_name}}" id="parent_name" type="text" > - <label for="parent_name">Nome dei genitori</label> + <label class="active" for="parent_name">Nome dei genitori</label> </div> <div class="input-field col l12 s12"> <input placeholder=" " value="{{doc.2.via}}" id="via" type="text" > - <label for="via">Via e numero</label> + <label class="active" for="via">Via e numero</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.2.cap}}" name="cap" id="cap" type="text" > - <label for="cap">CAP</label> + <label class="active" for="cap">CAP</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.2.country}}" name="country" id="country" type="text" > - <label for="country">Paese</label> + <label class="active" for="country">Paese</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.2.nationality}}" name="nationality" id="nationality" type="text" > - <label for="nationality">Nazionalità</label> + <label class="active" for="nationality">Nazionalità</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.2.phone}}" name="phone" id="phone" type="text" > - <label for="phone">Cellulare</label> + <label class="active" for="phone">Cellulare</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.2.home_phone}}" name="home_phone" id="home_phone" type="text" > - <label for="home_phone">Telefono di casa</label> + <label class="active" for="home_phone">Telefono di casa</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.2.email}}" name="email" id="email" type="text" > - <label for="email">Email</label> + <label class="active" for="email">Email</label> </div> <div class="input-field col l8 s12"> <input placeholder=" " value="{{doc.2.school}}" name="school" id="school" type="text" > - <label for="school">Scuola frequentata</label> + <label class="active" for="school">Scuola frequentata</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.2.year}}" name="year" id="year" type="text" > - <label for="year">Classe</label> + <label class="active" for="year">Classe</label> </div> </div> </li> @@ -106,23 +106,23 @@ <div class="row"> <div class="input-field col l6 s12"> <input placeholder=" " name="emer_name" value="{{doc.3.emer_name}}" id="emer_name" type="text" > - <label for="emer_name">Nome e cognome</label> + <label class="active" for="emer_name">Nome e cognome</label> </div> <div class="input-field col l3 s12"> <input placeholder=" " name="emer_relative" value="{{doc.3.emer_relative}}" id="emer_relative" type="text" > - <label for="emer_releative">Parentela</label> + <label class="active" for="emer_releative">Parentela</label> </div> <div class="input-field col l3 s12"> <input placeholder=" " name="cell_phone" value="{{doc.3.cell_phone}}" id="cellphone" type="text" > - <label for="cell_phone">Cellulare</label> + <label class="active" for="cell_phone">Cellulare</label> </div> <div class="input-field col l9 s12"> <input placeholder=" " value="{{doc.3.address}}" name="address" id="address" type="text" > - <label for="address">Indirizzo completo</label> + <label class="active" for="address">Indirizzo completo</label> </div> <div class="input-field col l3 s12"> <input placeholder=" " value="{{doc.3.emer_phone}}" name="emer_phone" id="emer_phone" type="text" > - <label for="emer_phone">Telefono di casa</label> + <label class="active" for="emer_phone">Telefono di casa</label> </div> </div> <div class="row"> @@ -133,15 +133,15 @@ <div class="row"> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.3.health_care}}" name="health_care" id="health_care" type="text" > - <label for="health_care">Cassa Malati</label> + <label class="active" for="health_care">Cassa Malati</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.3.injuries}}" name="injuries" id="injuries" type="text" > - <label for="injuries">Infortuni</label> + <label class="active" for="injuries">Infortuni</label> </div> <div class="input-field col l4 s12"> <input placeholder=" " value="{{doc.3.rc}}" name="rc" id="rc" type="text" > - <label for="rc">Responsabilità civile</label> + <label class="active" for="rc">Responsabilità civile</label> </div> </div> <div class="row"> @@ -161,15 +161,15 @@ </div> <div class="input-field col l6 s12"> <input placeholder=" " value="{{doc.3.medic_name}}" name="medic_name" id="medic_name" type="text" > - <label for="medic_name">Nome e cognome</label> + <label class="active" for="medic_name">Nome e cognome</label> </div> <div class="input-field col l6 s12"> <input placeholder=" " value="{{doc.3.medic_phone}}" name="medic_phone" id="medic_phone" type="text" > - <label for="medic_phone">Telefono studio</label> + <label class="active" for="medic_phone">Telefono studio</label> </div> <div class="input-field col l12 s12"> <input placeholder=" " value="{{doc.3.medic_address}}" name="medic_address" id="medic_address" type="text" > - <label for="medic_address">Indirizzo completo</label> + <label class="active" for="medic_address">Indirizzo completo</label> </div> </div> <div class="row"> @@ -178,19 +178,19 @@ </div> <div class="input-field col s12"> <input placeholder=" " value="{{doc.3.sickness}}" name="sickness" id="sickness" type="text"> - <label for="sickness">Principali malattie avute</label> + <label class="active" for="sickness">Principali malattie avute</label> </div> <div class="input-field col l8 s12"> <input placeholder=" " value="{{doc.3.vaccine}}" name="vaccine" id="vaccine" type="text"> - <label for="vaccine">Vacinazioni fatte</label> + <label class="active" for="vaccine">Vacinazioni fatte</label> </div> <div class="input-field col l4 s12"> - <label for="tetanus_date">Ultima vacinazione contro il tetano</label> + <label class="active" for="tetanus_date">Ultima vacinazione contro il tetano</label> <input placeholder=" " value="{{doc.3.tetanus_date}}" name="tetanus_date" id="tetanus_date" type="text"> </div> <div class="input-field col s12"> <input placeholder=" " value="{{doc.3.allergy}}" name="allergy" id="allergy" type="text"> - <label for="allergy">Allergie particolari/Intolleraze alimentari</label> + <label class="active" for="allergy">Allergie particolari/Intolleraze alimentari</label> </div> <div class="switch col s12"> Deve assumere regolarmente medicamenti @@ -203,7 +203,7 @@ </div> <div class="input-field col s12"> <input placeholder=" " value="{{doc.3.drugs}}" name="drugs" id="drugs" type="text"> - <label for="drugs">Se sì quali, in che dosi e prescrizioni</label> + <label class="active" for="drugs">Se sì quali, in che dosi e prescrizioni</label> </div> <div class="switch col s12"> Informazioni particolari sullo stato di salute: (postumi di operazioni, incidenti, malattie, disturbi fisici) @@ -216,7 +216,7 @@ </div> <div class="input-field col s12"> <input placeholder=" " value="{{doc.3.misc}}" name="misc" id="misc" type="text"> - <label for="misc">Se sì quali</label> + <label class="active" for="misc">Se sì quali</label> </div> </div> </li> |