2018-12-18 23:17:57 +01:00
{{ define "Index" }}
<!DOCTYPE html>
< html lang = "pl" >
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< title > Twoj trening< / title > < link rel = "Shortcut icon" href = "img/logo2.jpg" / >
< link href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel = "stylesheet" >
< link rel = "Stylesheet" type = "text/css" href = "/static/css_moje/style_moje.css" / >
< link href = "http://fonts.googleapis.com/css?family=Roboto:400,700,400italic,500italic&subset=latin,latin-ext" rel = "stylesheet" >
< style > b o d y {
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
}< / style >
< script src = "http://code.jquery.com/jquery-1.9.1.js" >
< / script >
2019-01-16 23:47:03 +01:00
< script >
function placeOrder2(form) {
if( validateZIPCode(form["Serie"], form["Serie_help"]) & & validateZIPCode(form["Powtorzenia"], form["Powtorzenia_help"]) & & validateZIPCode(form["Ciezar"], form["Ciezar_help"]) ) {
form.submit()}
else {
alert("Przykro mi, ale podane informacje nie s¹ prawid³owe.");
}
}
function sprawdzanieFormularza(inputField){
var regex=/\d/;
if(regex.test(inputField.value)){
alert("Podaj cyfry");
}
}
function validateZIPCode(inputField, helpText) {
// Najpierw sprawdzamy, czy d³ugoœæ pola jest ró¿na od 5
// Teraz sprawdzamy, czy w polu wpisano liczbê
if (isNaN(inputField.value)) {
// Dane nie s¹ prawid³owe, wyœwietlamy zatem komunikat o b³êdzie
if (helpText != null)
helpText.innerHTML = "Proszê wpisaæ same cyfry.";
return false;
}
else {
// Dane s¹ w porz¹dku, usuwamy komunikat o b³êdzi
if (helpText != null)
helpText.innerHTML = "";
return true;
}
}
2018-12-18 23:17:57 +01:00
< / script >
< / head >
< body >
< div class = "container" >
< div class = "row" >
< nav class = "navbar navbar-default navbar-fixed-top" >
< div class = "container" >
< div class = "navbar-header" >
< button type = "button" class = "navbar-toggle collapsed"
data-toggle="collapse"
data-target="#mainmenu"
aria-expanded="false">
< span class = "sr-only" > Przełącznik nawigacji< / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< / button >
< / div >
< div class = "collapse navbar-collapse navbar-right mainmenu" id = "mainmenu" >
< ul class = "nav navbar-nav" >
2019-01-20 11:32:31 +01:00
2019-01-16 23:47:03 +01:00
< li > < a class = "nav-link" href = "/planer/" > Zaplanuj nowy trening< / a > < / li >
< li > < a class = "nav-link" href = "/wypisz/" > Twoj trening< / a > < / li >
< li > < a class = "btn btn-default" href = "/wyniki/" > Wyniki< / a > < / li >
< li > < a class = "nav-link" href = "/dodajcwiczenie/" > Dodaj ćwiczenie< / a > < / li >
2019-01-20 11:32:31 +01:00
< li > < a class = "nav-link" href = "/wymiary/" > Wymiary< / a > < / li >
2019-01-16 23:47:03 +01:00
< li > < form action = "/logowanie" method = "GET" > < button class = "btn btn-default" style = "height: 50px" value = "brak" name = "cookies" > Wyloguj< / button > < / form > < / li >
2018-12-18 23:17:57 +01:00
< / ul >
< / div >
< / div >
< / nav >
< / div > < br >
< br > < br >
< br >
< div class = "container" >
< div class = "row" >
< div class = "col-xs-12" >
< div class = "table-responsive" >
< table class = "table table-hover" >
2019-01-20 11:32:31 +01:00
2018-12-18 23:17:57 +01:00
< thead style = "background-color: #999999" >
< tr >
< th > Podgląd< / th >
< th > Ćwiczenie< / th >
< th > Ilość serii< / th >
< th > Ilość powtórzeń< / th >
< th > Ciężar< / th >
< th > Akcja< / th >
2019-01-16 23:47:03 +01:00
< th > Akcja< / th >
2018-12-18 23:17:57 +01:00
< / tr >
< / thead >
< tbody >
2019-01-20 11:32:31 +01:00
{{ range . }}
Twój rodzaj treningu to: {{.Rodzaj_treningu}} < form action = "/wypisz/" method = "POST" > < input type = "submit" name = "Akcja" value = "usuntrening" onclick = "placeOrder2(this.form);" / > < / form >
{{ range .Plan }}
2018-12-18 23:17:57 +01:00
< tr > < form action = "/cwiczenie/" method = "GET" >
< td >
< button value = "{{ .Nazwa }}" name = "Nazwa" type = "submit" class = "btn btn-default" > Podgląd< / button > < / td >
< / form >
< form action = "/wypisz/" method = "POST" >
2019-01-20 11:32:31 +01:00
< td > < input type = "text" value = "{{ .Nazwa }}" name = "Nazwa" placeholder = "{{ .Nazwa }}" >
2018-12-18 23:17:57 +01:00
< / td >
2019-01-16 23:47:03 +01:00
< td > < input type = "text" class = "form-control" value = "{{ .Serie }}" name = "Serie" id = "Serie" placeholder = "{{ .Serie }}" onblur = "validateZIPCode(this, document.getElementById('Serie_help'))" >
2018-12-18 23:17:57 +01:00
< / td >
2019-01-16 23:47:03 +01:00
< td > < input type = "text" class = "form-control" value = "{{ .Powtorzenia }}" name = "Powtorzenia" placeholder = "{{ .Powtorzenia }}" onblur = "validateZIPCode(this, document.getElementById('Powtorzenia_help'))" > < / td >
< td > < input type = "text" class = "form-control" id = "Ciezar" value = "{{ .Ciezar }}" name = "Ciezar" placeholder = "{{ .Ciezar }}" onblur = "validateZIPCode(this, document.getElementById('Ciezar_help'))" > < / td >
2018-12-18 23:17:57 +01:00
2019-01-16 23:47:03 +01:00
< td >
< input type = "submit" name = "Akcja" value = "zatwierdz" onclick = "placeOrder2(this.form);" / > < / td >
< td > < input type = "submit" name = "Akcja" value = "usun" onclick = "placeOrder2(this.form);" / > < / div > < / td >
2018-12-18 23:17:57 +01:00
< / form >
< / tr >
2019-01-20 11:32:31 +01:00
{{ end }}{{ end }}
2018-12-18 23:17:57 +01:00
< / tbody >
< / table >
< / div >
< / div >
< / div >
2018-12-31 00:54:28 +01:00
< / div >
< div id = "test1" > < / div >
2018-12-18 23:17:57 +01:00
< / div >
2018-12-31 00:54:28 +01:00
2018-12-18 23:17:57 +01:00
< div class = "container footer" >
< div class = "row" >
< div class = "col-xs-12" >
< p > Wszystkie prawa zastrzeżone. < strong > mój< / strong > produkt © 2015< br >
< small > kontakt@mojprodukt.pl< / small >
< / p >
< / div >
< / div >
< / div >
< script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" > < / script >
< script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" > < / script >
< / body >
< / html >
{{ end }}