Bug 12740 - It should not be possible to store empty news
This patch marks the title field as 'required' and it is not
longer possible to store a news without having at least a title.
To test:
Got to Tools->News
Create news or edit existing news
Field "Title" should have a red label and should be marked as "required"
It should not be possible to save with empty field "Title"
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: Only keeps the user from doing it.
Fails to handle the fake the url call case.
https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new=
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
4822f19df6
commit
ef9a552023
|
|
@ -119,8 +119,8 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
|
|||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label for="title">Title: </label>
|
||||
<input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" />
|
||||
<label for="title" class="required">Title: </label>
|
||||
<input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" required="required" class="required" /> <span class="required">Required</span>
|
||||
</li>
|
||||
<li>
|
||||
<label for="from">Publication date: </label>
|
||||
|
|
@ -141,7 +141,8 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
|
|||
[% END %]
|
||||
</li>
|
||||
<li><label for="new">News: </label>
|
||||
<textarea name="new" id="new" cols="75" rows="10">[% new_detail.new %]</textarea></li>
|
||||
<textarea name="new" id="new" cols="75" rows="10">[% new_detail.new %]</textarea>
|
||||
</li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue