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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt (-5 / +26 lines)
Lines 37-42 Link Here
37
                    alert(alertString2);
37
                    alert(alertString2);
38
            }
38
            }
39
    }
39
    }
40
41
    function clear_edit() {
42
      var cancel = confirm(_("Are you sure you want to cancel your changes?"));
43
      if ( !cancel ) return;
44
      var edit_row = $("#edit_row");
45
      $(edit_row).find("input").each(function(){
46
        var type = $(this).attr("type");
47
        if (type != "button" && type != "submit" ) {
48
          $(this).val("");
49
          $(this).prop('disabled', false);
50
        }
51
        if ( type == "checkbox" ) {
52
          $(this).prop('checked', false);
53
        }
54
      });
55
      $(edit_row).find("select").prop('disabled', false);
56
      $(edit_row).find("select option:first").attr("selected", "selected");
57
      $(edit_row).find("td:last input[name='clear']").remove();
58
    }
59
40
    $(document).ready(function() {
60
    $(document).ready(function() {
41
        $("#selections input").on("change",function(e){
61
        $("#selections input").on("change",function(e){
42
            var num = $(this).attr("id");
62
            var num = $(this).attr("id");
Lines 114-126 Link Here
114
    [% authvals_ro.code %]</th>
134
    [% authvals_ro.code %]</th>
115
    [% END %]
135
    [% END %]
116
136
117
    <th class="remaining">Fund remaining</th><th>&nbsp;</th>
137
    <th class="remaining">Fund remaining</th>
138
    <th>Actions</th>
118
    </tr>
139
    </tr>
119
    </thead>
140
    </thead>
120
141
121
    <tbody>
142
    <tbody>
122
    [% FOREACH budget_line IN budget_lines %]
143
    [% FOREACH budget_line IN budget_lines %]
123
    <tr>
144
    <tr id="edit_row">
124
        [% IF ( budget_line.budget_lock ) %]
145
        [% IF ( budget_line.budget_lock ) %]
125
            <td class="locked" title="Fund locked">
146
            <td class="locked" title="Fund locked">
126
        [% ELSE %]
147
        [% ELSE %]
Lines 186-194 Link Here
186
        </table>
207
        </table>
187
        </td>
208
        </td>
188
209
189
        <td>
210
        <td class="actions">
190
             [% UNLESS ( budget_line.budget_lock ) %]
211
             [% UNLESS ( budget_line.budget_lock ) %]
191
                    <input type="button"  onclick="autoFillRow('[% budget_line.budget_id %]')" value="Auto-fill row"/>
212
                    <button onclick="autoFillRow('[% budget_line.budget_id %]')" class="btn btn-mini"><i class="fa fa-pencil-square-o"></i> Auto-fill row</button>
213
                    <button onclick="return clear_edit();" class="btn btn-mini"><i class="fa fa-undo"></i> Clear</button>
192
            [% ELSE %]
214
            [% ELSE %]
193
             <div style="color:red;">not owned</div>
215
             <div style="color:red;">not owned</div>
194
            [% END %]
216
            [% END %]
195
- 

Return to bug 17016