LP#1527342 Improve display of C/O history delete warning
authorBill Erickson <berickxx@gmail.com>
Thu, 25 Feb 2016 18:52:29 +0000 (13:52 -0500)
committerKathy Lussier <klussier@masslnc.org>
Fri, 26 Feb 2016 00:22:52 +0000 (19:22 -0500)
Move the history warning to the top of the form for visbility and avoid
displaying the success message when the warning is also displayed.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/opac/myopac/prefs_settings.tt2

index edefb5c..e98f6dd 100644 (file)
             title="[% l('Search and History Preferences') %]">
             <tbody>
 
-                [% IF ctx.updated_user_settings %]
+                [% IF ctx.confirm_history_delete %]
+                <tr><td colspan='2'>
+                  <div id='clear-history-confirm' class='renew-summary'>
+                  [% l('Disabling checkout or holds history will permanently remove all items from your history.') %]
+                  <br/>
+                  [% l('Are you sure you wish to continue?') %]
+                  </div>
+                  <a href="[% mkurl() %]">[% l('Cancel') %]</a>
+                  <input type='hidden' name='history_delete_confirmed' value='1'/>
+                  <input type="submit" value="[% l('Confirm') %]" class="opac-button"/>
+                </td></tr>
+                [% ELSIF ctx.updated_user_settings %]
                 <tr><td colspan='2'>
                     <div class='renew-summary'>
                         [% l('Account Successfully Updated') %]
 
             </tbody>
         </table>
-        [% IF ctx.confirm_history_delete %]
-        <div id='clear-history-confirm'>
-        [% l('Disabling checkout or holds history will permanently remove all items from your history.') %]
-        <br/>
-        [% l('Are you sure you wish to continue?') %]
-        </div>
-        <a href="[% mkurl() %]">[% l('Cancel') %]</a>
-        <input type='hidden' name='history_delete_confirmed' value='1'/>
-        <input type="submit" value="[% l('Confirm') %]" class="opac-button"/>
-        [% ELSE %]
+        [% IF !ctx.confirm_history_delete %]
         <input type="submit" value="[% l('Save') %]" class="opac-button"/>
         [% END %]
     </form>