Bugzilla – Attachment 33062 Details for
Bug 8836
Resurrect Rotating Collections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8836 [QA Followup] - Allow collection description to be optional
Bug-8836-QA-Followup---Allow-collection-descriptio.patch (text/plain), 3.04 KB, created by
Kyle M Hall (khall)
on 2014-10-31 13:09:54 UTC
(
hide
)
Description:
Bug 8836 [QA Followup] - Allow collection description to be optional
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-10-31 13:09:54 UTC
Size:
3.04 KB
patch
obsolete
>From ef5556aea62295687bbb904f334e064c4b2cf7af Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 31 Oct 2014 06:24:20 -0400 >Subject: [PATCH] Bug 8836 [QA Followup] - Allow collection description to be optional > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Description is no longer made required by the template and an empty >description is saved correctly. >--- > C4/RotatingCollections.pm | 10 ++++------ > .../rotating_collections/editCollections.tt | 10 ++++------ > 2 files changed, 8 insertions(+), 12 deletions(-) > >diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm >index b6152a8..f287994 100644 >--- a/C4/RotatingCollections.pm >+++ b/C4/RotatingCollections.pm >@@ -88,9 +88,8 @@ sub CreateCollection { > if ( !$title ) { > return ( 0, 1, "NO_TITLE" ); > } >- if ( !$description ) { >- return ( 0, 2, "NO_DESCRIPTION" ); >- } >+ >+ $description ||= q{}; > > my $success = 1; > >@@ -135,12 +134,11 @@ sub UpdateCollection { > if ( !$title ) { > return ( 0, 2, "NO_TITLE" ); > } >- if ( !$description ) { >- return ( 0, 3, "NO_DESCRIPTION" ); >- } > > my $dbh = C4::Context->dbh; > >+ $description ||= q{}; >+ > my $sth; > $sth = $dbh->prepare( > "UPDATE collections >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt >index 994b6e4..1247e5b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt >@@ -108,13 +108,11 @@ > [% END %] > </li> > <li> >- <label class="required" for="description">Description: </label> >+ <label for="description">Description: </label> > [% IF (editColDescription ) %] >- <input type="text" size="50" name="description" value="[% editColDescription %]" required="required" /> >- <span class="required">Required</span> >+ <input type="text" size="50" name="description" value="[% editColDescription %]" /> > [% ELSE %] >- <input type="text" size="50" name="description" required="required" /> >- <span class="required">Required</span> >+ <input type="text" size="50" name="description" /> > [% END %] > </li> > </ol> >@@ -132,4 +130,4 @@ > [% INCLUDE 'tools-menu.inc' %] > </div> > </div> <!-- /#bd --> >-[% INCLUDE 'intranet-bottom.inc' %] >\ No newline at end of file >+[% INCLUDE 'intranet-bottom.inc' %] >-- >1.7.2.5
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 8836
:
12560
|
16746
|
19118
|
19119
|
19337
|
19339
|
21008
|
21009
|
21010
|
21011
|
23966
|
23967
|
23968
|
23969
|
23970
|
23971
|
23976
|
28140
|
28141
|
30838
|
30921
|
31087
|
32361
|
32362
|
32588
|
32589
|
32690
|
32691
|
32693
|
32773
|
32774
|
32973
|
32974
|
32975
|
32976
|
32994
|
32999
|
33000
|
33001
|
33002
|
33045
|
33046
|
33047
|
33048
|
33050
|
33051
|
33058
|
33059
|
33060
|
33061
|
33062
|
33063
|
33064
|
33065
|
33066
|
33068
|
33070
|
33095
|
33096
|
33097
|
33098
|
33099
|
33100
|
33101
|
33102
|
33103
|
33330
|
33331
|
33374