PHP Classes

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

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis Tool Creator   view/melis-tool-creator/tool-creator/render-step1.phtml   Download  
File: view/melis-tool-creator/tool-creator/render-step1.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: 1,472 bytes
 

Contents

Class file image Download
<div id="<?php echo $this->id; ?>" class="steps-content">
    <h3><?php echo $this->translate('tr_melistoolcreator_module_title') ?></h3>
    <p><?php echo $this->translate('tr_melistoolcreator_module_desc') ?></p>
    <div class="row">
        <div class="col-md-12">
            <?php
                $form
= $this->step1Form;
                echo
$this->form()->openTag($form);
                echo
$this->melisFieldCollection($form);
                echo
$this->form()->closeTag();
           
?>
</div>
    </div>
    <?php
        $toolType
= $form->get('tcf-tool-type')->getValue();

        if (!empty(
$toolType)) {
           
$scrptTag = '<script>%s</script>';
           
$scrpt = '$(".tcf-tool-type").parents(".form-group").hide();
            $(".tcf-tool-type-'
.$toolType.'").parents(".form-group").show();';

            if (
$form->has('tcf-create-framework-tool')) {
               
$scrpt .= 'if ($("input[name=\'tcf-create-framework-tool\']").parents(".make-switch").find(".switch-animate").hasClass("switch-off")) {
                    $("input[name=\'tcf-tool-framework\']").parents(".form-group").hide();
                }'
;
            }

            echo
sprintf($scrptTag, $scrpt);
        }
   
?>
<div style="text-align: right;">
        <button class="btn btn-default btn-steps tcf-validate" data-curstep="1" data-nxtstep="2" data-validate="true"><?php echo $this->translate('tr_melistoolcreator_next') ?></button>
    </div>
</div>