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 153-158 sub add_update_attribute_type { Link Here
153
            searched_by_default       => $searched_by_default,
154
            searched_by_default       => $searched_by_default,
154
            keep_for_pseudonymization => $keep_for_pseudonymization,
155
            keep_for_pseudonymization => $keep_for_pseudonymization,
155
            mandatory                 => $mandatory,
156
            mandatory                 => $mandatory,
157
            opac_mandatory            => $opac_mandatory,
156
            authorised_value_category => $authorised_value_category,
158
            authorised_value_category => $authorised_value_category,
157
            display_checkout          => $display_checkout,
159
            display_checkout          => $display_checkout,
158
            category_code             => $category_code,
160
            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 995-1001 Link Here
995
                                                    [% IF loop.first %]<a id="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
995
                                                    [% IF loop.first %]<a id="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
996
                                                    [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
996
                                                    [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
997
                                                    <li data-category_code="[% pa.type.category_code | html %]">
997
                                                    <li data-category_code="[% pa.type.category_code | html %]">
998
                                                        [% IF pa.type.mandatory && pa.type.opac_editable %]
998
                                                        [% IF pa.type.opac_mandatory && pa.type.opac_editable %]
999
                                                            <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
999
                                                            <label for="[% form_id | html %]" class="required">[% pa.type.description | html %]: </label>
1000
                                                        [% ELSE %]
1000
                                                        [% ELSE %]
1001
                                                            <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
1001
                                                            <label for="[% form_id | html %]">[% pa.type.description | html %]: </label>
Lines 1018-1026 Link Here
1018
                                                                    [% END %]
1018
                                                                    [% END %]
1019
                                                                </select>
1019
                                                                </select>
1020
                                                            [% ELSE %]
1020
                                                            [% ELSE %]
1021
                                                                [% IF ( pa.type.is_date && pa.type.mandatory ) %]
1021
                                                                [% IF ( pa.type.is_date && pa.type.opac_mandatory ) %]
1022
                                                                    <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" required="required" class="flatpickr" />
1022
                                                                    <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" required="required" class="flatpickr" />
1023
                                                                [% ELSIF ( pa.type.is_date && !pa.type.mandatory ) %]
1023
                                                                [% ELSIF ( pa.type.is_date && !pa.type.opac_mandatory ) %]
1024
                                                                    <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" class="flatpickr" />
1024
                                                                    <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" class="flatpickr" />
1025
                                                                [% ELSE %]
1025
                                                                [% ELSE %]
1026
                                                                    <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
1026
                                                                    <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
Lines 1033-1039 Link Here
1033
                                                                [% IF ( pa.type.repeatable ) %]
1033
                                                                [% IF ( pa.type.repeatable ) %]
1034
                                                                    <a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
1034
                                                                    <a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
1035
                                                                [% END %]
1035
                                                                [% END %]
1036
                                                                [% IF pa.type.mandatory %]
1036
                                                                [% IF pa.type.opac_mandatory %]
1037
                                                                    <span class="required_label required">Required</span>
1037
                                                                    <span class="required_label required">Required</span>
1038
                                                                [% END %]
1038
                                                                [% END %]
1039
                                                            </div>
1039
                                                            </div>
1040
- 

Return to bug 35635