Last active
February 16, 2016 10:31
-
-
Save Dubiy/689d057606f8815e085f to your computer and use it in GitHub Desktop.
example editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'AppBundle::baseDashboard.html.twig' %} | |
{% block body %} | |
<h1>Issue edit</h1> | |
<div class="issueEditor" ng-controller="IssueEditorCtrl" ng-init="init({{ initData|json_encode }})" ng-submit=""> | |
<div class="row"> | |
<form name="issueForm" class="render" ng-cloak novalidate> | |
<div class="issue_title"> | |
<input ng-model="issue.title"> | |
</div> | |
<div class="issue_color"> | |
<select ng-model="issue.color" ng-change="recalcColor()"> | |
<option ng-repeat="color in colors" value="{{ '{{ color.code }}' }}">{{ '{{ color.name }}' }}</option> | |
</select> | |
</div> | |
<div class="categoryBlock"> | |
<span>Categories:</span> | |
<div class="category" ng-repeat="category in issue.categories" ng-click="removeCategory(category)"> | |
#{{ '{{ category.title }}' }} | |
</div> | |
<select ng-model="categoryId" ng-change="addCategory(categoryId)" ng-disabled="issue.categories.length >= 3"> | |
<option value="" disabled="disabled" ng-if="issue.categories.length < 3">Choose category</option> | |
<option value="" disabled="disabled" ng-if="issue.categories.length >= 3">Issue can be in 3 categories maximum</option> | |
<option ng-repeat="category in categories" value="{{ '{{ category.id }}' }}" ng-if="!hasCategory(category)">{{ '{{ category.title }}' }}</option> | |
</select> | |
</div> | |
<input type="submit" class="btn btn-success" ng-click="saveIssue(issueForm);" value="Save" /> | |
</form> | |
</div> | |
</div> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment