@@ -115,19 +115,57 @@ function codeable_settings_callback() {
115115 ?>
116116 <div class="wrap wpcable_wrap">
117117 <form method="post" action="options.php">
118- <h2><?php esc_html_e ( 'Codeable settings ' , 'wpcable ' ); ?> </h2>
118+ <?php settings_fields ( 'wpcable_group ' , '_wpnonce ' , false ); ?>
119+ <input
120+ type="hidden"
121+ name="_wp_http_referer"
122+ value="<?php echo remove_query_arg ( ['success ' , 'error ' ] ); ?> "
123+ />
124+ <?php do_settings_sections ( 'wpcable_group ' ); ?>
125+
126+ <h2><?php esc_html_e ( 'Task list ' , 'wpcable ' ); ?> </h2>
127+ <p>
128+ <?php
129+ printf (
130+ esc_html__ ( 'Adjust behavior of %syour task list%s. ' , 'wpcable ' ),
131+ '<a href=" ' . admin_url ( 'admin.php?page=codeable_tasks ' ) . '"> ' ,
132+ '</a> '
133+ );
134+ ?>
135+ </p>
119136
120137 <table class="form-table">
121138 <tbody>
139+ <tr>
140+ <th scope="row">
141+ <label class="wpcable_label" for="wpcable_cancel_after_days">
142+ <?php esc_html_e ( 'Flag task as canceled ' , 'wpcable ' ); ?>
143+ </label>
144+ </th>
145+ <td>
146+ <input type="number" name="wpcable_cancel_after_days" id="wpcable_cancel_after_days" min="14" max="720" value="<?php echo (int ) $ wpcable_cancel_after_days ; ?> " /> hours
147+ <p class="description">
148+ <?php esc_html_e ( 'Adds the "canceled" flag to a task that had no activity for the given number of days. Default is 180 days. ' , 'wpcable ' ); ?>
149+ </p>
150+ </td>
151+ </tr>
152+ </tbody>
153+ </table>
122154
123- <?php settings_fields ( 'wpcable_group ' , '_wpnonce ' , false ); ?>
124- <input
125- type="hidden"
126- name="_wp_http_referer"
127- value="<?php echo remove_query_arg ( ['success ' , 'error ' ] ); ?> "
128- />
129- <?php do_settings_sections ( 'wpcable_group ' ); ?>
155+ <hr />
156+ <h2><?php esc_html_e ( 'Estimates ' , 'wpcable ' ); ?> </h2>
157+ <p>
158+ <?php
159+ printf (
160+ esc_html__ ( 'Customize the defaults for %syour estimates%s. ' , 'wpcable ' ),
161+ '<a href=" ' . admin_url ( 'admin.php?page=codeable_estimate ' ) . '"> ' ,
162+ '</a> '
163+ );
164+ ?>
165+ </p>
130166
167+ <table class="form-table">
168+ <tbody>
131169 <tr>
132170 <th scope="row">
133171 <label class="wpcable_label" for="wpcable_rate">
@@ -172,19 +210,18 @@ function codeable_settings_callback() {
172210 </p>
173211 </td>
174212 </tr>
175- <tr>
176- <th scope="row">
177- <label class="wpcable_label" for="wpcable_cancel_after_days">
178- <?php esc_html_e ( 'Flag task as canceled ' , 'wpcable ' ); ?>
179- </label>
180- </th>
181- <td>
182- <input type="number" name="wpcable_cancel_after_days" id="wpcable_cancel_after_days" min="14" max="720" value="<?php echo (int ) $ wpcable_cancel_after_days ; ?> " /> hours
183- <p class="description">
184- <?php esc_html_e ( 'Adds the "canceled" flag to a task that had no activity for the given number of days. Default is 180 days. ' , 'wpcable ' ); ?>
185- </p>
186- </td>
187- </tr>
213+ </tbody>
214+ </table>
215+
216+ <hr />
217+ <h2><?php esc_html_e ( 'Codeable API ' , 'wpcable ' ); ?> </h2>
218+ <p>
219+ <?php esc_html_e ( 'Log into your Codeable account. ' , 'wpcable ' ); ?> <br />
220+ <?php esc_html_e ( 'During login this plugin obtains a user-specific auth-token which is used to fetch data from the API later. Your password is not saved anywhere! ' , 'wpcable ' ); ?>
221+ </p>
222+
223+ <table class="form-table">
224+ <tbody>
188225 <?php if ( codeable_api_logged_in () ) : ?>
189226 <tr>
190227 <th scope="row">
@@ -196,13 +233,14 @@ function codeable_settings_callback() {
196233 <p>
197234 <?php
198235 printf (
199- __ ( 'You are currently logged in as %s. %sLog out and clear all data%s ' , 'wpcable ' ),
200- '<b> ' . $ wpcable_email . '</b> ' ,
201- '<a href=" ' . esc_url ( $ logout_url ) . '" onclick="return confirm( \'' . esc_attr ( $ logout_warning ) . '\')"> ' ,
202- '</a> '
236+ __ ( 'You are currently logged in as %s ' , 'wpcable ' ),
237+ '<b> ' . $ wpcable_email . '</b> '
203238 );
204239 ?>
205240 </p>
241+ <p>
242+ <a href="<?php echo esc_url ( $ logout_url ); ?> " class="button" onclick="return confirm('<?php echo esc_attr ( $ logout_warning ); ?> ')"><?php esc_html_e ( 'Log out and clear all data ' , 'wpcable ' ); ?> </a>
243+ </p>
206244 </td>
207245 </tr>
208246 <?php else : ?>
0 commit comments