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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-10 / +19 lines)
Lines 788-806 th { Link Here
788
    padding: 3px 4px;
788
    padding: 3px 4px;
789
}
789
}
790
790
791
div {
791
.required_label {
792
    &.required_label {
792
    display: none;
793
        display: none;
794
793
795
        &.required {
794
    &.required {
796
            color: #C00;
795
        color: #C00;
797
            display: block;
796
        display: block;
798
            font-size: 95%;
797
        font-size: 95%;
799
            margin-left: 10rem;
798
        margin-left: 10rem;
800
            margin-top: 3px;
799
        margin-top: 3px;
801
        }
802
    }
800
    }
801
}
803
802
803
.attr-control {
804
    margin-left: 9.5rem;
805
806
    .required {
807
        display: inline-block;
808
        margin-left: 0;
809
    }
810
}
811
812
div {
804
    &.rows {
813
    &.rows {
805
        clear: left;
814
        clear: left;
806
        float: left;
815
        float: left;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-10 / +12 lines)
Lines 1006-1018 Link Here
1006
                                                            [% ELSE %]
1006
                                                            [% ELSE %]
1007
                                                                <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
1007
                                                                <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
1008
                                                            [% END %]
1008
                                                            [% END %]
1009
                                                            [% IF pa.type.mandatory %]
1009
                                                            <div class="attr-control">
1010
                                                                <div class="required">Required</div>
1010
                                                                <a href="#" class="btn btn-sm btn-link clear-attribute"><i class="fa fa-remove" aria-hidden="true"></i> Clear</a>
1011
                                                            [% END %]
1011
                                                                [% IF ( pa.type.repeatable ) %]
1012
                                                            <a href="#" class="clear-attribute">Clear</a>
1012
                                                                    <a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
1013
                                                            [% IF ( pa.type.repeatable ) %]
1013
                                                                [% END %]
1014
                                                            <a href="#" class="clone-attribute">New</a>
1014
                                                                [% IF pa.type.mandatory %]
1015
                                                            [% END %]
1015
                                                                    <span class="required_label required">Required</span>
1016
                                                                [% END %]
1017
                                                            </div>
1016
                                                        [% ELSE %]
1018
                                                        [% ELSE %]
1017
                                                            [% IF ( pa.type.authorised_value_category ) %]
1019
                                                            [% IF ( pa.type.authorised_value_category ) %]
1018
                                                                [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
1020
                                                                [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
Lines 1231-1243 Link Here
1231
1233
1232
            $(".patron-attributes").on( 'click', '.clear-attribute', function(e) {
1234
            $(".patron-attributes").on( 'click', '.clear-attribute', function(e) {
1233
                e.preventDefault();
1235
                e.preventDefault();
1234
                $(this).parent()
1236
                $(this).closest("li")
1235
                    .find('textarea').val("").end()
1237
                    .find('textarea').val("").end()
1236
                    .find('select').val("").end();
1238
                    .find('select').val("").end();
1237
            } );
1239
            } );
1238
1240
1239
            $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1241
            $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1240
                var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1242
                let li = $(this).closest("li");
1243
                var clone = li.clone().insertAfter( li );
1241
1244
1242
                var newId = 50 + parseInt(Math.random() * 100000);
1245
                var newId = 50 + parseInt(Math.random() * 100000);
1243
                $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1246
                $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1244
- 

Return to bug 35144