Bug 9696 - Remove YUI styling from buttons on patron card creator edit pages
authorOwen Leonard <oleonard@myacpl.org>
Fri, 22 Feb 2013 14:52:10 +0000 (09:52 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 7 Mar 2013 14:55:21 +0000 (09:55 -0500)
Submit and cancel buttons on patron card creator edit pages should not
be styled differently than other submit and cancel controls.

This patch removes YUI styling of these controls and makes them
consistent with controls on other Koha pages. The "Cancel" button has
been removed altogether from the batch edit page since there is not a
corresponding submit button.

To test, got to the patron card creator and edit a batch, a layout, a
profile, and a template. Submit and cancel controls should look correct
and work correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. Works and looks well. No errors.

Note: It's true that edit batch has not a submit button, but
on the other managed pages (layout, profile, template) cancel
aborts editing and takes you to a list of objects (layout, etc.)
Now if we selected the wrong batch, we need to click on left menu o
back button (yay). Are we loosing a consistent interface?
Just thinking.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, more consistent with Koha's general interface
patterns.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-profile.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-template.tt

index 13fd05a..7a0811b 100644 (file)
@@ -2,22 +2,6 @@
     <title>Koha &rsaquo; Tools &rsaquo; Patron card creator &rsaquo; Manage patron card batches</title>
     [% INCLUDE 'doc-head-close.inc' %]
     [% INCLUDE 'greybox.inc' %]
-    <script type="text/javascript">
-        //<![CDATA[
-        $(document).ready(function() {
-            $("#cancel").empty();
-            buildButtons();
-         });
-        function buildButtons() {
-            var cancelButton = new YAHOO.widget.Button({
-                type: "link",
-                href: "/cgi-bin/koha/patroncards/manage.pl?card_element=batch",
-                label: _("Cancel"),
-                id: "cancel",
-                container: "cancel",
-            });
-        };
-    </script>
 </head>
 <body id="pcard_edit-batch" class="tools pcard">
     [% INCLUDE 'header.inc' %]
@@ -76,9 +60,6 @@
                             </div>
                             [% END %]
                         </div>
-                        <fieldset class="action">
-                            <span id="cancel"><a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Cancel</a></span>
-                        </fieldset>
                     </div>
                 </div>
                 <div class="yui-b">
index 862a2fa..0a96568 100644 (file)
         });
         //]]>
     </script>
-    <script type="text/javascript">
-        //<![CDATA[
-        $(document).ready(function() {
-            $("#save").empty();
-            $("#cancel").empty();
-            buildButtons();
-         });
-        function submitForm() {
-            document.input.submit();
-        };
-        function buildButtons() {
-            var saveButton = new YAHOO.widget.Button({
-                type: "link",
-                onclick: {fn: submitForm},
-                label: _("Save"),
-                id: "save",
-                container: "save"
-            });
-            var cancelButton = new YAHOO.widget.Button({
-                type: "link",
-                href: "/cgi-bin/koha/patroncards/manage.pl?card_element=layout",
-                label: _("Cancel"),
-                id: "cancel",
-                container: "cancel",
-            });
-        };
-    </script>
 </head>
 <body id="pcard_edit-layout" class="tools pcard">
     [% INCLUDE 'header.inc' %]
                 </div>
                 </div>
                     <fieldset class="action">
-                        <span id="save"><input type="submit" value="Save" /></span>
-                        <span id="cancel"><a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Cancel</a></span>
+                        <input type="submit" value="Save" />
+                        <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Cancel</a>
                         <input type="hidden" name="op" value="save" />
                         <input type="hidden" name="layout_id" value="[% layout_id %]" />
                     </fieldset>
index bf479ba..8f50488 100644 (file)
         });
         //]]>
     </script>
-    <script type="text/javascript">
-        //<![CDATA[
-        $(document).ready(function() {
-            $("#save").empty();
-            $("#cancel").empty();
-            buildButtons();
-         });
-        function submitForm() {
-            document.input.submit();
-        };
-        function buildButtons() {
-            var saveButton = new YAHOO.widget.Button({
-                type: "link",
-                onclick: {fn: submitForm},
-                label: _("Save"),
-                id: "save",
-                container: "save"
-            });
-            var cancelButton = new YAHOO.widget.Button({
-                type: "link",
-                href: "/cgi-bin/koha/patroncards/manage.pl?card_element=profile",
-                label: _("Cancel"),
-                id: "cancel",
-                container: "cancel",
-            });
-        };
-    </script>
 </head>
 <body id="pcard_edit-profile" class="tools pcard">
     [% INCLUDE 'header.inc' %]
                                         </ol>
                                     </fieldset>
                                     <fieldset class="action">
-                                        <span id="save"><input type="submit" value="Save" /></span>
-                                        <span id ="cancel"><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile" class="cancel">Cancel</a></span>
+                                        <input type="submit" value="Save" />
+                                        <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile" class="cancel">Cancel</a>
                                         <input type="hidden" name="op" value="save" />
                                         <input type="hidden" name="profile_id" value="[% profile_id %]" />
                                     </fieldset>
index b43f119..069161e 100644 (file)
         });
         //]]>
     </script>
-   <script type="text/javascript">
-        //<![CDATA[
-        $(document).ready(function() {
-            $("#save").empty();
-            $("#cancel").empty();
-            buildButtons();
-         });
-        function submitForm() {
-            document.input.submit();
-        };
-        function buildButtons() {
-            var saveButton = new YAHOO.widget.Button({
-                type: "link",
-                onclick: {fn: submitForm},
-                label: _("Save"),
-                id: "save",
-                container: "save"
-            });
-            var cancelButton = new YAHOO.widget.Button({
-                type: "link",
-                href: "/cgi-bin/koha/patroncards/manage.pl?card_element=template",
-                label: _("Cancel"),
-                id: "cancel",
-                container: "cancel",
-            });
-        };
-    </script>
 </head>
 <body id="pcard_edit-template" class="tools pcard">
     [% INCLUDE 'header.inc' %]
                     </div>
                     <div class="yui-g">
                         <fieldset class="action">
-                            <span id="save"><input type="submit" class="submit" value="Save" /></span>
-                            <span id="cancel"><a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a></span>
+                            <input type="submit" class="submit" value="Save" />
+                            <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a>
                             <input type="hidden" name="op" value="save" />
                             [% IF ( template_id ) %]
                             <input type="hidden" name="template_id" value="[% template_id %]" />