<xf:if is="$scope.isInsert()">
	<xf:title>{{ phrase('add_api_scope') }}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_api_scope') }}: {$permission.title}</xf:title>
</xf:if>

<xf:pageaction if="$scope.isUpdate()">
	<xf:button href="{{ link('api-scopes/delete', $scope) }}" icon="delete" overlay="true" />
</xf:pageaction>

<xf:form action="{{ link('api-scopes/save', $scope) }}" class="block" ajax="true">
	<div class="block-container">
		<div class="block-body">

			<xf:textboxrow name="api_scope_id" value="{$scope.api_scope_id}"
				maxlength="{{ max_length($scope, 'api_scope_id') }}"
				label="{{ phrase('scope_id') }}"
				dir="ltr" />

			<xf:textboxrow name="description" value="{{ $scope.exists() ? $scope.MasterDescription.phrase_text : '' }}"
				label="{{ phrase('description') }}" />

			<xf:macro template="addon_macros" name="addon_edit" arg-addOnId="{$scope.addon_id}" />
		</div>

		<xf:submitrow sticky="true" icon="save" />
	</div>
</xf:form>