Add active flag to create battery model form. #732

This commit is contained in:
Korina Cordero 2023-02-01 10:41:57 +00:00
parent f5c351b179
commit 57b5fcf7ed

View file

@ -14,37 +14,51 @@
<!--Begin::Section--> <!--Begin::Section-->
<div class="row"> <div class="row">
<div class="col-xl-6"> <div class="col-xl-6">
<div class="m-portlet m-portlet--mobile"> <div class="m-portlet m-portlet--mobile">
<div class="m-portlet__head"> <div class="m-portlet__head">
<div class="m-portlet__head-caption"> <div class="m-portlet__head-caption">
<div class="m-portlet__head-title"> <div class="m-portlet__head-title">
<span class="m-portlet__head-icon"> <span class="m-portlet__head-icon">
<i class="fa fa-cube"></i> <i class="fa fa-cube"></i>
</span> </span>
<h3 class="m-portlet__head-text"> <h3 class="m-portlet__head-text">
{% if mode == 'update' %} {% if mode == 'update' %}
Edit Model Edit Model
<small>{{ obj.getName() }}</small> <small>{{ obj.getName() }}</small>
{% else %} {% else %}
New Model New Model
{% endif %} {% endif %}
</h3> </h3>
</div> </div>
</div> </div>
</div> </div>
<form id="row-form" class="m-form m-form--fit m-form--label-align-right m-form--group-seperator-dashed" method="post" action="{{ mode == 'update' ? url('bmodel_update_submit', {'id': obj.getId()}) : url('bmodel_create_submit') }}"> <form id="row-form" class="m-form m-form--fit m-form--label-align-right m-form--group-seperator-dashed" method="post" action="{{ mode == 'update' ? url('bmodel_update_submit', {'id': obj.getId()}) : url('bmodel_create_submit') }}">
<div class="m-portlet__body"> <div class="m-portlet__body">
<div class="form-group m-form__group row"> <div class="form-group m-form__group row no-border">
<label class="col-lg-3 col-form-label" data-field="name"> <label class="col-lg-3 col-form-label" data-field="name">
Name: Name:
</label> </label>
<div class="col-lg-9"> <div class="col-lg-9">
<input type="text" name="name" class="form-control m-input" value="{{ obj.getName() }}"> <input type="text" name="name" class="form-control m-input" value="{{ obj.getName() }}">
<div class="form-control-feedback hide" data-field="name"></div> <div class="form-control-feedback hide" data-field="name"></div>
<span class="m-form__help">Display name for this model</span> <span class="m-form__help">Display name for this model</span>
</div> </div>
</div> </div>
</div> <div class="form-group m-form__group row">
<div class="col-lg-3">
</div>
<div class="col-lg-9">
<span class="m-switch m-switch--icon block-switch">
<label>
<input type="checkbox" name="flag_active" id="flag_active" value="1"{{ obj.isActive() ? ' checked' }}>
<label class="switch-label">Active</label>
<span></span>
</label>
</span>
<div class="form-control-feedback hide" data-field="flag_active"></div>
</div>
</div>
</div>
<div class="m-portlet__foot m-portlet__foot--fit"> <div class="m-portlet__foot m-portlet__foot--fit">
<div class="m-form__actions m-form__actions--solid m-form__actions--right"> <div class="m-form__actions m-form__actions--solid m-form__actions--right">
<div class="row"> <div class="row">