View | Details | Raw Unified | Return to bug 4932
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tmpl (-3 / +5 lines)
Lines 81-86 function HideItems(index,labelindex) { Link Here
81
	label = document.getElementById(labelindex);
81
	label = document.getElementById(labelindex);
82
	label.style.display='block';	
82
	label.style.display='block';	
83
}
83
}
84
function setStatus(serialid){
85
    $("#status"+serialid).val("2").attr("selected","selected");
86
}
84
function changeDate(adate) {
87
function changeDate(adate) {
85
    var elem = document.getElementById("expecteddate");
88
    var elem = document.getElementById("expecteddate");
86
    elem.value = adate;
89
    elem.value = adate;
Lines 224-230 function CloneSubfield(index){ Link Here
224
              <select name="status" size="1"  disabled="disabled">
227
              <select name="status" size="1"  disabled="disabled">
225
            <!--TMPL_ELSE-->
228
            <!--TMPL_ELSE-->
226
              <!--TMPL_IF Name="serialsadditems"-->
229
              <!--TMPL_IF Name="serialsadditems"-->
227
              <select name="status" size="1" id="status<!-- TMPL_VAR NAME="serialid" -->" onchange="if (this.value==2){unHideItems('items'+<!-- TMPL_VAR NAME="subscriptionid" -->+<!-- TMPL_VAR NAME="serialid" -->,'label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->'); changeDate('<!-- TMPL_VAR NAME="arriveddate" -->')} else if (this.value==7){changeDate('<!-- TMPL_VAR NAME="arriveddate" -->')} else { HideItems('items'+<!-- TMPL_VAR NAME="subscriptionid" -->+<!-- TMPL_VAR NAME="serialid" -->,'label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->'); changeDate('<!-- TMPL_VAR NAME="planneddate" -->')}" >
230
              <select name="status" size="1" id="status<!-- TMPL_VAR NAME="serialid" -->" onchange="if (this.value==2){unHideItems('items'+<!-- TMPL_VAR NAME="subscriptionid" --><!-- TMPL_VAR NAME="serialid" -->,'label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','<!-- TMPL_VAR NAME="serialid" -->'); changeDate('<!-- TMPL_VAR NAME="arriveddate" -->')} else if (this.value==7){changeDate('<!-- TMPL_VAR NAME="arriveddate" -->')} else { HideItems('items'+<!-- TMPL_VAR NAME="subscriptionid" -->+<!-- TMPL_VAR NAME="serialid" -->,'label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->'); changeDate('<!-- TMPL_VAR NAME="planneddate" -->')}" >
228
               <!--TMPL_ELSE -->
231
               <!--TMPL_ELSE -->
229
              <select name="status" size="1" id="status<!-- TMPL_VAR NAME="serialid" -->" onchange="if (this.value==2 || this.value==7){changeDate('<!-- TMPL_VAR NAME="arriveddate" -->')} else {changeDate('<!-- TMPL_VAR NAME="planneddate" -->')}" >
232
              <select name="status" size="1" id="status<!-- TMPL_VAR NAME="serialid" -->" onchange="if (this.value==2 || this.value==7){changeDate('<!-- TMPL_VAR NAME="arriveddate" -->')} else {changeDate('<!-- TMPL_VAR NAME="planneddate" -->')}" >
230
               <!--/TMPL_IF--> 
233
               <!--/TMPL_IF--> 
Lines 273-279 function CloneSubfield(index){ Link Here
273
  <!--TMPL_IF Name="serialsadditems"-->
276
  <!--TMPL_IF Name="serialsadditems"-->
274
          <tr>
277
          <tr>
275
          <td colspan="5">
278
          <td colspan="5">
276
      <a id="label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->" style="color: grey; font-size: 80%; cursor: pointer;"  onclick="unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->',  '<!--TMPL_VAR Name="serialid"-->')">
279
      <a id="label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->" style="color: grey; font-size: 80%; cursor: pointer;"  onclick="unHideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->',  '<!--TMPL_VAR Name="serialid"-->');setStatus(<!-- TMPL_VAR NAME="serialid" -->);">
277
             Click to add item</a>
280
             Click to add item</a>
278
        <fieldset class="rows" style="display:none;" id="items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->">
281
        <fieldset class="rows" style="display:none;" id="items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->">
279
        <legend><a style="cursor: pointer;"  onclick="HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
282
        <legend><a style="cursor: pointer;"  onclick="HideItems('items<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->','label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')">
280
- 

Return to bug 4932