<div class="modal-header-wrapper">
	<div class="modal-header">
		<div class="pull-right">
            <a class="action" ng-click="cancel()">&times; {{'GENERAL.ACTION.CLOSE' | translate}}</a>
        </div>
		<h2>{{'PROCESS-DEFINITION.POPUP.MIGRATE.TITLE' | translate}} '{{definition.name && definition.name || definition.key}}'</h2>	
	</div>
</div>
<div class="modal-body">
	<p translate="PROCESS-DEFINITION.POPUP.MIGRATE.MESSAGE"></p>
	<table class="edit-table">
        <tr>
            <td class="edit-label" translate="PROCESS-DEFINITION.POPUP.MIGRATE.CURRENT-DEFINITION"></td>
            <td>
                <input type="text" class="form-control" value="{{processDefinition.name ? processDefinition.name : processDefinition.key}} (v{{processDefinition.version}})" disabled>
            </td>

        </tr>
        <tr>
            <td class="edit-label" translate="PROCESS-DEFINITION.POPUP.MIGRATE.TARGET-DEFINITION"></td>
            <td>
                <select ui-select2
                    data-placeholder="{{'PROCESS-INSTANCES.FILTER.ALL-PROCESS-DEFINITIONS' | translate}}"
                    ng-model="model.newProcessDefinition"
                    ng-change="targetProcessDefinitionChanged()"
                    style="min-width:250px">
                <option ng-title="123" ng-repeat="processDefinition in filteredProcessDefinitions" value="{{processDefinition.id}}">{{processDefinition.name ? processDefinition.name : processDefinition.key}} (v{{processDefinition.version}})</option>
             </select>
            </td>
        </tr>
    </table>
</div>

<div class="modal-footer-wrapper">
	<div class="modal-footer">
		<div class="pull-right">
	       <button type="button" class="btn btn-sm btn-default" ng-click="cancel()" ng-disabled="status.loading"
	       	translate="GENERAL.ACTION.CANCEL">
	       	</button>
	       <button type="button" class="btn btn-sm btn-default" ng-click="ok()" ng-disabled="status.loading || model.targetNotSelected"
	        translate="GENERAL.ACTION.OK">
	       </button>
		</div>
        <loading-indicator></loading-indicator>
</div>
</div>