Bug 3934 - move test prediction pattern button

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.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Owen Leonard 2013-08-19 12:26:56 -04:00 committed by Tomas Cohen Arazi
parent c5865d6bca
commit eb877dbb79
1 changed files with 18 additions and 11 deletions

View File

@ -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>&nbsp;</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>