diff --git a/dist/main.bundle.js b/dist/main.bundle.js index de6f73de..008e3485 100644 --- a/dist/main.bundle.js +++ b/dist/main.bundle.js @@ -73,6 +73,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_css__); + $(function () { setInterval(function() { @@ -84,6 +85,12 @@ $(function () { } $("#timeleft").html(timeleft) }, 1000); + + $("#reloadCaptcha").on("click",function(eventObject) { + image = eventObject.currentTarget; + + setSrcQuery(document.getElementById('image'), "reload=" + (new Date()).getTime()); + }); $("#myInput").on("keyup", function(eventObject) { @@ -132,6 +139,10 @@ $(function () { $(".karmen-ajax-delete").on("click", deleteHandler); + $("#reset_responses").on("click", function(eventObject) { + $('.form-check-input').removeAttr('checked'); + }); + }); @@ -143,4 +154,4 @@ $(function () { /***/ }) /******/ ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgZjVjMjdhYTFjNWFjNTQ0ZTIzNWIiLCJ3ZWJwYWNrOi8vLy4vc3JjL2luZGV4LmpzIiwid2VicGFjazovLy8uL3NyYy9zdHlsZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtRQUFBO1FBQ0E7O1FBRUE7UUFDQTs7UUFFQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQTs7UUFFQTtRQUNBOztRQUVBO1FBQ0E7O1FBRUE7UUFDQTtRQUNBOzs7UUFHQTtRQUNBOztRQUVBO1FBQ0E7O1FBRUE7UUFDQTtRQUNBO1FBQ0E7UUFDQTtRQUNBO1FBQ0E7UUFDQSxLQUFLO1FBQ0w7UUFDQTs7UUFFQTtRQUNBO1FBQ0E7UUFDQSwyQkFBMkIsMEJBQTBCLEVBQUU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uKHJlc3VsdCkge1xuXHRcdCAgICBtb2RhbEVsLm1vZGFsKCdoaWRlJyk7XG5cdFx0ICAgIHdpbmRvdy5sb2NhdGlvbi5yZXBsYWNlKHJlc3VsdC5yZWRpcmVjdF91cmwpO1xuXHRcdH1cblx0ICAgIH0pO1xuXHQgICAgXG5cdH0pO1xuXHRcblx0cmV0dXJuIGZhbHNlO1xuICAgIH07XG4gICAgXG4gICAgJChcIi5rYXJtZW4tYWpheC1kZWxldGVcIikub24oXCJjbGlja1wiLCBkZWxldGVIYW5kbGVyKTtcblxuICAgICQoXCIjcmVzZXRfcmVzcG9uc2VzXCIpLm9uKFwiY2xpY2tcIiwgZnVuY3Rpb24oZXZlbnRPYmplY3QpIHtcblx0JCgnLmZvcm0tY2hlY2staW5wdXQnKS5yZW1vdmVBdHRyKCdjaGVja2VkJyk7XG4gICAgfSk7XG4gICAgXG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2luZGV4LmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8vIHJlbW92ZWQgYnkgZXh0cmFjdC10ZXh0LXdlYnBhY2stcGx1Z2luXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9zcmMvc3R5bGUuY3NzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/orm/response.go b/orm/response.go index 37084911..925a0ec0 100644 --- a/orm/response.go +++ b/orm/response.go @@ -243,6 +243,9 @@ func (model *Response) Update(db *Database, args map[string]string, w http.Respo if !response.(*Response).IsActive() { return nil, errors.OutOfTime } + + response.(*Response).SingleResponses = make([]*SingleResponse, 0) + err = renderer.Decode(response, r) if err != nil { return nil, err diff --git a/src/index.js b/src/index.js index af767544..9d35fc28 100644 --- a/src/index.js +++ b/src/index.js @@ -66,4 +66,8 @@ $(function () { $(".karmen-ajax-delete").on("click", deleteHandler); + $("#reset_responses").on("click", function(eventObject) { + $('.form-check-input').removeAttr('checked'); + }); + }); diff --git a/templates/layout/login.html.tpl b/templates/layout/login.html.tpl index 4238442f..abb81010 100644 --- a/templates/layout/login.html.tpl +++ b/templates/layout/login.html.tpl @@ -37,7 +37,7 @@ diff --git a/templates/responses_add_update.html.tpl b/templates/responses_add_update.html.tpl index d1879c45..ce1bdb5e 100644 --- a/templates/responses_add_update.html.tpl +++ b/templates/responses_add_update.html.tpl @@ -46,7 +46,7 @@ {{if isResponseIn $answer.ID $.Data.AnswersIDs}} {{$checked = true}} {{end}} - + @@ -75,7 +75,7 @@ {{- end -}} - {{if $isAdmin}}{{end}} + {{if $isAdmin}}{{end}}