|
Lines 42-54
Link Here
|
| 42 |
</ol> |
42 |
</ol> |
| 43 |
</fieldset> |
43 |
</fieldset> |
| 44 |
|
44 |
|
| 45 |
[% IF ( suggestionid ) %] |
45 |
[% IF suggestion %] |
| 46 |
<fieldset class="rows"> |
46 |
<fieldset class="rows"> |
| 47 |
<legend>Suggestion</legend> |
47 |
<legend>Suggestion</legend> |
| 48 |
<ol> |
48 |
<ol> |
| 49 |
<li> |
49 |
<li> |
| 50 |
<span class="label">Suggested by: </span> |
50 |
<span class="label">Suggested by: </span> |
| 51 |
[% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | uri %]&op=show">suggestion #[% suggestionid | html %]</a>) |
51 |
[% suggestion.surnamesuggestedby | html %][% IF suggestion.firstnamesuggestedby %], [% suggestion.firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&op=show">suggestion #[% suggestion.suggestionid | html %]</a>) |
|
|
52 |
[% IF suggestion.reason %] |
| 53 |
<li> |
| 54 |
<span class="label">Reason:</span> |
| 55 |
[% SET avs = AuthorisedValues.GetAuthValueDropbox( 'SUGGEST' ) %] |
| 56 |
[% SET other_reason = 1 %] |
| 57 |
<select class="select-reason" id="reason" name="reason"> |
| 58 |
<option value=""> -- Choose a reason -- </option> |
| 59 |
[% FOREACH reason IN suggestion_reasons %] |
| 60 |
[% IF reason.lib == suggestion.reason %] |
| 61 |
<option value="[% reason.lib | html %]" selected="selected">[% reason.lib | html %]</option> |
| 62 |
[% SET other_reason = 0 %] |
| 63 |
[% ELSE %] |
| 64 |
<option value="[% reason.lib | html %]">[% reason.lib | html %]</option> |
| 65 |
[% END %] |
| 66 |
[% END %] |
| 67 |
<option value="other">Others...</option> |
| 68 |
</select> |
| 69 |
|
| 70 |
<span id="other_reason" name="other_reason"> |
| 71 |
[% IF other_reason %] |
| 72 |
<input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/> |
| 73 |
[% ELSE %] |
| 74 |
<input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." /> |
| 75 |
[% END %] |
| 76 |
<a href="#back">Cancel</a> |
| 77 |
</span> |
| 78 |
|
| 79 |
<input type="hidden" name="suggestionid" value="[% suggestion.suggestionid | html %]" /> |
| 80 |
</li> |
| 81 |
[% END %] |
| 52 |
</li> |
82 |
</li> |
| 53 |
</ol> |
83 |
</ol> |
| 54 |
</fieldset> |
84 |
</fieldset> |
|
Lines 436-441
Link Here
|
| 436 |
CheckNItems($(this).val()); |
466 |
CheckNItems($(this).val()); |
| 437 |
}); |
467 |
}); |
| 438 |
[% END %] |
468 |
[% END %] |
|
|
469 |
|
| 470 |
[% IF other_reason %] |
| 471 |
$(".select-reason").hide(); |
| 472 |
$(".select-reason").find("option[value='other']").attr("selected","selected"); |
| 473 |
$("#other_reason").show(); |
| 474 |
[% ELSE %] |
| 475 |
$("#other_reason").hide(); |
| 476 |
[% END %] |
| 477 |
$(".select-reason").change(function(){ |
| 478 |
if($(this).val() == "other"){ |
| 479 |
$(this).hide(); |
| 480 |
$("#other_reason").show(); |
| 481 |
} |
| 482 |
}); |
| 483 |
$("a[href*=back]").click(function(){ |
| 484 |
$(".select-reason").show().find("option[value='']").attr("selected","selected"); |
| 485 |
$("#other_reason").hide(); |
| 486 |
}); |
| 487 |
|
| 439 |
}); |
488 |
}); |
| 440 |
</script> |
489 |
</script> |
| 441 |
[% END %] |
490 |
[% END %] |
| 442 |
- |
|
|