<div class="modal-header">
    <h4 class="modal-title">
        <span class="fa fa-pencil"></span>
        {{ 'template_edit_title' | trans:{}:'path_editor' }} : <strong>&lt;{{ formTemplate.name }}&gt;</strong>
    </h4>
</div>

<div class="modal-body">
    <form name="templateForm" role="form">
        <fieldset class="row">
            <div class="form-group col-md-12">
                <label for="template-name">{{ 'template_name' | trans:{}:'path_editor' }}</label>
                <input type="text" name="template-name" id="template-name" data-ng-model="formTemplate.name" class="form-control" value="{{ formTemplate.name }}" />
            </div>

            <div class="form-group col-md-12">
                <label for="template-description">{{ 'template_description' | trans:{}:'path_editor' }}</label>
                <textarea class="form-control" name="template-description" id="template-description" cols="30" rows="4" data-ng-model="formTemplate.description"></textarea>
            </div>

            <div class="col-md-12">
                <label class="checkbox">
                    <input type="checkbox" ng-model="formTemplate.withResources" />
                    {{ 'template_save_resources' | trans:{}:'path_editor' }}
                </label>
            </div>

            <input type="hidden" ng-model="formTemplate.structure" name="template-step" />
        </fieldset>

        <hr/>

        <div class="row">
            <div class="col-md-12">
                <ul class="tree">
                    <li ng-include="webDir + 'bundles/innovapath/angularjs/Template/Partial/tree-item.html'" onload="step = formTemplate.structure"></li>
                </ul>
            </div>
        </div>
    </form>
</div>

<div class="modal-footer">
    <button class="btn btn-primary" ng-click="save(formTemplate)" ng-disabled="!templateForm.$valid">{{ 'template_save' | trans:{}:'path_editor' }}</button>
    <button class="btn btn-default cancel" ng-click="close()">{{ 'cancel' | trans:{}:'path_editor' }}</button>
</div>