@@ -, +, @@
- Fill the authorised values's category 'SUGGEST' with reason
- Edit a pending suggestion. Set the status to rejected
and select a reason
- Check the reason has been saved (i.e in the suggestions
table of rejected tab)
- Check in the corresponding message_queue that the reason
is here
- Re-edit the same suggestion
- Check that the correct reason is selected by defaut
- Edit an other pending suggetion. Set the status to rejected,
select other reason and fill the input text
- Re-edit the previews suggestion and make sure the input
"other" is displayed by default with the correct value
---
.../prog/en/modules/suggestion/suggestion.tt | 40 ++++++++++++++++++++++
suggestion/suggestion.pl | 17 ++++++++-
2 files changed, 56 insertions(+), 1 deletion(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
@@ -172,6 +172,23 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
$("#quantity,#price,#currency").on("change",function(){
calcNewsuggTotal();
});
+
+ [% IF other_reason %]
+ $(".select-reason").hide();
+ $("#other_reason").show();
+ [% ELSE %]
+ $("#other_reason").hide();
+ [% END %]
+ $(".select-reason").change(function(){
+ if($(this).val() == "other"){
+ $(this).hide();
+ $(this).next("#other_reason").show();
+ }
+ });
+ $("a[href*=back]").click(function(){
+ $(".select-reason").show().find("option[value='']").attr("selected","selected");
+ $("#other_reason").hide();
+ });
});
// ]]>
@@ -457,6 +474,29 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
[% END %]
+