Cumulative Online Modal Alert

2

I have a form on my system and a portion of this form has a cumulative line.

Eg you click a button it adds another input to you type.

My doubts are as follows, if the user does not type anything in this input I need to display this following modal

<div class="modal validaInfusao fade" data-backdrop="static" style="z-index: 1100;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="TituloSalvo"><b>Atenção!</b></h4>
            </div>
            <div class="modal-body">
                <p id="textoSalvo">Confirma que nenhum outro fluido além do fluido do estudo BaSICS foi infundido neste seguimento?</p>

            </div>
            <div class="modal-footer">
                <button type="button" style="margin-right: 500px;" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
            </div>
        </div>
    </div>
</div>

This is my part of cumulative lines

<div class="row" style="margin-left: 15px; margin-top: 15px;">
    <table id="u_incluir" class="celled table" cellspacing="0" style="width: 100%">
        <thead>
            <tr>
                <th>
                    Nome do fluido infundido
                </th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            @{
                var lista2 = ((List<Dia1Model>)ViewBag.dia1Model).Where(x => x.fluidn1 != null && x.vofludn1 != null);
                if (dia1 != null && dia1.Dia1Id > 0 && lista2.Count() > 0)
                {
                    int i = 0;

                    var last = lista2.Last();
                    foreach (var item in lista2)
                    {
                        <tr class="entry">
                            <td>
                                <input type="text" class="form-control numerico volumeSegundo" maxlength="5" name="Lista[@i].vofludn1" value="@item.vofludn1" placeholder="00000">
                            </td>
                            <td>
                                @if (last.Dia1ModelId == item.Dia1ModelId)
                                {
                                    <button class="btn btn-success" type="button" onclick="AddField(this);">
                                        <span class="glyphicon glyphicon-plus"></span>
                                    </button>
                                }
                                else
                                {
                                    <button class="btn btn-danger" type="button" onclick="RemoveField(this);">
                                        <span class="glyphicon glyphicon-minus"></span>
                                    </button>
                                }
                            </td>
                        </tr>
                        i++;
                    }
                }
                else
                {
                    <tr class="entry">
                        <td>
                            <input type="text" class="form-control numerico volumeSegundo" maxlength="5" name="Lista[0].vofludn1" placeholder="00000">
                        </td>
                        <td>
                            <button class="btn btn-success" type="button" onclick="AddField(this);">
                                <span class="glyphicon glyphicon-plus"></span>
                            </button>
                        </td>
                    </tr>
                }
            }
        </tbody>
    </table>
</div>

If vofludn1 is equal to NULL you have to display the above model.

    
asked by anonymous 17.04.2017 / 21:18

0 answers