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.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Kyle Hall 2014-10-31 06:24:20 -04:00 committed by Tomas Cohen Arazi
parent bb505d77f4
commit 938ec10a4a
2 changed files with 8 additions and 12 deletions

View file

@ -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

View file

@ -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' %]
[% INCLUDE 'intranet-bottom.inc' %]