Deon George 3c1580aa36
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 32s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m20s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m32s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
Fix when cloning an attribute, ensure we blank out the previous value. When processing request submission '0' could be a valid value.
2025-01-17 18:38:57 +11:00

22 lines
835 B
PHP

@if($o->is_rdn)
<span class="btn btn-sm btn-outline-focus mt-3"><i class="fas fa-fw fa-exchange"></i> @lang('Rename')</span>
@elseif($edit && $o->can_addvalues)
<span class="p-0 m-0">
<span @class(['btn','btn-sm','btn-outline-primary','mt-3','addable','d-none'=>(! $new)]) id="{{ $o->name_lc }}"><i class="fas fa-fw fa-plus"></i> @lang('Add Value')</span>
</span>
@endif
@section('page-scripts')
@if($edit && $o->can_addvalues)
<script type="text/javascript">
$(document).ready(function() {
// Create a new entry when Add Value clicked
$('#{{ $o->name_lc }}.addable').click(function (item) {
var cln = $(this).parent().parent().find('input:last').clone();
cln.attr('value','').attr('placeholder', '[@lang('NEW')]');
cln.appendTo('#' + item.currentTarget.id)
});
});
</script>
@endif
@append