Commit 3f3b3495 by Kyle Fiedler

Added form and changes button to input so that users could hit enter on language and location

parent 3c8f64f5
...@@ -29,8 +29,8 @@ $(function() { ...@@ -29,8 +29,8 @@ $(function() {
loc=false; loc=false;
$("#location_sub").html('<input id="id_loc_text" type="text" name="loc_text" />'+ $("#location_sub").html('<form>'+'<input id="id_loc_text" type="text" name="loc_text" />'+
'<input type="button" id="change_loc_button" value="Change" />'); '<input type="submit" id="change_loc_button" value="Change" />'+'</form>');
$("#change_loc_button").click(function() { $("#change_loc_button").click(function() {
$("#change_location").show(); $("#change_location").show();
...@@ -50,8 +50,8 @@ $(function() { ...@@ -50,8 +50,8 @@ $(function() {
if(lang) { if(lang) {
lang=false; lang=false;
$("#language_sub").html('<input id="id_lang_text" type="text" name="lang_text" />'+ $("#language_sub").html('<form>'+'<input id="id_lang_text" type="text" name="lang_text" />'+
'<input type="button" id="change_lang_button" value="Change" />'); '<input type="submit" id="change_lang_button" value="Change" />'+'</form>');
$("#change_lang_button").click(function() { $("#change_lang_button").click(function() {
$("#change_language").show(); $("#change_language").show();
postJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) { postJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment