aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2015-03-19 22:51:44 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2015-03-19 22:51:44 -0400
commit9d00ec877be9f5635b0f8a6f46016519d67a2251 (patch)
tree8edd67e5c0333e5220cb248173f68441ca04c16f
parent0d7cdc42f03a4ab4f8dc16a8b52172af3569e34a (diff)
downloadwedding-website-9d00ec877be9f5635b0f8a6f46016519d67a2251.tar.gz
started to hook up the javascript
-rw-r--r--static/wedding.js20
-rw-r--r--templates/login.htm20
2 files changed, 31 insertions, 9 deletions
diff --git a/static/wedding.js b/static/wedding.js
new file mode 100644
index 0000000..1a61f17
--- /dev/null
+++ b/static/wedding.js
@@ -0,0 +1,20 @@
+$("input:radio[name=language]").change(function(){
+ if($(this).val()=="fr"){
+ $("#lab-lang").text("Langue:");
+ $("label[for=name]").text("Prenom:");
+ $("label[for=password]").text("Mot de Passe:");
+ $("button[name=login]").text("Entrer");
+ }
+ if($(this).val()=="en"){
+ $("#lab-lang").text("Language:");
+ $("label[for=name]").text("Name:");
+ $("label[for=password]").text("Password:");
+ $("button[name=login]").text("Login");
+ }
+ if($(this).val()=="sr"){
+ $("#lab-lang").text("Jezik:");
+ $("label[for=name]").text("Ime:");
+ $("label[for=password]").text("Sifra:");
+ $("button[name=login]").text("Login");
+ }
+});
diff --git a/templates/login.htm b/templates/login.htm
index 69f056c..df43728 100644
--- a/templates/login.htm
+++ b/templates/login.htm
@@ -16,17 +16,19 @@
<form id = "connection" action="/login/" role="form"
class="form-horizontal" method="post">
<div class="form-group">
- <label for="language" class="col-md-4 control-label">Language:</label>
+ <label id="lab-lang" class="col-md-4 control-label">Language:</label>
<div class="col-md-8">
- <label class="radio-inline">
- <input type="radio" value="en" name="language" checked>English
+ <label id="lang-en" class="radio-inline">
+ <input type="radio" value="en" name="language" checked>
+ English
</label>
- <label class="radio-inline">
- <input type="radio" value="fr" name="language">Francais
- </label>
- <label class="radio-inline">
- <input type="radio" value="sr" name="language">Nasi
+ <label id="lang-fr" class="radio-inline">
+ <input id="lang-fr" type="radio" value="fr" name="language">
+ Francais
</label>
+ <label for="lang-sr" class="radio-inline">
+ <input id="lang-sr" type="radio" value="sr" name="language">
+ Nasi</label>
</div>
<br/>
</div>
@@ -56,6 +58,6 @@
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
- <script type="text/javascript" src="/static/wedding.js"></script>
+ <script type="text/javascript" src="{{url_for('static', filename='wedding.js')}}"></script>
</body>
</html>