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

(-)a/admin/patron-attr-types.pl (-12 / +12 lines)
Lines 92-110 sub error_add_attribute_type_form { Link Here
92
    $template->param(description => $input->param('description'));
92
    $template->param(description => $input->param('description'));
93
93
94
    if ($input->param('repeatable')) {
94
    if ($input->param('repeatable')) {
95
        $template->param(repeatable_checked => 'checked="checked"');
95
        $template->param(repeatable_checked => 1);
96
    }
96
    }
97
    if ($input->param('unique_id')) {
97
    if ($input->param('unique_id')) {
98
        $template->param(unique_id_checked => 'checked="checked"');
98
        $template->param(unique_id_checked => 1);
99
    }
99
    }
100
    if ($input->param('password_allowed')) {
100
    if ($input->param('password_allowed')) {
101
        $template->param(password_allowed_checked => 'checked="checked"');
101
        $template->param(password_allowed_checked => 1);
102
    }
102
    }
103
    if ($input->param('opac_display')) {
103
    if ($input->param('opac_display')) {
104
        $template->param(opac_display_checked => 'checked="checked"');
104
        $template->param(opac_display_checked => 1);
105
    }
105
    }
106
    if ($input->param('staff_searchable')) {
106
    if ($input->param('staff_searchable')) {
107
        $template->param(staff_searchable_checked => 'checked="checked"');
107
        $template->param(staff_searchable_checked => 1);
108
    }
108
    }
109
109
110
    $template->param(
110
    $template->param(
Lines 206-226 sub edit_attribute_type_form { Link Here
206
    $template->param(description => $attr_type->description());
206
    $template->param(description => $attr_type->description());
207
207
208
    if ($attr_type->repeatable()) {
208
    if ($attr_type->repeatable()) {
209
        $template->param(repeatable_checked => 'checked="checked"');
209
        $template->param(repeatable_checked => 1);
210
    }
210
    }
211
    $template->param(repeatable_disabled => 'disabled="disabled"');
211
    $template->param(repeatable_disabled => 1);
212
    if ($attr_type->unique_id()) {
212
    if ($attr_type->unique_id()) {
213
        $template->param(unique_id_checked => 'checked="checked"');
213
        $template->param(unique_id_checked => 1);
214
    }
214
    }
215
    $template->param(unique_id_disabled => 'disabled="disabled"');
215
    $template->param(unique_id_disabled => 1);
216
    if ($attr_type->password_allowed()) {
216
    if ($attr_type->password_allowed()) {
217
        $template->param(password_allowed_checked => 'checked="checked"');
217
        $template->param(password_allowed_checked => 1);
218
    }
218
    }
219
    if ($attr_type->opac_display()) {
219
    if ($attr_type->opac_display()) {
220
        $template->param(opac_display_checked => 'checked="checked"');
220
        $template->param(opac_display_checked => 1);
221
    }
221
    }
222
    if ($attr_type->staff_searchable()) {
222
    if ($attr_type->staff_searchable()) {
223
        $template->param(staff_searchable_checked => 'checked="checked"');
223
        $template->param(staff_searchable_checked => 1);
224
    }
224
    }
225
225
226
    authorised_value_category_list($template, $attr_type->authorised_value_category());
226
    authorised_value_category_list($template, $attr_type->authorised_value_category());
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-6 / +41 lines)
Lines 101-125 function CheckAttributeTypeForm(f) { Link Here
101
                  value="[% description |html %]" />
101
                  value="[% description |html %]" />
102
       </li>
102
       </li>
103
       <li><label for="repeatable">Repeatable: </label>
103
       <li><label for="repeatable">Repeatable: </label>
104
            <input type="checkbox" id="repeatable" name="repeatable" [% repeatable_checked %] [% repeatable_disabled %] />
104
            [% IF ( repeatable_checked ) %]
105
              [% IF ( repeatable_disabled ) %]
106
                <input type="checkbox" id="repeatable" name="repeatable" checked="checked" disabled="disabled" />
107
              [% ELSE %]
108
                <input type="checkbox" id="repeatable" name="repeatable" checked="checked" />
109
              [% END %]
110
            [% ELSE %]
111
              [% IF ( repeatable_disabled ) %]
112
                <input type="checkbox" id="repeatable" name="repeatable" disabled="disabled" />
113
              [% ELSE %]
114
                <input type="checkbox" id="repeatable" name="repeatable" />
115
              [% END %]
116
            [% END %]
105
            <span>Check to let a patron record have multiple values of this attribute.  
117
            <span>Check to let a patron record have multiple values of this attribute.  
106
                  This setting cannot be changed after an attribute is defined.</span>
118
                  This setting cannot be changed after an attribute is defined.</span>
107
       </li>
119
       </li>
108
       <li><label for="unique_id">Unique identifier: </label>
120
       <li><label for="unique_id">Unique identifier: </label>
109
            <input type="checkbox" id="unique_id" name="unique_id" [% unique_id_checked %] [% unique_id_disabled %] />
121
            [% IF ( unique_id_checked ) %]
122
              [% IF ( unique_id_disabled ) %]
123
                <input type="checkbox" id="unique_id" name="unique_id" checked="checked" disabled="disabled" />
124
              [% ELSE %]
125
                <input type="checkbox" id="unique_id" name="unique_id" checked="checked" />
126
              [% END %]
127
            [% ELSE %]
128
              [% IF ( unique_id_disabled ) %]
129
                <input type="checkbox" id="unique_id" name="unique_id" disabled="disabled" />
130
              [% ELSE %]
131
                <input type="checkbox" id="unique_id" name="unique_id" />
132
              [% END %]
133
            [% END %]
110
            <span>If checked, attribute will be a unique identifier &mdash; if a value is given to a patron record, the same value
134
            <span>If checked, attribute will be a unique identifier &mdash; if a value is given to a patron record, the same value
111
                  cannot be given to a different record.  This setting cannot be changed after an attribute is defined.</span>
135
                  cannot be given to a different record.  This setting cannot be changed after an attribute is defined.</span>
112
       </li>
136
       </li>
113
       <li><label for="password_allowed">Allow password: </label>
137
       <li><label for="password_allowed">Allow password: </label>
114
            <input type="checkbox" id="password_allowed" name="password_allowed" [% password_allowed_checked %] />
138
          [% IF ( password_allowed_checked ) %]
139
            <input type="checkbox" id="password_allowed" name="password_allowed" checked="checked" />
140
          [% ELSE %]
141
            <input type="checkbox" id="password_allowed" name="password_allowed" />
142
          [% END %]
115
            <span>Check to make it possible to associate a password with this attribute.</span>
143
            <span>Check to make it possible to associate a password with this attribute.</span>
116
       </li>
144
       </li>
117
       <li><label for="opac_display">Display in OPAC: </label>
145
       <li><label for="opac_display">Display in OPAC: </label>
118
            <input type="checkbox" id="opac_display" name="opac_display" [% opac_display_checked %] />
146
          [% IF ( opac_display_checked ) %]
147
            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
148
          [% ELSE %]
149
            <input type="checkbox" id="opac_display" name="opac_display" />
150
          [% END %]
119
            <span>Check to display this attribute on a patron's details page in the OPAC.</span>
151
            <span>Check to display this attribute on a patron's details page in the OPAC.</span>
120
       </li>
152
       </li>
121
       <li><label for="staff_searchable">Searchable: </label>
153
       <li><label for="staff_searchable">Searchable: </label>
122
            <input type="checkbox" id="staff_searchable" name="staff_searchable" [% staff_searchable_checked %] />
154
          [% IF ( staff_searchable_checked ) %]
155
            <input type="checkbox" id="staff_searchable" name="staff_searchable" checked="checked" />
156
          [% ELSE %]
157
            <input type="checkbox" id="staff_searchable" name="staff_searchable" />
158
          [% END %]
123
            <span>Check to make this attribute staff_searchable in the staff patron search.</span>
159
            <span>Check to make this attribute staff_searchable in the staff patron search.</span>
124
       </li>
160
       </li>
125
        <li><label for="authorised_value_category">Authorized value category: </label>
161
        <li><label for="authorised_value_category">Authorized value category: </label>
126
- 

Return to bug 6458