update
This commit is contained in:
@@ -412,6 +412,10 @@ class Admin {
|
||||
$gcal_alias = isset( $data['yacht_gcal_alias'] ) ? sanitize_text_field( wp_unslash( $data['yacht_gcal_alias'] ) ) : '';
|
||||
Yacht::update_gcal_alias( $saved_id, $gcal_alias );
|
||||
|
||||
// Save admin-selected color for aggregated calendar.
|
||||
$yacht_color = isset( $data['yacht_color'] ) ? sanitize_text_field( wp_unslash( $data['yacht_color'] ) ) : '';
|
||||
Yacht::update_color( $saved_id, $yacht_color );
|
||||
|
||||
return $saved_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
// Get yacht data
|
||||
$title = $yacht ? $yacht->post_title : '';
|
||||
$content = $yacht ? $yacht->post_content : '';
|
||||
$gcal_alias = $yacht ? \YachtBooking\Yacht::get_gcal_alias( $yacht->ID ) : '';
|
||||
$gcal_alias = $yacht ? \YachtBooking\Yacht::get_gcal_alias( $yacht->ID ) : '';
|
||||
$yacht_color = $yacht ? \YachtBooking\Yacht::get_color( $yacht->ID ) : '';
|
||||
|
||||
$page_title = $yacht ? __( 'Edytuj Jacht', 'yacht-booking' ) : __( 'Dodaj Jacht', 'yacht-booking' );
|
||||
?>
|
||||
@@ -86,6 +87,28 @@ $page_title = $yacht ? __( 'Edytuj Jacht', 'yacht-booking' ) : __( 'Dodaj Jacht'
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Kolor jachtu w kalendarzu zbiorczym -->
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="yacht_color">
|
||||
<?php esc_html_e( 'Kolor w kalendarzu zbiorczym', 'yacht-booking' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
name="yacht_color"
|
||||
id="yacht_color"
|
||||
class="yacht-color-picker"
|
||||
value="<?php echo esc_attr( $yacht_color ); ?>"
|
||||
data-default-color=""
|
||||
/>
|
||||
<p class="description">
|
||||
<?php esc_html_e( 'Kolor pasków rezerwacji tego jachtu w widgecie zbiorczym (/rezerwacja/). Pozostaw puste, aby użyć automatycznego koloru z palety.', 'yacht-booking' ); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Alias dla globalnej synchronizacji iCal -->
|
||||
<tr>
|
||||
<th scope="row">
|
||||
|
||||
Reference in New Issue
Block a user