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

(-)a/admin/patron-attr-types.pl (+2 lines)
Lines 116-121 sub add_update_attribute_type { Link Here
116
    my $searched_by_default       = $input->param('searched_by_default')       ? 1 : 0;
116
    my $searched_by_default       = $input->param('searched_by_default')       ? 1 : 0;
117
    my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0;
117
    my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0;
118
    my $mandatory                 = $input->param('mandatory')                 ? 1 : 0;
118
    my $mandatory                 = $input->param('mandatory')                 ? 1 : 0;
119
    my $opac_mandatory            = $input->param('opac_mandatory')            ? 1 : 0;
119
    my $authorised_value_category = $input->param('authorised_value_category');
120
    my $authorised_value_category = $input->param('authorised_value_category');
120
    my $display_checkout          = $input->param('display_checkout') ? 1 : 0;
121
    my $display_checkout          = $input->param('display_checkout') ? 1 : 0;
121
    my $category_code             = $input->param('category_code') || undef;
122
    my $category_code             = $input->param('category_code') || undef;
Lines 152-157 sub add_update_attribute_type { Link Here
152
            searched_by_default       => $searched_by_default,
153
            searched_by_default       => $searched_by_default,
153
            keep_for_pseudonymization => $keep_for_pseudonymization,
154
            keep_for_pseudonymization => $keep_for_pseudonymization,
154
            mandatory                 => $mandatory,
155
            mandatory                 => $mandatory,
156
            opac_mandatory            => $opac_mandatory,
155
            authorised_value_category => $authorised_value_category,
157
            authorised_value_category => $authorised_value_category,
156
            display_checkout          => $display_checkout,
158
            display_checkout          => $display_checkout,
157
            category_code             => $category_code,
159
            category_code             => $category_code,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-2 / +11 lines)
Lines 185-197 Link Here
185
                        <span class="hint"> If checked, this field will be included in 'Standard' patron searches. Requires field to be marked as searchable above </span>
185
                        <span class="hint"> If checked, this field will be included in 'Standard' patron searches. Requires field to be marked as searchable above </span>
186
                    </li>
186
                    </li>
187
                    <li
187
                    <li
188
                        ><label for="mandatory">Mandatory: </label>
188
                        ><label for="mandatory">Staff interface mandatory: </label>
189
                        [% IF attribute_type AND attribute_type.mandatory %]
189
                        [% IF attribute_type AND attribute_type.mandatory %]
190
                            <input type="checkbox" id="mandatory" name="mandatory" checked="checked" />
190
                            <input type="checkbox" id="mandatory" name="mandatory" checked="checked" />
191
                        [% ELSE %]
191
                        [% ELSE %]
192
                            <input type="checkbox" id="mandatory" name="mandatory" />
192
                            <input type="checkbox" id="mandatory" name="mandatory" />
193
                        [% END %]
193
                        [% END %]
194
                        <span class="hint">Check to make this attribute mandatory when creating or editing a patron.</span>
194
                        <span class="hint">Check to make this attribute mandatory when creating or editing a patron from the staff interface.</span>
195
                    </li>
196
                    <li
197
                        ><label for="opac_mandatory">OPAC mandatory: </label>
198
                        [% IF attribute_type AND attribute_type.opac_mandatory %]
199
                            <input type="checkbox" id="opac_mandatory" name="opac_mandatory" checked="checked" />
200
                        [% ELSE %]
201
                            <input type="checkbox" id="opac_mandatory" name="opac_mandatory" />
202
                        [% END %]
203
                        <span class="hint">Check to make this attribute mandatory when creating or editing a patron from the OPAC.</span>
195
                    </li>
204
                    </li>
196
                    <li
205
                    <li
197
                        ><label for="display_checkout">Display in patron's brief information: </label>
206
                        ><label for="display_checkout">Display in patron's brief information: </label>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-5 / +4 lines)
Lines 1060-1066 Link Here
1060
                                                        [% IF loop.first %]<a id="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
1060
                                                        [% IF loop.first %]<a id="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
1061
                                                        [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
1061
                                                        [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
1062
                                                        <li data-category_code="[% pa.type.category_code | html %]">
1062
                                                        <li data-category_code="[% pa.type.category_code | html %]">
1063
                                                            [% IF pa.type.mandatory && pa.type.opac_editable %]
1063
                                                            [% IF pa.type.opac_mandatory && pa.type.opac_editable %]
1064
                                                                <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
1064
                                                                <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
1065
                                                            [% ELSE %]
1065
                                                            [% ELSE %]
1066
                                                                <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
1066
                                                                <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
Lines 1079-1087 Link Here
1079
                                                                        [% END %]
1079
                                                                        [% END %]
1080
                                                                    </select>
1080
                                                                    </select>
1081
                                                                [% ELSE %]
1081
                                                                [% ELSE %]
1082
                                                                    [% IF ( pa.type.is_date && pa.type.mandatory ) %]
1082
                                                                    [% IF ( pa.type.is_date && pa.type.opac_mandatory ) %]
1083
                                                                        <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" required="required" class="flatpickr" />
1083
                                                                        <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" required="required" class="flatpickr" />
1084
                                                                    [% ELSIF ( pa.type.is_date && !pa.type.mandatory ) %]
1084
                                                                    [% ELSIF ( pa.type.is_date && !pa.type.opac_mandatory ) %]
1085
                                                                        <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" class="flatpickr" />
1085
                                                                        <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" class="flatpickr" />
1086
                                                                    [% ELSE %]
1086
                                                                    [% ELSE %]
1087
                                                                        <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
1087
                                                                        <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
Lines 1094-1100 Link Here
1094
                                                                    [% IF ( pa.type.repeatable ) %]
1094
                                                                    [% IF ( pa.type.repeatable ) %]
1095
                                                                        <a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
1095
                                                                        <a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
1096
                                                                    [% END %]
1096
                                                                    [% END %]
1097
                                                                    [% IF pa.type.mandatory %]
1097
                                                                    [% IF pa.type.opac_mandatory %]
1098
                                                                        <span class="required_label required">Required</span>
1098
                                                                        <span class="required_label required">Required</span>
1099
                                                                    [% END %]
1099
                                                                    [% END %]
1100
                                                                </div>
1100
                                                                </div>
1101
- 

Return to bug 35635