<div class="editContainer tagManagerManageEdit"
     piwik-content-block
     feature="Tag Manager"
     content-title="{{ editContainer.editTitle }}">

    <p ng-show="editContainer.model.isLoading">
        <span class="loadingPiwik"><img src="plugins/Morpheus/images/loading-blue.gif"/> {{ 'General_LoadingData'|translate }}</span>
    </p>

    <p ng-show="editContainer.model.isUpdating">
        <span class="loadingPiwik"><img src="plugins/Morpheus/images/loading-blue.gif"/> {{ 'TagManager_UpdatingData'|translate }}</span>
    </p>

    <form ng-submit="editContainer.edit ? editContainer.updateContainer() : editContainer.createContainer()">
        <div>
            <div piwik-field uicontrol="text" name="idcontainer"
                 ng-model="editContainer.container.idcontainer"
                 disabled="true"
                 ng-show="editContainer.edit"
                 title="{{ 'General_Id'|translate }}">
            </div>

            <div piwik-field uicontrol="select" name="context"
                 ng-model="editContainer.container.context"
                 disabled="true"
                 ng-change="editContainer.setValueHasChanged()"
                 title="{{ 'TagManager_Context'|translate }}"
                 options="editContainer.contexts"
                 inline-help="{{ 'TagManager_ContainerContextHelp'|translate }}">
            </div>

            <div piwik-field uicontrol="text" name="name"
                 ng-model="editContainer.container.name"
                 maxlength="50"
                 ng-change="editContainer.setValueHasChanged()"
                 title="{{ 'General_Name'|translate }}"
                 inline-help="{{ 'TagManager_ContainerNameHelp'|translate }}">
            </div>

            <div piwik-field uicontrol="textarea" name="description"
                 ng-model="editContainer.container.description"
                 ng-change="editContainer.setValueHasChanged()"
                 title="{{ 'General_Description'|translate }}"
                 inline-help="{{ 'TagManager_ContainerDescriptionHelp'|translate }}">
            </div>

            <div piwik-save-button
                 class="createButton"
                 onconfirm="editContainer.edit ? editContainer.updateContainer() : editContainer.createContainer()"
                 disabled="editContainer.model.isUpdating || !editContainer.isDirty"
                 value="{{ editContainer.edit ? ('CoreUpdater_UpdateTitle'|translate) : ('TagManager_CreateNewContainer'|translate) }}"
                 saving="editContainer.model.isUpdating">
            </div>

            <div class='entityCancel'>
                <a ng-click="editContainer.cancel()">{{ 'General_Cancel'|translate }}</a>
            </div>
        </div>
    </form>
</div>