<?php if (defined('AAM_KEY')) { ?>
    <div class="modal fade" id="modal-frontend-access_counter_limit" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo __('Define Threshold', AAM_KEY); ?></h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label><?php echo __('Threshold', AAM_KEY); ?></label>
                        <input type="text" class="form-control" placeholder="<?php echo __('Enter digital number', AAM_KEY); ?>" id="aam-read-counter" />
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-access_counter_limit" data-field="#aam-read-counter"><?php echo __('Update', AAM_KEY); ?></button>
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="modal-frontend-password" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo __('Set Password', AAM_KEY); ?></h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label><?php echo __('Password', AAM_KEY); ?></label>
                        <input type="text" class="form-control" placeholder="<?php echo __('Enter Password', AAM_KEY); ?>" id="aam-access-password" />
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-password" data-field="#aam-access-password"><?php echo __('Update', AAM_KEY); ?></button>
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="modal-frontend-location" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo __('Define Redirect Rule', AAM_KEY); ?></h4>
                </div>
                <div class="modal-body">
                    <p class="aam-info"><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('To learn more about REDIRECT option, please refer to our [%sHelp Section%s].', 'b'), '<a href="https://aamplugin.com/help#post-redirect" target="_blank">', '</a>'); ?></p>
                    <div class="form-group aam-outer-top-xs">
                        <label><?php echo __('Enter Redirect Rule', AAM_KEY); ?></label>
                        <input type="text" class="form-control" placeholder="<?php echo __('Enter rule', AAM_KEY); ?>" id="aam-access-redirect" />
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-location" data-field="#aam-access-redirect"><?php echo __('Update', AAM_KEY); ?></button>
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="modal-frontend-expire_datetime" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo __('Set Expiration', AAM_KEY); ?></h4>
                </div>
                <div class="modal-body">
                    <p class="aam-info">
                        The expiration criteria expects to be given a string containing a valid <a href="http://php.net/manual/en/datetime.formats.php" target="_blank">date/time format or mathematical expression</a>.
                        Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed. 
                        To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates whenever possible.<br/><br/>
                        Examples: +2 weeks (the access will expire in 2 weeks from now); +10 hours (the access will expire in 10 hours from now); January 1st 2018; 10/08/2019
                    </p>
                    <div class="form-group">
                        <label><?php echo __('Enter expiration critiria', AAM_KEY); ?></label>
                        <input type="text" class="form-control" placeholder="<?php echo __('Enter critiria', AAM_KEY); ?>" id="aam-expire-datetime" />
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-expire_datetime" data-field="#aam-expire-datetime"><?php echo __('Update', AAM_KEY); ?></button>
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="modal-frontend-teaser" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo __('Teaser Message', AAM_KEY); ?></h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label><?php echo __('Simple text or valid HTML', AAM_KEY); ?></label>
                        <textarea class="form-control" placeholder="<?php echo __('Enter your teaser', AAM_KEY); ?>" rows="5" id="aam-teaser-message"></textarea>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-teaser" data-field="#aam-teaser-message"><?php echo __('Save', AAM_KEY); ?></button>
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="modal-frontend-eproduct" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"><?php echo __('E-Commerce Setup', AAM_KEY); ?></h4>
                </div>
                <div class="modal-body">
                    <?php
                        echo apply_filters(
                            'aam-frontend-eproduct-setup', 
                            '<p class="alert alert-warning text-center">' . AAM_Backend_View_Helper::preparePhrase('Monetization is the premium feature that is available with [Payment] extension.', 'b') . '</p>'
                       );
                    ?>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success extended-post-access-btn" data-modal="#modal-frontend-eproduct" data-field="#aam-selected-eproduct"><?php echo __('Update', AAM_KEY); ?></button>
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
                </div>
            </div>
        </div>
    </div>
<?php }