@*
 * Copyright 2017 HM Revenue & Customs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *@

@import include._
@import forms2._
@import models.tradingpremises.TradingPremises

@(f: forms.Form2[_], tradingpremises: Seq[TradingPremises], legend: String, call: Call)(implicit lang:Lang, m:Messages, request: Request[_])

<p>@Messages("lbl.select.all")</p>

<div class="form-group">
    @fieldset(
        f = f("tradingPremises-fieldset"),
        legend = legend,
        legendHidden = true,
        panel = false
    ) {
        @errorGroup(
          field = f("tradingPremises")
        ) {
            @form(f, call) {
                @tradingpremises.zipWithIndex.map{ case (tp, index) =>
                    @checkbox(f = f("tradingPremises[]"), labelText = tp.label.getOrElse(index.toString), value = index.toString)
                }
            }
        }
    }
</div>

@*
 * Copyright 2017 HM Revenue & Customs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *@

@import include._
@import forms2._
@import models.tradingpremises.TradingPremises

@(f: forms.Form2[_], tradingpremises: Seq[TradingPremises], legend: String, call: Call)(implicit lang:Lang, m:Messages, request: Request[_])

<p>@Messages("lbl.select.all")</p>

<div class="form-group">
    @fieldset(
        f = f("tradingPremises-fieldset"),
        legend = legend,
        legendHidden = true,
        panel = false
    ) {
        @errorGroup(
          field = f("tradingPremises")
        ) {
            @form(f, call) {
                @tradingpremises.zipWithIndex.map{ case (tp, index) =>
                    @checkbox(f = f("tradingPremises[]"), labelText = tp.label.getOrElse(index.toString), value = index.toString)
                }
                @submit()
            }
        }
    }
</div>
Add submit to bm trading_premises include
Add submit to bm trading_premises include
