LP1207396 Patron self-registration web form
authorBill Erickson <berick@esilibrary.com>
Mon, 5 Aug 2013 21:24:13 +0000 (17:24 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 5 Aug 2013 21:24:13 +0000 (17:24 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Register.pm
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/register.tt2

index 9d8d48d..55674ab 100644 (file)
@@ -123,6 +123,8 @@ sub collect_register_validation_settings {
         unless defined $shash->{stgu}{family_name}{require};
     $shash->{stgma}{street1}{require} = 1
         unless defined $shash->{stgma}{street1}{require};
+    $shash->{stgma}{street2}{show} = 1
+        unless defined $shash->{stgma}{street2}{show};
     $shash->{stgma}{city}{require} = 1
         unless defined $shash->{stgma}{city}{require};
     $shash->{stgma}{post_code}{require} = 1
index 6c7adc4..9a89c6c 100644 (file)
@@ -1555,3 +1555,9 @@ a.preflib_change {
 #main-content-register td:not(:first-child) {
     padding-left: 20px;
 }
+
+.patron-reg-invalid {
+    font-weight: bold;
+    color: red;
+    padding-right: 10px;
+}
index 4ecc655..7522ec9 100644 (file)
@@ -16,7 +16,6 @@ register_fields = [
     {class => 'stgu',  name = 'first_given_name', label => l('First Name')},
     {class => 'stgu',  name = 'second_given_name', label => l('Middle Name')},
     {class => 'stgu',  name = 'family_name', label => l('Last Name')},
-    {class => 'stgu',  name = 'family_name', label => l('Last Name')},
     {class => 'stgma', name = 'street1', label => l('Street Address')},
     {class => 'stgma', name = 'street2', label => l('Street Address (2)')},
     {class => 'stgma', name = 'city', label => l('City')},
@@ -37,8 +36,8 @@ register_fields = [
 
         [% IF ctx.register.success %]
             <h3>[% |l %]
-            Registration successful!  Please see library staff to 
-            complete your registration.
+            Registration successful!  
+            Please see library staff to complete your registration.
             [% END %]</h3>
 
         [% ELSIF ctx.register.error %]
@@ -90,23 +89,14 @@ FOR field_def IN register_fields;
             type='text' 
             name='[% field_path %]'
             value='[% CGI.param(field_path) | html %]'/>
+        [% IF require %]
+        <span class='patron-reg-invalid'>*</span>
+        [% END %]
     </td>
     <td>
-[%
-    # display wether the field is optional and any example text
-
-    IF example;
-        IF require;
-            l('(Example: [_1])', example);
-        ELSE;
-            l('(Optional, Example: [_1])', example);
-        END;
-    ELSIF !require;
-        l('(Optional)');
-    END;
-%]
-    </td>
-    <td>
+
+    <!-- display errors and example text -->
+
     [% IF invalid_require %]
         <span class='patron-reg-invalid'>
             [% l('This field is required') %]
@@ -116,6 +106,12 @@ FOR field_def IN register_fields;
             [% l('The provided value does not have the correct format') %]
         </span>
     [% END %]
+    [% IF example %]
+        <span class='patron-reg-extra'>
+            [% l('(Example: [_1])', example) %]
+        </span>
+    [% END %]
+
     </td>
 </tr>
 [% END;