Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add some additional CSS classes for form errors.

Roland Geiderfe30dbf5bd31
diff --git a/manager/static/css/manager-custom.css b/manager/static/css/manager-custom.css
index 2401ceeb3..f953cd364 100644
--- a/manager/static/css/manager-custom.css
+++ b/manager/static/css/manager-custom.css
@@ -141,3 +141,23 @@ circle:hover{
circle{
cursor: pointer;
}
+
+
+/*
+ * Classes Error form
+ *
+ * 'form-error' is inserted by the JQuery form validator and the styling
+ * is copied from the yaml ones, for consistency
+ */
+.ym-form .form-error {
+ color: #880000;
+}
+.ym-form label.form-error {
+ font-weight: bold;
+}
+
+.ym-form input.form-error {
+ box-shadow: none;
+ background-color: #880000;
+ color: black;
+}
\ No newline at end of file
diff --git a/manager/static/js/workout-manager.js b/manager/static/js/workout-manager.js
index daf294dff..8609fd707 100644
--- a/manager/static/js/workout-manager.js
+++ b/manager/static/js/workout-manager.js
@@ -303,6 +303,7 @@ function init_edit_set()
{
// Validate the form with JQuery
$(".ym-form").validate({
+ errorClass:'form-error',
rules: {
sets: {
required: true,