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 780-798 th { Link Here
780
    padding: 3px 4px;
780
    padding: 3px 4px;
781
}
781
}
782
782
783
div {
783
.required_label {
784
    &.required_label {
784
    display: none;
785
        display: none;
786
785
787
        &.required {
786
    &.required {
788
            color: #C00;
787
        color: #C00;
789
            display: block;
788
        display: block;
790
            font-size: 95%;
789
        font-size: 95%;
791
            margin-left: 10rem;
790
        margin-left: 10rem;
792
            margin-top: 3px;
791
        margin-top: 3px;
793
        }
794
    }
792
    }
793
}
795
794
795
.attr-control {
796
    margin-left: 9.5rem;
797
798
    .required {
799
        display: inline-block;
800
        margin-left: 0;
801
    }
802
}
803
804
div {
796
    &.rows {
805
    &.rows {
797
        clear: left;
806
        clear: left;
798
        float: left;
807
        float: left;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (-10 / +11 lines)
Lines 976-988 Link Here
976
                                                            [% ELSE %]
976
                                                            [% ELSE %]
977
                                                                <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
977
                                                                <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea>
978
                                                            [% END %]
978
                                                            [% END %]
979
                                                            [% IF pa.type.mandatory %]
979
                                                            <div class="attr-control">
980
                                                                <div class="required">Required</div>
980
                                                                <a href="#" class="btn btn-sm btn-link clear-attribute"><i class="fa fa-remove" aria-hidden="true"></i> Clear</a>
981
                                                            [% END %]
981
                                                                [% IF ( pa.type.repeatable ) %]
982
                                                            <a href="#" class="clear-attribute">Clear</a>
982
                                                                    <a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
983
                                                            [% IF ( pa.type.repeatable ) %]
983
                                                                [% END %]
984
                                                            <a href="#" class="clone-attribute">New</a>
984
                                                                [% IF pa.type.mandatory %]
985
                                                            [% END %]
985
                                                                    <span class="required_label required">Required</span>
986
                                                                [% END %]
987
                                                            </div>
986
                                                        [% ELSE %]
988
                                                        [% ELSE %]
987
                                                            [% IF ( pa.type.authorised_value_category ) %]
989
                                                            [% IF ( pa.type.authorised_value_category ) %]
988
                                                                [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
990
                                                                [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %]
Lines 1201-1213 Link Here
1201
1203
1202
            $(".patron-attributes").on( 'click', '.clear-attribute', function(e) {
1204
            $(".patron-attributes").on( 'click', '.clear-attribute', function(e) {
1203
                e.preventDefault();
1205
                e.preventDefault();
1204
                $(this).parent()
1206
                $(this).parent().parent()
1205
                    .find('textarea').val("").end()
1207
                    .find('textarea').val("").end()
1206
                    .find('select').val("").end();
1208
                    .find('select').val("").end();
1207
            } );
1209
            } );
1208
1210
1209
            $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1211
            $(".patron-attributes").on( 'click', '.clone-attribute', function() {
1210
                var clone = $(this).parent().clone().insertAfter( $(this).parent() );
1212
                var clone = $(this).parent().parent().clone().insertAfter( $(this).parent().parent() );
1211
1213
1212
                var newId = 50 + parseInt(Math.random() * 100000);
1214
                var newId = 50 + parseInt(Math.random() * 100000);
1213
                $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1215
                $('input[type!="hidden"],select,textarea', clone).attr('id', 'patron-attr-' + newId).attr('value', '');
1214
- 

Return to bug 35144