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

(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-1 / +16 lines)
Lines 634-641 fieldset.rows label, fieldset.rows span.label { Link Here
634
}
634
}
635
635
636
fieldset.rows fieldset {
636
fieldset.rows fieldset {
637
    background-color: #FFF;
637
	border-width : 1px;
638
	border-width : 1px;
638
	margin : 0 0 .5em 0;
639
    margin : 1em;
639
	padding : .3em;
640
	padding : .3em;
640
}
641
}
641
642
Lines 734-739 fieldset.action, div.action { Link Here
734
  width: auto;
735
  width: auto;
735
}
736
}
736
737
738
div.rows+div.rows {
739
    margin-top : .6em;
740
}
741
737
div.rows {
742
div.rows {
738
float : left;
743
float : left;
739
clear : left;
744
clear : left;
Lines 1184-1189 div.alert strong { Link Here
1184
    list-style-position:inside;
1189
    list-style-position:inside;
1185
}
1190
}
1186
1191
1192
a.clear-field {
1193
    background : transparent url("../../img/clear-field.png") center left no-repeat;
1194
    padding-left : 16px;
1195
}
1196
1197
a.clone-field {
1198
    background : transparent url("../../img/clone-field.png") center left no-repeat;
1199
    padding-left : 20px;
1200
}
1201
1187
a.document {
1202
a.document {
1188
	background-position : left middle;
1203
	background-position : left middle;
1189
	background-repeat : no-repeat;
1204
	background-repeat : no-repeat;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-49 / +25 lines)
Lines 36-84 Link Here
36
    });
36
    });
37
37
38
    function clear_entry(node) {
38
    function clear_entry(node) {
39
        var original = node.parentNode.parentNode;
39
        var original = node.parentNode;
40
        $("input[type=text]", original).attr('value', '');
40
        $("input[type=text]", original).attr('value', '');
41
        $("select", original).attr('value', '');
41
        $("select", original).attr('value', '');
42
    }
42
    }
43
43
44
    function clone_entry(node) {
44
    function clone_entry(node) {
45
        var original = node.parentNode.parentNode;
45
        var original = $(node).parent();
46
        var clone = original.cloneNode(true);
46
        var clone = original.clone();
47
47
        var newId = 50 + parseInt(Math.random() * 100000);
48
        var newId = 50 + parseInt(Math.random() * 100000);
48
        $("input", clone).attr('id', function() {
49
        $("input,select,textarea", clone).attr('id', function() {
49
            return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
50
            return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
50
        });
51
        });
51
        $("input", clone).attr('name', function() {
52
        $("input,select,textarea", clone).attr('name', function() {
52
            return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
53
            return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
53
        });
54
        });
54
        $("select", clone).attr('id', function() {
55
        $("label", clone).attr('for', function() {
55
            return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
56
            return $(this).attr("for").replace(/patron_attr_\d+/, 'patron_attr_' + newId);
56
        });
57
        $("select", clone).attr('name', function() {
58
            return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
59
        });
57
        });
60
        $("input#patron_attr_" + newId, clone).attr('value','');
58
        $("input#patron_attr_" + newId, clone).attr('value','');
61
        $("select#patron_attr_" + newId, clone).attr('value','');
59
        $("select#patron_attr_" + newId, clone).attr('value','');
62
        original.parentNode.insertBefore(clone, original.nextSibling);
60
        $(original).after(clone);
61
        return false;
63
    }
62
    }
64
63
65
    function update_category_code(category_code) {
64
    function update_category_code(category_code) {
66
        if ( $(category_code).is("select") ) {
65
        if ( $(category_code).is("select") ) {
67
            category_code = $("#categorycode").find("option:selected").val();
66
            category_code = $("#categorycode").find("option:selected").val();
68
        }
67
        }
69
        var mytables = $(".attributes_table>tbody");
68
        var mytables = $(".attributes_table");
70
69
        $(mytables).find("li").hide();
71
        mytables.find("tr").each(function(){
70
        $(mytables).find(" li[data-category_code="+category_code+"]").show();
72
            $(this).hide()
71
        $(mytables).find(" li[data-category_code='']").show();
73
        });
74
75
        mytables.find("tr[data-category_code="+category_code+"]").each(function(){
76
            $(this).show();
77
        });
78
        mytables.find("tr[data-category_code='']").each(function(){
79
            $(this).show();
80
        });
81
82
    }
72
    }
83
73
84
		var MSG_SEPARATOR = _("Separator must be / in field ");
74
		var MSG_SEPARATOR = _("Separator must be / in field ");
Lines 1345-1368 Link Here
1345
    <legend>Additional attributes and identifiers</legend>
1335
    <legend>Additional attributes and identifiers</legend>
1346
    [% FOREACH pa_loo IN patron_attributes %]
1336
    [% FOREACH pa_loo IN patron_attributes %]
1347
        [% IF pa_loo.class %]
1337
        [% IF pa_loo.class %]
1348
            <table id="aai_[% pa_loo.class %]" class="attributes_table">
1338
            <fieldset id="aai_[% pa_loo.class %]">
1349
            <caption>[% pa_loo.lib %]</caption>
1339
            <legend>[% pa_loo.lib %]</legend>
1350
        [% ELSE %]
1351
            <table id="aai" class="attributes_table">
1352
        [% END %]
1340
        [% END %]
1353
        <thead>
1341
        <ol class="attributes_table">
1354
            <tr>
1355
                <th>Type</th>
1356
                <th colspan="2">Value</th>
1357
            </tr>
1358
        </thead>
1359
        <tbody>
1360
            [% FOREACH patron_attribute IN pa_loo.items %]
1342
            [% FOREACH patron_attribute IN pa_loo.items %]
1361
                <tr data-category_code="[% patron_attribute.category_code %]">
1343
                <li data-category_code="[% patron_attribute.category_code %]">
1362
                    <td>
1344
                    <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1363
                        [% patron_attribute.code %] ([% patron_attribute.description %])
1364
                    </td>
1365
                    <td>
1366
                        <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1345
                        <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1367
                        [% IF ( patron_attribute.use_dropdown ) %]
1346
                        [% IF ( patron_attribute.use_dropdown ) %]
1368
                            <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1347
                            <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
Lines 1389-1408 Link Here
1389
                            [% END %]
1368
                            [% END %]
1390
                        [% END %]
1369
                        [% END %]
1391
                        [% IF ( patron_attribute.password_allowed ) %]
1370
                        [% IF ( patron_attribute.password_allowed ) %]
1392
                            (Password: <input type="password" maxlength="64" value="[% patron_attribute.password %]"
1371
                            (<label class="yesno" for="[% patron_attribute.form_id %]_password">Password:</label> <input type="password" maxlength="64" value="[% patron_attribute.password %]"
1393
                                   id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
1372
                                   id="[% patron_attribute.form_id %]_password" name="[% patron_attribute.form_id %]_password" />)
1394
                        [% END %]
1373
                        [% END %]
1395
                    </td>
1374
                        <a href="#" class="clear-field" onclick="clear_entry(this); return false;">Clear</a>
1396
                    <td>
1397
                        <a href="#" onclick="clear_entry(this); return false;">Clear</a>
1398
                        [% IF ( patron_attribute.repeatable ) %]
1375
                        [% IF ( patron_attribute.repeatable ) %]
1399
                        <a href="#" onclick="clone_entry(this); return false;">New</a>
1376
                        <a href="#" class="clone-field" onclick="clone_entry(this); return false;">New</a>
1400
                        [% END %]
1377
                        [% END %]
1401
                    </td>
1378
                </li>
1402
                </tr>
1403
            [% END %]
1379
            [% END %]
1404
        </tbody>
1380
        </ol>
1405
        </table>
1381
        [% IF pa_loo.class %]</fieldset>[% END %]
1406
    [% END %]
1382
    [% END %]
1407
  </fieldset>
1383
  </fieldset>
1408
[% END %][% END %][% END %]
1384
[% END %][% END %][% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-22 / +14 lines)
Lines 290-321 function validate1(date) { Link Here
290
<h3>Additional attributes and identifiers</h3>
290
<h3>Additional attributes and identifiers</h3>
291
[% FOREACH attribute IN attributes_loop %]
291
[% FOREACH attribute IN attributes_loop %]
292
    [% IF attribute.class %]
292
    [% IF attribute.class %]
293
        <h4>[% attribute.lib %]</h4>
293
        <div id="aai_[% attribute.class %]" class="rows">
294
        <table id="aai_[% attribute.class %]">
295
    [% ELSE %]
294
    [% ELSE %]
296
        <table id="aai">
295
        <div id="aai" class="rows">
297
    [% END %]
296
    [% END %]
298
        <thead>
297
        <h4>[% attribute.lib %]</h4>
299
            <tr>
298
        <ol>
300
                <th>Type</th>
301
                <th>Description</th>
302
                <th>Value</th>
303
            </tr>
304
        </thead>
305
        <tbody>
306
        [% FOREACH item IN attribute.items %]
299
        [% FOREACH item IN attribute.items %]
307
            <tr>
300
            <li>
308
                <td>[% item.code %]</td>
301
                <span class="label">[% item.description %]: </span>
309
                <td>[% item.description %]</td>
302
                [% IF ( item.value_description ) %]
310
                <td>[% item.value %]
303
                    [% item.value_description %]
311
                    [% IF ( item.value_description ) %]
304
                [% ELSE %]
312
                        ([% item.value_description %])
305
                    [% item.value %]
313
                    [% END %]
306
                [% END %]
314
                </td>
307
            </li>
315
            </tr>
316
        [% END %]
308
        [% END %]
317
        </tbody>
309
        </ol>
318
    </table>
310
    </div>
319
[% END %]
311
[% END %]
320
</div>
312
</div>
321
<div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=4">Edit</a></div>
313
<div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=4">Edit</a></div>

Return to bug 3374