@@ -, +, @@ other patron data --- .../intranet-tmpl/prog/en/css/staff-global.css | 17 ++++- .../prog/en/modules/members/memberentrygen.tt | 74 +++++++------------- .../prog/en/modules/members/moremember.tt | 36 ++++------ koha-tmpl/intranet-tmpl/prog/img/clear-field.png | Bin 0 -> 279 bytes koha-tmpl/intranet-tmpl/prog/img/clone-field.png | Bin 0 -> 262 bytes 5 files changed, 55 insertions(+), 72 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/clear-field.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/clone-field.png --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -634,8 +634,9 @@ fieldset.rows label, fieldset.rows span.label { } fieldset.rows fieldset { + background-color: #FFF; border-width : 1px; - margin : 0 0 .5em 0; + margin : 1em; padding : .3em; } @@ -734,6 +735,10 @@ fieldset.action, div.action { width: auto; } +div.rows+div.rows { + margin-top : .6em; +} + div.rows { float : left; clear : left; @@ -1184,6 +1189,16 @@ div.alert strong { list-style-position:inside; } +a.clear-field { + background : transparent url("../../img/clear-field.png") center left no-repeat; + padding-left : 16px; +} + +a.clone-field { + background : transparent url("../../img/clone-field.png") center left no-repeat; + padding-left : 20px; +} + a.document { background-position : left middle; background-repeat : no-repeat; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -36,49 +36,39 @@ }); function clear_entry(node) { - var original = node.parentNode.parentNode; + var original = node.parentNode; $("input[type=text]", original).attr('value', ''); $("select", original).attr('value', ''); } function clone_entry(node) { - var original = node.parentNode.parentNode; - var clone = original.cloneNode(true); + var original = $(node).parent(); + var clone = original.clone(); + var newId = 50 + parseInt(Math.random() * 100000); - $("input", clone).attr('id', function() { + $("input,select,textarea", clone).attr('id', function() { return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId); }); - $("input", clone).attr('name', function() { + $("input,select,textarea", clone).attr('name', function() { return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId); }); - $("select", clone).attr('id', function() { - return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId); - }); - $("select", clone).attr('name', function() { - return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId); + $("label", clone).attr('for', function() { + return $(this).attr("for").replace(/patron_attr_\d+/, 'patron_attr_' + newId); }); $("input#patron_attr_" + newId, clone).attr('value',''); $("select#patron_attr_" + newId, clone).attr('value',''); - original.parentNode.insertBefore(clone, original.nextSibling); + $(original).after(clone); + return false; } function update_category_code(category_code) { if ( $(category_code).is("select") ) { category_code = $("#categorycode").find("option:selected").val(); } - var mytables = $(".attributes_table>tbody"); - - mytables.find("tr").each(function(){ - $(this).hide() - }); - - mytables.find("tr[data-category_code="+category_code+"]").each(function(){ - $(this).show(); - }); - mytables.find("tr[data-category_code='']").each(function(){ - $(this).show(); - }); - + var mytables = $(".attributes_table"); + $(mytables).find("li").hide(); + $(mytables).find(" li[data-category_code="+category_code+"]").show(); + $(mytables).find(" li[data-category_code='']").show(); } var MSG_SEPARATOR = _("Separator must be / in field "); @@ -1345,24 +1335,13 @@ Additional attributes and identifiers [% FOREACH pa_loo IN patron_attributes %] [% IF pa_loo.class %] - - - [% ELSE %] -
[% pa_loo.lib %]
+
+ [% pa_loo.lib %] [% END %] -
- - - - - - +
    [% FOREACH patron_attribute IN pa_loo.items %] -
- - - - + [% END %] - -
TypeValue
- [% patron_attribute.code %] ([% patron_attribute.description %]) - +
  • + [% IF ( patron_attribute.use_dropdown ) %] Password: ) [% END %] -
  • - Clear + Clear [% IF ( patron_attribute.repeatable ) %] - New + New [% END %] -
    + + [% IF pa_loo.class %][% END %] [% END %] [% END %][% END %][% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -290,32 +290,24 @@ function validate1(date) {

    Additional attributes and identifiers

    [% FOREACH attribute IN attributes_loop %] [% IF attribute.class %] -

    [% attribute.lib %]

    - +
    [% ELSE %] -
    +
    [% END %] -
    - - - - - - - +

    [% attribute.lib %]

    +
      [% FOREACH item IN attribute.items %] -
    - - - - +
  • + [% item.description %]: + [% IF ( item.value_description ) %] + [% item.value_description %] + [% ELSE %] + [% item.value %] + [% END %] +
  • [% END %] - -
    TypeDescriptionValue
    [% item.code %][% item.description %][% item.value %] - [% IF ( item.value_description ) %] - ([% item.value_description %]) - [% END %] -
    + + [% END %]
    Edit