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 778-796 th { Link Here
778
    padding: 3px 4px;
778
    padding: 3px 4px;
779
}
779
}
780
780
781
div {
781
.required_label {
782
    &.required_label {
782
    display: none;
783
        display: none;
784
783
785
        &.required {
784
    &.required {
786
            color: #C00;
785
        color: #C00;
787
            display: block;
786
        display: block;
788
            font-size: 95%;
787
        font-size: 95%;
789
            margin-left: 10rem;
788
        margin-left: 10rem;
790
            margin-top: 3px;
789
        margin-top: 3px;
791
        }
792
    }
790
    }
791
}
793
792
793
.attr-control {
794
    margin-left: 9.5rem;
795
796
    .required {
797
        display: inline-block;
798
        margin-left: 0;
799
    }
800
}
801
802
div {
794
    &.rows {
803
    &.rows {
795
        clear: left;
804
        clear: left;
796
        float: left;
805
        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