[Koha-patches] [PATCH] Bug 3934 - move test prediction pattern button

Owen Leonard oleonard at myacpl.org
Mon Aug 19 18:35:58 CEST 2013


On the subscription add/edit screen the buttons related to numbering
patterns are grouped with the "save" button, which is potentially
confusing. This patch moves the buttons into the "serials planning"
region so they are visually grouped with related functionality.

Unrelated changes: Removed a few redundant "javascript:"
pseudo-protocols from event handlers, and added a "Cancel" link.

To test, edit an existing subscription and confirm that the prediction
pattern buttons are grouped inside the "serials planning" region.
Confirm that each button triggers the correct event. Confirm that
clicking the "cancel" link returns you to the subscription detail view.

Also test creating a new subscription. Again buttons should work
correctly. The "Cancel" link should return you to the Serials module
home page.
---
 .../prog/en/modules/serials/subscription-add.tt    |   29 ++++++++++++--------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
index 14f01ef..025b8b8 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
@@ -1145,7 +1145,7 @@ $(document).ready(function() {
                 
         <li>
             <label for="periodicity" class="required">Frequency:</label>
-                <select name="periodicity" size="1" id="periodicity" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1); reset_num_pattern();">
+                <select name="periodicity" size="1" id="periodicity" onchange="document.getElementsByName('manualhist')[0].checked=(this.value==1); reset_num_pattern();">
                 <option value="" selected="selected">-- please choose --</option>
                 [% IF ( periodicity16 ) %]
                 <option value="16" selected="selected">Without periodicity</option>
@@ -1312,20 +1312,11 @@ $(document).ready(function() {
     <li><label for="numberingmethod">Numbering formula:</label> <input type="text" name="numberingmethod" id="numberingmethod" value="[% numberingmethod %]" />
     </li>
     </ol>
-	</fieldset>
 
-	<fieldset class="action">
-    <input type="button" class="action_test" value="Test prediction pattern" onclick="javascript:irregularity_check()" />
-    <input type="button" class="action_reset" value="Reset pattern" onclick="javascript:reset_pattern()" />
-    <input type="button" class="action_save"  value="Save subscription" onclick="Check(this.form)" accesskey="w" />
-	</fieldset>
-    <fieldset class="action">
-    <input type="button" class="action_advanced" value="Show/Hide advanced pattern" onclick="javascript:display_table()" />
-    </fieldset>
            <div id="basetable"  style="display: none;">
             <table class="small">
                 <tr><th colspan="4">Advanced prediction pattern</th></tr>
-				<tr>
+                <tr>
                     <th> </th>
                     <th>X</th>
                     <th>Y</th>
@@ -1382,6 +1373,22 @@ $(document).ready(function() {
             </table>
         </div>
 
+    <fieldset class="action">
+        <input type="button" class="action_test" value="Test prediction pattern" onclick="irregularity_check()" />
+        <input type="button" class="action_reset" value="Reset pattern" onclick="reset_pattern()" />
+        <input type="button" class="action_advanced" value="Show/Hide advanced pattern" onclick="display_table()" />
+    </fieldset>
+    </fieldset>
+
+    <fieldset class="action">
+    <input type="button" class="action_save"  value="Save subscription" onclick="Check(this.form)" accesskey="w" />
+    [% IF ( subscriptionid ) %]
+       <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid %]" class="cancel">Cancel</a>
+    [% ELSE %]
+        <a href="/cgi-bin/koha/serials/serials-home.pl" class="cancel">Cancel</a>
+    [% END %]
+    </fieldset>
+
 </div>
 </div>
 </form>
-- 
1.7.9.5



More information about the Koha-patches mailing list