<div class="modal-header">
    <button type="button" class="close closebtn" data-ng-click="cancel()" aria-hidden="true">&times;</button>
    <h1 class="modal-title">{{'A to Z list' | translate}}</h1>
</div>
<div class="modal-body">
    <form>
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="control-label">{{'Template' | translate}}</label>
                        <wizdom365-template-picker template-url="data.templateUrl" directory-path="Manual/Templates/ViewTemplates/AtoZ"></wizdom365-template-picker>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{'Web for search' | translate}}</label>
                        <input type="text" class="form-control" ng-model="data.siteUrl" />
                        {{'If left empty, it will search in all site collections.' | translate}}
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{'Letters' | translate}}</label>
                        <input type="text" class="form-control" ng-model="data.alphabet" />
                        Example: {{'#ABCDEFGHIJKLMNOPQRSTUVWXYZ' | translate}}
                    </div> 
                    
                    <!-- default view setting -->
                    <div class="form-group" >
                        <label class="control-label">{{'Default View' | translate}}</label>

                        <div class="radio">
                            <label class="control-label" for="option1">
                                <input type="radio" id="option1" ng-model="data.defaultView" value="FirstUsedLetter" />{{'First letter that contains pages' | translate}}
                            </label>
                        </div>
                        <div class="radio">
                            <label class="control-label" for="option2">
                                <input type="radio" id="option2" ng-model="data.defaultView" value="All" />{{'All' | translate}}
                            </label>
                        </div>
                        <div class="radio">
                            <label class="control-label" for="option3">
                                <input type="radio" id="option3" ng-model="data.defaultView" value="SpecificLetter" />{{'Specific letter' | translate}}
                            </label>
                        </div>

                        <div ng-hide="data.defaultView!='SpecificLetter'">
                            <input type="text" class="form-control" maxlength="1" pattern="[{{data.alphabet}}]" required ng-model="data.startDisplayLetter"  />
                            Example: A
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-success wiz-btn-padding" ng-click="updateConfig();">{{'Save' | translate}}</button>
    <button class="btn btn-default wiz-btn-padding" ng-disabled="loading" ng-click="cancel();">{{"Cancel" | translate}}</button>
</div>


