Пример #1
0
 /**
  * подгружаем пустой шаблон секции
  */
 public function action_get_tariff_section_tpl()
 {
     $uidSection = $this->request->post('uid_section');
     $sectionNum = $this->request->post('section_num');
     $section = ['SECTION_NUM' => $sectionNum];
     $html = strval(Model_Tariff::buildSection($uidSection, $section));
     $this->jsonResult(true, ['html' => $html]);
 }
Пример #2
0
            <td>
                <input type="hidden" name="tarif_id" value="<?php 
echo $tariff['TARIF_ID'];
?>
">
                <input type="text" name="tarif_name" class="input_big" value="<?php 
echo $tariff['TARIF_NAME'];
?>
">
            </td>
        </tr>
    </table>

    <?if(!empty($settings)){?>
        <div class="t_sections_list">
            <?foreach($settings as $conditions){
                $section = reset($conditions);
                $uidSection = $tariff['TARIF_ID'].'_'.$section['SECTION_NUM'];
                ?>
                <?php 
echo Model_Tariff::buildSection($uidSection, $section, $tariff['TARIF_ID'], $conditions, $reference);
?>
            <?}?>
        </div>
    <?}?>
    <span class="btn btn_add_section" onclick="addSection($(this))">+ Добавить секцию</span>

    <div class="row_btns">
        <span class="btn btn_green" onclick="saveTariff($(this))"><i class="icon-ok"></i> Сохранить</span>
    </div>
</div>