|
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 469-474
Link Here
|
| 469 |
} |
499 |
} |
| 470 |
$("select[name='currency']").on("change", function(){update_unitprice()} ); |
500 |
$("select[name='currency']").on("change", function(){update_unitprice()} ); |
| 471 |
$("#unitprice_currency").on("change", function(){update_unitprice()} ); |
501 |
$("#unitprice_currency").on("change", function(){update_unitprice()} ); |
|
|
502 |
|
| 503 |
[% IF other_reason %] |
| 504 |
$(".select-reason").hide(); |
| 505 |
$(".select-reason").find("option[value='other']").attr("selected","selected"); |
| 506 |
$("#other_reason").show(); |
| 507 |
[% ELSE %] |
| 508 |
$("#other_reason").hide(); |
| 509 |
[% END %] |
| 510 |
$(".select-reason").change(function(){ |
| 511 |
if($(this).val() == "other"){ |
| 512 |
$(this).hide(); |
| 513 |
$("#other_reason").show(); |
| 514 |
} |
| 515 |
}); |
| 516 |
$("a[href*=back]").click(function(){ |
| 517 |
$(".select-reason").show().find("option[value='']").attr("selected","selected"); |
| 518 |
$("#other_reason").hide(); |
| 519 |
}); |
| 520 |
|
| 472 |
}); |
521 |
}); |
| 473 |
</script> |
522 |
</script> |
| 474 |
[% END %] |
523 |
[% END %] |
| 475 |
- |
|
|