    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><i class="icon-remove"></i></button>
        <h3 class="title"></h3>
    </div>
    <div class="modal-body">

        <form class="pgui-edit-form form-horizontal" enctype="multipart/form-data" method="POST" action="<?php echo $this->_tpl_vars['Grid']['FormAction']; ?>
">
            <fieldset>

                <input type="hidden" name="edit_operation" value="commit_insert" />
                <input id="submit-action" name="submit1" type="hidden" value="save">
                <?php $_from = $this->_tpl_vars['HiddenValues']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['HiddenValueName'] => $this->_tpl_vars['HiddenValue']):
?>
                    <input type="hidden" name="<?php echo $this->_tpl_vars['HiddenValueName']; ?>
" value="<?php echo $this->_tpl_vars['HiddenValue']; ?>
" />
                <?php endforeach; endif; unset($_from); ?>

                <?php $_from = $this->_tpl_vars['Grid']['Columns']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['EditColumns'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['EditColumns']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['Column']):
        $this->_foreach['EditColumns']['iteration']++;
?>
                    <div class="control-group">
                        <label class="control-label">
                            <?php echo $this->_tpl_vars['Column']['Caption']; ?>

                            <?php if ($this->_tpl_vars['Column']['Required']): ?><span class="required-mark">*</span><?php endif; ?>
                        <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "edit_field_options.tpl", 'smarty_include_vars' => array('Column' => $this->_tpl_vars['Column'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
                        </label>
                        <div class="controls">
                            <?php echo $this->_tpl_vars['Column']['Editor']; ?>

                        </div>
                    </div>
                <?php endforeach; endif; unset($_from); ?>

                    <div class="control-group">
                        <div class="controls">
                            <span class="required-mark">*</span> - <?php echo $this->_tpl_vars['Captions']->GetMessageString('RequiredField'); ?>

                        </div>
                    </div>
                </fieldset>
        </form>

        <div class="error-container"></div>
    </div>

    <div class="modal-footer">

        <div class="btn-toolbar">

            <div class="btn-group">
                <button class="btn cancel-button"><?php echo $this->_tpl_vars['Captions']->GetMessageString('Cancel'); ?>
</button>
            </div>

            <div class="btn-group">
                <button type="submit" class="btn btn-primary submit-button">
                <?php echo $this->_tpl_vars['Captions']->GetMessageString('Save'); ?>

                </button>
                <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <li data-value="save"><a href="#" id="save"><?php echo $this->_tpl_vars['Captions']->GetMessageString('SaveAndBackToList'); ?>
</a></li>
                    <li data-value="saveedit"><a href="#" id="saveedit"><?php echo $this->_tpl_vars['Captions']->GetMessageString('SaveAndEdit'); ?>
</a></li>
                    <li data-value="saveinsert"><a href="#" id="saveinsert"><?php echo $this->_tpl_vars['Captions']->GetMessageString('SaveAndInsert'); ?>
</a></li>
                </ul>
            </div>
        </div>

    </div>
    <script type="text/javascript">
        <?php echo '
        function InsertForm_initd(editors) {
        '; ?>
<?php echo $this->_tpl_vars['Grid']['OnLoadScript']; ?>
<?php echo '
        }
        '; ?>

    </script>
