PHP Classes

File: view/melis-tool-creator/tool-creator/render-step2.phtml

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis Tool Creator   view/melis-tool-creator/tool-creator/render-step2.phtml   Download  
File: view/melis-tool-creator/tool-creator/render-step2.phtml
Role: Example script
Content type: text/plain
Description: Example script
Class: Melis Tool Creator
Module for the Melis CMS to create tools
Author: By
Last change:
Date: 1 year ago
Size: 3,732 bytes
 

Contents

Class file image Download
<div id="<?php echo $this->id; ?>" class="steps-content">
    <div class="row">
        <div class="col-sm-12">
            <h3><?php echo $this->translate('tr_melistoolcreator_texts_title') ?></h3>
            <p><?php echo $this->translate('tr_melistoolcreator_texts_desc') ?></p>
        </div>
        <div class="col-xs-12 col-md-3">
            <div class="product-text-tab-container">
                <ul class="nav-tabs product-text-tab">
                    <?php $ctr = 0; foreach ($this->languages As $key => $val):?>
<li class="<?php echo ($ctr++) ?: 'active'?>">
                            <a class="clearfix" data-toggle="tab" href="#toolcreator-text-transaltions-<?php echo $val['lang_locale']?>" aria-expanded="false">
                                <?php echo $val['lang_label']?>
</a>
                        </li>
                    <?php endforeach;?>
</ul>
            </div>
        </div>
        <div class="col-xs-12 col-md-9">
            <div class="tab-content">
                <?php $ctr = 0; foreach ($this->step2Form As $key => $form):?>
<div id="toolcreator-text-transaltions-<?php echo $key ?>" class="tab-pane <?php echo ($ctr++) ? '': 'active'?>">
                        <?php
                            $form
->prepare();
                           
$form->setAttribute('id', $form->getAttribute('id').'-'.$key);

                           
$form->setAttribute('id', $key.'-'.$form->getAttribute('id'));

                            echo
$this->form()->openTag($form);

                            foreach (
$form->getElements() As $key => $val){

                                if (
$val->getLabel()){

                                    if(!empty(
$val->getOption('tooltip'))){

                                       
$val->setLabelOptions(array('disable_html_escape' => true));
                                       
$required = $val->getAttribute('required') ? ' *' : '';
                                       
$label = $val->getLabel().$required.'<i class="fa fa-info-circle fa-lg tip-info" data-toggle="tooltip" data-placement="left" title="" data-original-title="'.$val->getOption('tooltip').'"></i>';

                                       
$val->setLabelAttributes(['class' => 'd-flex flex-row justify-content-between']);
                                       
$val->setLabel($label);

                                        if (!empty(
$this->formElementErrors($val))){
                                           
$val->setLabelAttributes(array('class' => 'text-danger'));
                                        }
                                    }

                                    echo
'<div class="form-group">';
                                    echo
$this->formLabel($val);
                                }

                                echo
$this->formElement($val);

                                if (
$val->getLabel()){
                                    echo
$this->formElementErrors($val, array('class' => 'text-danger'));
                                    echo
'</div>';
                                }
                            }

                            echo
$this->form()->closeTag();
                       
?>
</div>
                <?php endforeach;?>
</div>
        </div>
    </div>

    <button class="btn btn-default btn-steps" data-curstep="2" data-nxtstep="1"><?php echo $this->translate('tr_melistoolcreator_back') ?></button>
    <button class="btn btn-default float-right btn-steps tcf-validate" data-curstep="2" data-nxtstep="3"><?php echo $this->translate('tr_melistoolcreator_next') ?></button>
</div>