diff --git a/views/settings.tpl b/views/settings.tpl index 6dcb3a8b1..d1f842175 100644 --- a/views/settings.tpl +++ b/views/settings.tpl @@ -39,6 +39,9 @@
+
+

Some fields are in error and you can't save settings until you have corrected them.

+
@@ -441,12 +444,12 @@ %end
- +
- +
@@ -462,12 +465,12 @@ %end
- +
- +
@@ -529,7 +532,7 @@ .tab() ; - $('a:not(.tabs), button:not(.cancel, .submit)').click(function(){ + $('a:not(.tabs), button:not(.cancel)').click(function(){ $('#loader').addClass('active'); }) @@ -583,9 +586,16 @@ }, inline : true, on : 'blur', + onValid: function(){ + $('#form_validation_error').hide(); + $('.submit').removeClass('disabled'); + }, + onInvalid: function(){ + $('#form_validation_error').show(); + $('.submit').addClass('disabled'); + }, onFailure: function(){ return false; - alert('Some fields are in error'); }, onSuccess: function(){ $('#loader').addClass('active'); @@ -599,4 +609,13 @@ $('#settings_languages').dropdown('setting', 'onChange', function(){ $('.form').form('validate field', 'settings_subliminal_languages'); }); + + $('.submit').click(function() { + alert('Settings saved.'); + }) + + $( document ).ready(function() { + $('.form').form('validate form'); + $('#loader').removeClass('active'); + }); \ No newline at end of file