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

(-)a/admin/patron-attr-types.pl (+2 lines)
Lines 121-126 sub add_update_attribute_type { Link Here
121
    my $searched_by_default       = $input->param('searched_by_default') ? 1 : 0;
121
    my $searched_by_default       = $input->param('searched_by_default') ? 1 : 0;
122
    my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0;
122
    my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0;
123
    my $mandatory                 = $input->param('mandatory') ? 1 : 0;
123
    my $mandatory                 = $input->param('mandatory') ? 1 : 0;
124
    my $opac_mandatory            = $input->param('opac_mandatory') ? 1 : 0;
124
    my $authorised_value_category = $input->param('authorised_value_category');
125
    my $authorised_value_category = $input->param('authorised_value_category');
125
    my $display_checkout          = $input->param('display_checkout') ? 1 : 0;
126
    my $display_checkout          = $input->param('display_checkout') ? 1 : 0;
126
    my $category_code             = $input->param('category_code') || undef;
127
    my $category_code             = $input->param('category_code') || undef;
Lines 158-163 sub add_update_attribute_type { Link Here
158
            searched_by_default       => $searched_by_default,
159
            searched_by_default       => $searched_by_default,
159
            keep_for_pseudonymization => $keep_for_pseudonymization,
160
            keep_for_pseudonymization => $keep_for_pseudonymization,
160
            mandatory                 => $mandatory,
161
            mandatory                 => $mandatory,
162
            opac_mandatory            => $opac_mandatory,
161
            authorised_value_category => $authorised_value_category,
163
            authorised_value_category => $authorised_value_category,
162
            display_checkout          => $display_checkout,
164
            display_checkout          => $display_checkout,
163
            category_code             => $category_code,
165
            category_code             => $category_code,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-2 / +10 lines)
Lines 194-206 Link Here
194
                field to be marked as searchable above
194
                field to be marked as searchable above
195
            </span>
195
            </span>
196
       </li>
196
       </li>
197
       <li><label for="mandatory">Mandatory: </label>
197
       <li><label for="mandatory">Staff interface mandatory: </label>
198
          [% IF attribute_type AND attribute_type.mandatory %]
198
          [% IF attribute_type AND attribute_type.mandatory %]
199
            <input type="checkbox" id="mandatory" name="mandatory" checked="checked" />
199
            <input type="checkbox" id="mandatory" name="mandatory" checked="checked" />
200
          [% ELSE %]
200
          [% ELSE %]
201
            <input type="checkbox" id="mandatory" name="mandatory" />
201
            <input type="checkbox" id="mandatory" name="mandatory" />
202
          [% END %]
202
          [% END %]
203
            <span class="hint">Check to make this attribute mandatory when creating or editing a patron.</span>
203
            <span class="hint">Check to make this attribute mandatory when creating or editing a patron from the staff interface.</span>
204
       </li>
205
       <li><label for="opac_mandatory">OPAC mandatory: </label>
206
          [% IF attribute_type AND attribute_type.opac_mandatory %]
207
            <input type="checkbox" id="opac_mandatory" name="opac_mandatory" checked="checked" />
208
          [% ELSE %]
209
            <input type="checkbox" id="opac_mandatory" name="opac_mandatory" />
210
          [% END %]
211
            <span class="hint">Check to make this attribute mandatory when creating or editing a patron from the OPAC.</span>
204
       </li>
212
       </li>
205
       <li><label for="display_checkout">Display in patron's brief information: </label>
213
       <li><label for="display_checkout">Display in patron's brief information: </label>
206
            [% IF attribute_type AND attribute_type.display_checkout %]
214
            [% IF attribute_type AND attribute_type.display_checkout %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-5 / +4 lines)
Lines 983-989 Link Here
983
                                                    [% IF loop.first %]<a id="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
983
                                                    [% IF loop.first %]<a id="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
984
                                                    [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
984
                                                    [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
985
                                                    <li data-category_code="[% pa.type.category_code | html %]">
985
                                                    <li data-category_code="[% pa.type.category_code | html %]">
986
                                                        [% IF pa.type.mandatory && pa.type.opac_editable %]
986
                                                        [% IF pa.type.opac_mandatory && pa.type.opac_editable %]
987
                                                            <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
987
                                                            <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
988
                                                        [% ELSE %]
988
                                                        [% ELSE %]
989
                                                            <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
989
                                                            <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
Lines 1006-1014 Link Here
1006
                                                                    [% END %]
1006
                                                                    [% END %]
1007
                                                                </select>
1007
                                                                </select>
1008
                                                            [% ELSE %]
1008
                                                            [% ELSE %]
1009
                                                                [% IF ( pa.type.is_date && pa.type.mandatory ) %]
1009
                                                                [% IF ( pa.type.is_date && pa.type.opac_mandatory ) %]
1010
                                                                    <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" required="required" class="flatpickr" />
1010
                                                                    <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" required="required" class="flatpickr" />
1011
                                                                [% ELSIF ( pa.type.is_date && !pa.type.mandatory ) %]
1011
                                                                [% ELSIF ( pa.type.is_date && !pa.type.opac_mandatory ) %]
1012
                                                                    <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" class="flatpickr" />
1012
                                                                    <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" class="flatpickr" />
1013
                                                                [% ELSE %]
1013
                                                                [% ELSE %]
1014
                                                                    <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
1014
                                                                    <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
Lines 1021-1027 Link Here
1021
                                                                [% IF ( pa.type.repeatable ) %]
1021
                                                                [% IF ( pa.type.repeatable ) %]
1022
                                                                    <a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
1022
                                                                    <a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
1023
                                                                [% END %]
1023
                                                                [% END %]
1024
                                                                [% IF pa.type.mandatory %]
1024
                                                                [% IF pa.type.opac_mandatory %]
1025
                                                                    <span class="required_label required">Required</span>
1025
                                                                    <span class="required_label required">Required</span>
1026
                                                                [% END %]
1026
                                                                [% END %]
1027
                                                            </div>
1027
                                                            </div>
1028
- 

Return to bug 35635