Bug 4155 Can't change the language of the staff client in prefs
authorFrédéric Demians <f.demians@tamil.fr>
Wed, 17 Feb 2010 21:21:15 +0000 (22:21 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 18 Feb 2010 14:57:19 +0000 (09:57 -0500)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl

index ff9d932..62b5733 100644 (file)
@@ -30,8 +30,8 @@ $( document ).ready( function () {
         $( this.form ).find( '.save-all' ).removeAttr( 'disabled' );
         $( this ).addClass( 'modified' );
         var name_cell = $( this ).parent().parent().find( '.name-cell' );
-
-               if ( !name_cell.find( '.modified-warning' ).length ) name_cell.append( '<em class="modified-warning">(modified)</em>' );
+               if ( !name_cell.find( '.modified-warning' ).length )
+            name_cell.append( '<em class="modified-warning">(modified)</em>' );
         KOHA.Preferences.Modified = true;
     }
 
@@ -40,6 +40,10 @@ $( document ).ready( function () {
             if ( this.defaultValue === undefined || this.value != this.defaultValue ) mark_modified.call( this );
         } ).end()
         .find( 'select.preference' ).change( mark_modified );
+    $('.$preference-checkbox').change( function () {
+        $('.preference-checkbox').addClass('modified');
+        mark_modified.call(this);
+    } );
 
     window.onbeforeunload = function () {
         if ( KOHA.Preferences.Modified ) {
index 37a4c20..1b29d72 100644 (file)
@@ -94,7 +94,6 @@
                     <!-- TMPL_ELSIF NAME="type_languages" -->
                     <dl>
                     <!-- TMPL_LOOP NAME="languages" -->
-                    <dt>
                         <!-- TMPL_IF NAME="plural" -->
                         <dt>
                             <!-- TMPL_IF NAME="native_description" --><!-- TMPL_VAR NAME="native_description" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="rfc4646_subtag" --><!-- /TMPL_IF -->
                         <dd>
                             <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" --> <!-- TMPL_VAR NAME="script_description" --> <!-- TMPL_VAR NAME="region_description" --> <!-- TMPL_VAR NAME="variant_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</label>
                             <!-- TMPL_IF NAME="enabled" -->
-                            <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" checked="checked" />
+                            <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" checked="checked" class="preference preference-checkbox"/>
                             <!-- TMPL_ELSE -->
-                            <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" />
+                            <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" class="preference preference-checkbox"/>
                             <!-- /TMPL_IF -->
                         </dd>
                         <!-- /TMPL_LOOP -->
                         <dt>
                             <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</label>
                             <!-- TMPL_IF NAME="group_enabled" -->
-                            <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" checked="checked" />
+                            <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" checked="checked" class="preference preference-checkbox"/>
                             <!-- TMPL_ELSE -->
-                            <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" />
+                            <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" class="preference preference-checkbox"/>
                             <!-- /TMPL_IF -->
                         </dt>
                         <!-- /TMPL_IF -->