capability.phtml
9 years ago
login-redirect.phtml
9 years ago
menu.phtml
9 years ago
metabox.phtml
9 years ago
post.phtml
9 years ago
redirect.phtml
9 years ago
teaser.phtml
9 years ago
login-redirect.phtml
69 lines
| 1 | <?php if (defined('AAM_KEY')) { ?> |
| 2 | <div class="aam-feature" id="login_redirect-content"> |
| 3 | <div class="row"> |
| 4 | <div class="col-xs-12"> |
| 5 | <?php if ($this->isDefault()) { ?> |
| 6 | <p class="aam-info"> |
| 7 | <?php echo AAM_Backend_View_Helper::preparePhrase('Setup [default] login redirect for all users, roles when the authentication completed successfully.', 'strong'); ?> |
| 8 | </p> |
| 9 | <?php } else { ?> |
| 10 | <p class="aam-info"> |
| 11 | <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Setup customized login redirect for the [%s] when the authentication completed successfully.', 'strong'), AAM_Backend_View::getSubject()->getUID()); ?> |
| 12 | </p> |
| 13 | <?php } ?> |
| 14 | <div class="aam-overwrite" id="aam-login-redirect-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>"> |
| 15 | <span><i class="icon-check"></i> Settings are customized</span> |
| 16 | <span><a href="#" id="login-redirect-reset" class="btn btn-xs btn-primary">Reset To Default</a></span> |
| 17 | </div> |
| 18 | </div> |
| 19 | </div> |
| 20 | |
| 21 | <div class="row"> |
| 22 | <div class="col-xs-12"> |
| 23 | <?php $type = $this->getOption('login.redirect.type', 'default'); ?> |
| 24 | |
| 25 | <div class="radio"> |
| 26 | <input type="radio" name="login.redirect.type" id="login-redirect-default" data-action="#default-redirect-action" value="default"<?php echo ($type == 'default' ? ' checked' : ''); ?> /> |
| 27 | <label for="login-redirect-default"><?php echo __('WordPress default behavior', AAM_KEY); ?></label> |
| 28 | </div> |
| 29 | <div class="radio"> |
| 30 | <input type="radio" name="login.redirect.type" id="login-redirect-page" data-action="#page-redirect-action" value="page"<?php echo ($type == 'page' ? ' checked' : ''); ?> /> |
| 31 | <label for="login-redirect-page"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirected to existing page [(select from the drop-down)]', 'small'); ?></label> |
| 32 | </div> |
| 33 | <div class="radio"> |
| 34 | <input type="radio" name="login.redirect.type" id="login-redirect-url" data-action="#url-redirect-action" value="url"<?php echo ($type == 'url' ? ' checked' : ''); ?> /> |
| 35 | <label for="login-redirect-url"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirected to the URL [(enter full URL starting from http or https)]', 'small'); ?></label> |
| 36 | </div> |
| 37 | <div class="radio"> |
| 38 | <input type="radio" name="login.redirect.type" id="login-redirect-callback" data-action="#callback-redirect-action" value="callback"<?php echo ($type == 'callback' ? ' checked' : ''); ?> /> |
| 39 | <label for="login-redirect-callback"><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Trigger PHP callback function [(valid %sPHP callback%s is required)]', 'small'), '<a href="http://php.net/manual/en/language.types.callable.php" target="_blank">', '</a>'); ?></label> |
| 40 | </div> |
| 41 | |
| 42 | <div class="form-group login-redirect-action" id="page-redirect-action" style="display: <?php echo ($type == 'page' ? 'block' : 'none'); ?>;"> |
| 43 | <label><?php echo __('Existing Page', AAM_KEY); ?></label> |
| 44 | <?php |
| 45 | wp_dropdown_pages(array( |
| 46 | 'depth' => 99, |
| 47 | 'selected' => $this->getOption('login.redirect.page'), |
| 48 | 'echo' => 1, |
| 49 | 'name' => 'login.redirect.page', |
| 50 | 'id' => 'page-redirect', // string |
| 51 | 'class' => 'form-control', // string |
| 52 | 'show_option_none' => __('-- Select Page --', AAM_KEY) // string |
| 53 | )); |
| 54 | ?> |
| 55 | </div> |
| 56 | |
| 57 | <div class="form-group login-redirect-action" id="url-redirect-action" style="display: <?php echo ($type == 'url' ? 'block' : 'none'); ?>;"> |
| 58 | <label><?php echo __('The URL', AAM_KEY); ?></label> |
| 59 | <input type="text" class="form-control" name="login.redirect.url" placeholder="http://" value="<?php echo $this->getOption('login.redirect.url'); ?>" /> |
| 60 | </div> |
| 61 | |
| 62 | <div class="form-group login-redirect-action" id="callback-redirect-action" style="display: <?php echo ($type == 'callback' ? 'block' : 'none'); ?>;"> |
| 63 | <label><?php echo __('PHP Callback Function', AAM_KEY); ?></label> |
| 64 | <input type="text" class="form-control" placeholder="Enter valid callback" name="login.redirect.callback" value="<?php echo $this->getOption('login.redirect.callback'); ?>" /> |
| 65 | </div> |
| 66 | </div> |
| 67 | </div> |
| 68 | </div> |
| 69 | <?php } |