LP#1613381: combine two tables in patron notification preferences
authorGalen Charlton <gmc@esilibrary.com>
Mon, 15 Aug 2016 18:07:21 +0000 (14:07 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 18 Aug 2016 20:05:47 +0000 (16:05 -0400)
This patch consolidates the two tables in the public catalog
notification preferences page into one table, as patrons have
no reason to care about the distinction between A/T opt-in
settings and the hold, phone, and SMS user settings.

This patch also adds a <label> element for opt-in setting
names.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
docs/RELEASE_NOTES_NEXT/OPAC/combine_notice_prefs_tables.adoc [new file with mode: 0644]

index d938773..47b7f72 100644 (file)
                 </td>
             </tr>
             [% END %]
-        </tbody>
-    </table>
-
-    [% IF ctx.opt_in_settings.size > 0 %]
-    <div class='user_opt_in_settings'>
-      <table>
-        <thead><tr>
-            <th>[% l('Notification Type') %]</th>
-            <th>[% l('Enabled') %]</th>
-        </tr></thead>
-        <tbody class='data_grid'>
             [% FOR optin IN ctx.opt_in_settings %]
-                <tr>
-                    <td>[% optin.cust.label | html %]</td>
-                    <td>
-                        <input type='checkbox' name='setting' 
-                            value='[% optin.cust.name | uri %]' 
-                            title="[% optin.cust.label | html %]"
-                            [% IF optin.value %] checked='checked' [% END %]/>
-                    </td>
-                </tr>
+            <tr>
+                <td><label for='[% optin.cust.name | uri %]'>[% optin.cust.label | html %]</label></td>
+                <td>
+                    <input type='checkbox' name='setting' 
+                        value='[% optin.cust.name | uri %]' 
+                        id='[% optin.cust.name | uri %]' 
+                        title="[% optin.cust.label | html %]"
+                        [% IF optin.value %] checked='checked' [% END %]/>
+                </td>
+            </tr>
             [% END %]
         </tbody>
-      </table>
-    </div>
-    [% END %]
+    </table>
+
     <input type='submit' value="[% l('Save') %]" class="opac-button" />
 </form>
 [% END %]
diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/combine_notice_prefs_tables.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/combine_notice_prefs_tables.adoc
new file mode 100644 (file)
index 0000000..d9e4b29
--- /dev/null
@@ -0,0 +1,7 @@
+Merge Notification Preferences Tables in TPAC
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The patron notification preference page in the public catalog
+used to have two tables, separating notification settings
+based on their source. Since that distinction does not matter
+to patrons, and since the two tables aren't styled consistently,
+they are merged together.