Bugzilla – Attachment 53885 Details for
Bug 17012
Remove more event attributes from administration templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17012 - Remove more event attributes from administration templates
Bug-17012---Remove-more-event-attributes-from-admi.patch (text/plain), 10.37 KB, created by
Jonathan Druart
on 2016-08-02 10:31:59 UTC
(
hide
)
Description:
Bug 17012 - Remove more event attributes from administration templates
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-02 10:31:59 UTC
Size:
10.37 KB
patch
obsolete
>From 5401374e751966d31e2c8692d4f7f1ec067ec344 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 1 Aug 2016 11:15:33 -0400 >Subject: [PATCH] Bug 17012 - Remove more event attributes from administration > templates >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >There are several administration templates which still contain event >attributes. This patch move event definition to the JavaScript. > >To test you must have the SMSSendDriver system preference set to >"Email." Apply the patch and go to Administration. > >- In Global system preferences, change the value of any input or select > and then click the "Cancel" link for that section. After confirming > your choice, the page should reload with your changes reset. > >- In Circulation and fine rules, edit any existing rule. In the editing > row, click the "Clear" button. The data for that rule should be > cleared. > >- In Transport cost matrix, make any change to the matrix. Submitting > the form should work correctly. > >- In MARC bibliographic framework, choose 'MARC structure' for any > framework. > - Checking or unchecking the 'Display only used tags/subfields' > checkbox should reload the page and change the display according to > your choice. > >- In Did you mean?, make changes to the existing configuration. > - Clicking "Cancel" should reload the page and discard your changes. > - Clicking "Save configuration" should correcly save your changes. > >- In SMS cellular providers, click to edit any existing provider. > Clicking the "Cancel" link should cancel the editing process and > return you to the list of providers. > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt | 10 +++++++++- > .../intranet-tmpl/prog/en/modules/admin/marctagstructure.tt | 9 +++++++-- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt | 6 +++++- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 6 +++++- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt | 2 +- > .../prog/en/modules/admin/transport-cost-matrix.tt | 5 ++++- > koha-tmpl/intranet-tmpl/prog/js/sms_providers.js | 6 +++++- > 7 files changed, 36 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt >index 3b565f9..0fb602d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt >@@ -29,6 +29,14 @@ > .addClass( "ui-widget-header ui-corner-all" ) > .end() > .find( ".plugindesc" ); >+ $(".save-all").on("click",function(e){ >+ e.preventDefault(); >+ yesimeant(); >+ }); >+ $(".force_reload").on("click",function(e){ >+ e.preventDefault(); >+ window.location.reload(true); >+ }); > }); > > function yesimeant() { >@@ -93,7 +101,7 @@ > <legend>Intranet</legend> > [% PROCESS pluginlist plugins=INTRApluginlist type='intranet' %] > </fieldset> >- <fieldset class="action"><button class="save-all submit" onclick="yesimeant();return false;" type="submit">Save configuration</button> <a href="#" onclick="window.location.reload(true);" class="cancel">Cancel</a></fieldset> >+ <fieldset class="action"><button class="save-all submit" type="submit">Save configuration</button> <a href="/cgi-bin/koha/admin/didyoumean.pl" class="force_reload cancel">Cancel</a></fieldset> > </form> > > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >index 1f0a5d8..d182354 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >@@ -19,6 +19,11 @@ $(document).ready(function() { > ], > "sPaginationType": "four_button" > })); >+ $("#select_display").on("change",function(){ >+ var checked = $(this).prop("checked") ? 1: 0; >+ $.cookie('marctagstructure_selectdisplay', checked); >+ this.form.submit(); >+ }); > }); > > //]]> >@@ -174,9 +179,9 @@ $(document).ready(function() { > <input type="submit" value="Search" /> > <p> <label for="select_display">Display only used tags/subfields</label> > [% IF ( select_display ) %] >- <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" onchange="$.cookie('marctagstructure_selectdisplay', 0); this.form.submit();" /> >+ <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" /> > [% ELSE %] >- <input type="checkbox" name="select_display" id="select_display" value="True" onchange="$.cookie('marctagstructure_selectdisplay', 1); this.form.submit();" /> >+ <input type="checkbox" name="select_display" id="select_display" value="True" /> > [% END %]</p> > </fieldset> > </form> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >index 8f1e824..22fb001 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >@@ -25,6 +25,10 @@ > countSelected: _("# of % selected"), > noMatchesFound: _("No matches found") > } ); >+ $(".force_reload").on("click",function(e){ >+ e.preventDefault(); >+ window.location.reload(true); >+ }); > }); > // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw > var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"; >@@ -179,7 +183,7 @@ > [% IF ( loop.last ) %]</tbody></table>[% END %] > [% END %] > [% END %] >- <fieldset class="action"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button> <a href="#" onclick="window.location.reload(true);" class="cancel">Cancel</a></fieldset> >+ <fieldset class="action"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button> <a href="/cgi-bin/koha/admin/preferences.pl" class="force_reload cancel">Cancel</a></fieldset> > </form> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index 8d197af..5c406b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -101,6 +101,10 @@ $(document).ready(function() { > $("#default-circulation-rules tr:last td:eq(1) select").prop('disabled', true); > return false; > }); >+ $(".clear_edit").on("click",function(e){ >+ e.preventDefault(); >+ clear_edit(); >+ }); > }); > //]]> > </script> >@@ -347,7 +351,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <td class="actions"> > <input type="hidden" name="branch" value="[% current_branch %]"/> > <button type="submit" class="btn btn-mini"><i class="fa fa-save"></i> Save</button> >- <button name="cancel" onclick="clear_edit();return false;" class="btn btn-mini"><i class="fa fa-undo"></i> Clear</button> >+ <button name="cancel" class="clear_edit btn btn-mini"><i class="fa fa-undo"></i> Clear</button> > </td> > </tr> > <tfoot> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt >index 2979b51..3e991f9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt >@@ -90,7 +90,7 @@ > <fieldset class="action"> > <input type="submit" id="submit_save" value="Submit" /> > <input type="submit" value="Submit" id="submit_update" /> >- <a class="cancel" id="cancel" href="#" onclick="cancel_edit()">Cancel</a> >+ <a class="cancel cancel_edit" id="cancel" href="sms_providers.pl">Cancel</a> > </fieldset> > </form> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt >index dfdf64c..c828386 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt >@@ -51,6 +51,9 @@ $(document).ready(function(){ > $("body").on("change",".disable_transport_cost",function(){ > disable_transport_cost_chg(this); > }); >+ $("#cost_matrix_form").on("submit",function(){ >+ return form_submit(this); >+ }); > }) > //]]> > </script> >@@ -88,7 +91,7 @@ $(document).ready(function(){ > </ul> > </div>[% END %] > >- <form method="post" action="?" onsubmit="return form_submit(this);"> >+ <form method="post" action="/cgi-bin/koha/admin/transport-cost-matrix.pl" id="cost_matrix_form"> > <input type="hidden" name="op" value="set-cost-matrix" /> > <fieldset id="transport-cost-matrix"> > <div class="help"> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/sms_providers.js b/koha-tmpl/intranet-tmpl/prog/js/sms_providers.js >index bccedeb..3fe6f76 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/sms_providers.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/sms_providers.js >@@ -20,6 +20,10 @@ $(document).ready(function() { > delete_provider( providerid ); > } > }); >+ $(".cancel_edit").on("click",function(e){ >+ e.preventDefault(); >+ cancel_edit(); >+ }); > }); > > function clear_form(){ >@@ -70,4 +74,4 @@ function delete_provider( id, users ) { > $("#id").val( id ); > $("#sms_form").submit(); > } >-} >\ No newline at end of file >+} >-- >2.8.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17012
:
53846
|
53857
| 53885