[Koha-patches] [PATCH] Reformatting patron attributes editor and display to conform with other standard interfaces.
Owen Leonard
oleonard at myacpl.org
Tue Oct 21 18:13:13 CEST 2008
---
.../prog/en/modules/members/memberentrygen.tmpl | 32 ++++++++-----------
.../prog/en/modules/members/moremember.tmpl | 21 ++++--------
2 files changed, 21 insertions(+), 32 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
index 180f10d..3bdc342 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
@@ -25,13 +25,13 @@
});
function clear_entry(node) {
- var original = node.parentNode.parentNode;
+ var original = node.parentNode;
$("input", original).attr('value', '');
$("select", original).attr('value', '');
}
function clone_entry(node) {
- var original = node.parentNode.parentNode;
+ var original = node.parentNode;
var clone = original.cloneNode(true);
var newId = 50 + parseInt(Math.random() * 100000);
$("input", clone).attr('id', function() {
@@ -40,6 +40,9 @@
$("input", 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);
+ });
$("select", clone).attr('id', function() {
return this.id.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
});
@@ -869,16 +872,11 @@
<fieldset class="rows" id="memberentry_patron_attributes">
<input type="hidden" name="setting_extended_patron_attributes" value="1" />
<legend>Additional attributes and identifiers</legend>
- <table>
- <tr>
- <th>Type</th>
- <th colspan="2">Value</th>
- </tr>
+ <ol>
<!-- TMPL_LOOP NAME='patron_attributes' -->
- <tr>
- <td><!-- TMPL_VAR NAME="code" --> (<!-- TMPL_VAR NAME="description" -->)
- </td>
- <td>
+ <li>
+ <label for="<!-- TMPL_VAR NAME="form_id" -->">
+ <!-- TMPL_VAR NAME="code" -->:</label>
<input type="hidden" id="<!-- TMPL_VAR NAME="form_id" -->_code" name="<!-- TMPL_VAR NAME="form_id" -->_code"
value="<!-- TMPL_VAR NAME="code" -->" />
<!-- TMPL_IF NAME="use_dropdown" -->
@@ -904,16 +902,14 @@
(Password: <input type="password" maxlength="30" value="<!-- TMPL_VAR NAME="password" -->"
id="<!-- TMPL_VAR NAME="form_id" -->_password" name="<!-- TMPL_VAR NAME="form_id" -->_password" />)
<!-- /TMPL_IF -->
- </td>
- <td>
- <a href="#" onclick="clear_entry(this); return false;">Clear</a>
+ <a href="#" onclick="clear_entry(this); return false;">Clear</a>
<!-- TMPL_IF NAME="repeatable" -->
- <a href="#" onclick="clone_entry(this); return false;">New</a>
+ | <a href="#" onclick="clone_entry(this); return false;">New</a>
<!-- /TMPL_IF -->
- </td>
- </tr>
+ <div class="hint"><!-- TMPL_VAR NAME="description" --></div>
+ </li>
<!-- /TMPL_LOOP -->
- </table>
+ </ol>
</fieldset>
<!-- /TMPL_IF--><!-- /TMPL_IF --><!-- /TMPL_UNLESS -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
index f42fcaf..a7886a6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
@@ -234,22 +234,15 @@ if (nodename =="barcodes[]"){
<!-- TMPL_UNLESS NAME="no_patron_attribute_types" -->
<div id="patron-extended-attributes" style="padding-top: 1em;">
<h3>Additional attributes and identifiers</h3>
-<table>
- <tr>
- <th>Type</th>
- <th>Value</th>
- </tr>
+<div class="rows">
+<ol>
<!-- TMPL_LOOP NAME="patron_attributes" -->
- <tr>
- <td><!-- TMPL_VAR NAME="code" --> (<!-- TMPL_VAR NAME="description" -->)</td>
- <td><!-- TMPL_VAR NAME="value" -->
- <!-- TMPL_IF NAME="value_description" -->
- (<!-- TMPL_VAR NAME="value_description" -->)
- <!-- /TMPL_IF -->
- </td>
- </tr>
+ <li><span class="label" title="<!-- TMPL_VAR NAME="description" -->"><!-- TMPL_VAR NAME="code" -->: </span> <!-- TMPL_VAR NAME="value" --> <!-- TMPL_IF NAME="value_description" --> (<!-- TMPL_VAR NAME="value_description" -->) <!-- /TMPL_IF -->
+ </span>
+ </li>
<!-- /TMPL_LOOP -->
-</table>
+</ol>
+</div>
</div>
<div class="action"><a href="memberentry.pl?op=modify&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&step=4">Edit</a></div>
<!-- /TMPL_UNLESS -->
--
1.5.5.GIT
More information about the Koha-patches
mailing list