<ion-view view-title="الرد على الاستفتاء ">
    <ion-content class="padding" style="margin-bottom: 20px" >
        <div class="list" >
            <label class="item item-input" style="direction: rtl">
                <input type="text" disabled placeholder="الاسم"ng-model="problem.name">
            </label>
            <label class="item item-input" style="direction: rtl">
                <input type="text" disabled placeholder="الجوال" ng-model="problem.mobile">
            </label>
            <label class="item item-input" style="direction: rtl">
                <textarea type="text" placeholder="السؤال (*)" ng-model="problem.problem_text" style="height: 6em">
                    {{problem.problem_text}}
                </textarea>
            </label>
            <label class="item item-input item-select">
                <div class="input-label">الفقيه  </div>
                <select ng-model="problem.faqih_id" >
                    <option id="{{faqih.faqih_id}}" ng-repeat="faqih in faqih_list" value="{{faqih.faqih_id}}"
                            ng-selected="faqih.faqih_id === problem.faqih_id">{{faqih.faqih_name}}
                    </option>
                </select>
            </label>
            <label class="item item-input item-select">
                <div class="input-label">الكتاب  </div>
                <select ng-model="problem.book_id" ng-change="getChapters(problem.book_id)" >
                    <option id="{{book.book_id}}" ng-repeat="book in books" elem-ready="getChapters(problem.book_id)" value="{{book.book_id}}"
                            ng-selected="book.book_id === '0'" >{{book.book_name}}
                    </option>
                </select>
            </label>
            <label class="item item-input item-select">
                <div class="input-label">الباب  </div>
                <select ng-model="problem.chapter_id" >
                    <option id="{{chapter.chapter_id}}" ng-repeat="chapter in chapters" value="{{chapter.chapter_id}}"
                            ng-selected="chapter.chapter_id === problem.chapter_id">{{chapter.chapter_name}}
                    </option>
                </select>
            </label>

            <label class="item item-input" style="direction: rtl">
                <textarea type="text" placeholder="الجواب" ng-model="problem.solution" style="height: 6em"></textarea>
            </label>


            <ion-scroll direction="x">
    <button class="button inline-button button-balanced"
            ng-click="saveAnswer(problem, 2)">
        حفظ
    </button>
    <button  class="button button-balanced"
            ng-click="saveAnswer(problem, 3)">
        خاص
    </button>
    <button   class="button button-balanced"
            ng-click="saveAnswer(problem, 4)">
        نشر
    </button>
                <button  class="button button-assertive "
                         ng-click="saveAnswer(problem, 0)">
حذف
                </button>
    <button  class="button button-assertive "
            ng-click="cancel()">
رجوع
    </button>
                </ion-scroll>
</div>

        </div>
    </ion-content>
</ion-view>
<!--my-repeat-directive-->