Closed philgyford closed 1 month ago
This issue seems very similar to issue #168. I've sent PR #180 for close that issue, and if it get positive review i can close this too.
Hi, @smithdc1, actually this issue is not fixed yet.
As you can see, this layout:
test_form.helper.layout = Layout(
TabHolder(
Tab(
"one",
"first_name",
css_id="custom-name",
css_class="first-tab-class active",
),
css_class="test tab-holder-class"
)
)
renders TabHolder without css class test tab-holder-class
:
<form method="post">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" href="#custom-name" data-bs-toggle="tab">One</a></li>
</ul>
<div class="tab-content card-body">
<div id="custom-name" class="tab-pane first-tab-class active">
<div id="div_id_first_name" class="mb-3">
<label for="id_first_name" class="form-label requiredField">
first name<span class="asteriskField">*</span>
</label>
<input type="text" name="first_name" maxlength="5" class="textinput textInput inputtext form-control" required id="id_first_name">
</div>
</div>
</div>
</form>
This Issue can be closed ✔
The tab.html template does not use the
css_class
attribute if supplied toTab()
orTabHolder()