laipower/wp-content/plugins/static-html-output-plugin/views/gitlab_settings_block.phtml
2020-04-07 13:03:04 +00:00

57 lines
2.5 KiB
PHTML

<div class="gitlab_settings_block" style="display:none;">
<table class="form-table">
<tbody>
<tr>
<th scope="row">
<label for="baseUrl-gitlab"><?php echo __('Destination URL', 'static-html-output-plugin');?></label>
</th>
<td>
<?php $tpl->displayTextfield($this, 'baseUrl-gitlab', 'http://mystaticsite.com', '', ''); ?><br>
<p><i><?php echo __("Set this to the URL you intend to host your static exported site on, ie http://mystaticsite.com. Do not set this to the same URL as the WordPress site you're currently using (the address in your browser above). This plugin will rewrite all URLs in the exported static html from your current WordPress URL to what you set here. Supports http, https and protocol relative URLs.", 'static-html-output-plugin');?></i></p>
</td>
</tr>
<tr>
<th scope="row">
<label for="glToken"><?php echo __('Personl Access Token', 'static-html-output-plugin');?></label>
</th>
<td>
<?php $tpl->displayTextfield($this, 'glToken', 'GitLab Personal Access Token', '<a href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html" target="_blank">Get one here (with API access)</a>', 'password'); ?>
</td>
</tr>
<tr>
<th scope="row">
<label for="glProject"><?php echo __('Project ID', 'static-html-output-plugin');?></label>
</th>
<td>
<?php $tpl->displayTextfield($this, 'glProject', 'Project ID', 'find this in your GitLab > Project > Details page'); ?><br>
</td>
</tr>
<tr>
<th scope="row">
<label for="glBranch"><?php echo __('Branch', 'static-html-output-plugin');?></label>
</th>
<td>
<?php $tpl->displayTextfield($this, 'glBranch', 'Branch', ''); ?>
</td>
</tr>
<tr>
<th scope="row">
<label for="glPath"><?php echo __('Subdirectory', 'static-html-output-plugin');?></label>
</th>
<td>
<?php $tpl->displayTextfield($this, 'glPath', 'Path within repository', 'Usually the repository root (leave this blank) or the \'doc\' folder'); ?>
</td>
</tr>
<tr>
<th scope="row">
<label for="gl_test"><?php echo __('Test GitLab Settings', 'static-html-output-plugin');?></label>
</th>
<td>
<button id="gitlab-test-button" type="button" class="btn-primary button">Test GitLab Settings</button>
</td>
</tr>
</tbody>
</table>
</div>