<div class="modal-dialog modal-lg">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
            <h4 class="modal-title">{{ 'cs_core.links.modal.title'|trans }}</h4>
        </div>

        <div class="modal-body">

            <div id="no-link-content" style="display:{{ link.href ? 'none' : 'block' }};">
                <!-- Link type -->
                <div class="col-md-12 links-modal-block">
                    <ul class="nav nav-pills">
                        <li class="active">
                            <a href="#tab_1_1" data-toggle="tab" id="internal-link">{{ 'cs_core.links.modal.internal_button'|trans }}</a>
                        </li>
                        <li>
                            <a href="#tab_1_2" data-toggle="tab" id="external-link">{{ 'cs_core.links.modal.external_button'|trans }}</a>
                        </li>
                    </ul>
                </div>
                <!-- /Link type -->

                {% embed "Comitium5DesignerBundle:Common:input-search.html.twig" %}{% endembed %}

                <!-- Modal content (external) -->
                <div id="external-link-content" style="display:none;">
                    <!-- Search -->
                    <div class="col-md-12 links-modal-block">
                        <h4 class="semibold">{{ 'cs_core.links.modal.external_title'|trans }}</h4>
                        <div class="input-group">
                            <div class="input-group-btn">
                                <select id="url-prefix" class="bs-select form-control input-small no-select2" data-style="default">
                                    <option data-prefix="http://" value="http://" selected>{{ 'cs_core.links.modal.external.options.web'|trans }}</option>
                                    <option data-prefix="https://" value="https://">{{ 'cs_core.links.modal.external.options.web_s'|trans }}</option>
                                    <option data-prefix="mailto:" value="mailto:">{{ 'cs_core.links.modal.external.options.mail'|trans }}</option>
                                </select>
                            </div>
                            <input class="form-control" placeholder="http://" type="text" id="url-input">
                        </div>
                    </div>
                    <!-- /Search -->
                </div>
                <!-- /Modal content (external) -->
            </div>

            <!-- Link selected -->
            <div id="link-content" style="display:{{ link.href ? 'block' : 'none' }};">
                <div class="col-md-12 links-modal-block">
                    <h4 class="semibold">{{ 'cs_core.links.modal.linked_title'|trans }}</h4>
                    <div class="input-group">
                        <input id="link-input" class="form-control" placeholder="http://" type="text" {{ link.external ? "" : "disabled" }} value="{{ link.href }}">
                        <span class="input-group-btn">
                            <button id="clear-link" class="btn red" type="button">X</button>
                        </span>
                    </div>
                </div>
            </div>

            <!-- Advanced -->
            <div class="col-md-12 links-modal-block">
                    <a class="btn btn-circle default btn-sm" id="show-advanced-options"><i class="fa fa-caret-down"></i> {{ 'cs_core.links.modal.options.button'|trans }}</a>
                    <div class="advanced-options" id="advanced-options" style="display:none;">

                        <fieldset>
                            <div class="col-md-6">

                                <div class="form-group">
                                    <label class="control-label"><strong>{{ 'cs_core.links.modal.options.destination'|trans }}</strong></label>
                                    <div class="radio-list">
                                        <label class="radio-inline"><div id="uniform-optionsRadios1" class="radio"><input name="targetRadios" id="optionsRadios1" value="_self" type="radio"></div> {{ 'cs_core.links.modal.options.target_self'|trans }}</label>
                                        <label class="radio-inline"><div id="uniform-optionsRadios2" class="radio"><input name="targetRadios" id="optionsRadios2" value="_blank" type="radio"></div> {{ 'cs_core.links.modal.options.target_blank'|trans }}</label>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="control-label"><strong>{{ 'cs_core.links.modal.options.title'|trans }}</strong></label>
                                    <input class="form-control" type="text" name="linkTitle">
                                    <span class="help-block">{{ 'cs_core.links.modal.options.title_description'|trans }}</span>
                                </div>

                            </div>
                            <div class="col-md-6">

                                <div class="form-group">
                                    <label class="control-label"><strong>{{ 'cs_core.links.modal.options.engines'|trans }}</strong></label>
                                    <div class="radio-list">
                                        <label class="radio-inline"><div id="uniform-optionsRadios3" class="radio"><input name="followRadios" id="optionsRadios3" value="follow" type="radio"></div> Follow</label>
                                        <label class="radio-inline"><div id="uniform-optionsRadios4" class="radio"><input name="followRadios" id="optionsRadios4" value="nofollow" type="radio"></div> No follow</label>
                                    </div>
                                    <span class="help-block">{{ 'cs_core.links.modal.options.engines_description'|trans }}</span>
                                    <div class="checkbox-list">
                                        <label class="checkbox-inline"><input name="sponsoredCheck" id="optionSponsored" value="sponsored" type="checkbox"> Sponsored</label>
                                    </div>
                                    <span class="help-block">{{ 'cs_core.links.modal.options.sponsored_description'|trans }}</span>
                                </div>

                            </div>

                            <div class="clearfix"></div>

                        </fieldset>

                    </div>
                </div>
            <!-- /Advanced -->

        </div>

        <div class="clearfix"></div>

        <div class="modal-footer">
            <button class="btn btn btn-outline-secondary" data-dismiss="modal" aria-hidden="true">{{ 'cs_core.links.modal.cancel'|trans }}</button>
            <button class="btn btn-primary" id="link-submit" {{ link.href ? '' : 'disabled' }}>{{ 'cs_core.links.modal.submit'|trans }}</button>
        </div>
    </div>
</div>
