Zaktualizowano obsługę błędów, dodano nowe pola do formularza edycji artykułów oraz poprawiono logikę zapisu daty modyfikacji.

This commit is contained in:
2025-02-05 22:23:10 +01:00
parent 8da0fc1925
commit a029c693b1
4 changed files with 30 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
<?
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT );
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
function __autoload_my_classes( $classname )
{
$q = explode( '\\' , $classname );

View File

@@ -119,12 +119,19 @@ ob_start();
</div>
</div>
<div>
<? if ( is_array( $this -> authors ) ): foreach ( $this -> authors as $author ): $authors[ $author['id'] ] = $author['author']; endforeach; endif;?>
<?
$authors[0] = '--- wybierz autora ---';
if ( is_array( $this -> authors ) ):
foreach ( $this -> authors as $author ):
$authors[ $author['id'] ] = $author['author'];
endforeach;
endif;
?>
<?= \Html::select( [
'label' => 'Autor',
'name' => "id_author",
'id' => 'id_author',
'values' => array_merge( [ '0' => '--- wybierz autora ---' ], $authors ),
'values' => $authors,
'value' => $this -> article['id_author']
] );?>
<?= \Html::input_switch(
@@ -148,6 +155,11 @@ ob_start();
'checked' => $this -> article['show_title'] == 1 ? true : false
)
);?>
<?= \Html::input_switch( [
'label' => 'Pokaż spis treści',
'name' => 'show_table_of_contents',
'checked' => $this -> article['show_table_of_contents'] == 1 ? true : false
] );?>
<?= \Html::input_switch(
array(
'label' => 'Pokaż datę dodania',
@@ -169,6 +181,15 @@ ob_start();
'checked' => $this -> article['show_date_modify'] == 1 ? true : false
)
);?>
<?= \Html::input(
array(
'label' => 'Data modyfikacji',
'class' => 'date-time',
'name' => 'date_modify',
'id' => 'date_modify',
'value' => $this -> article['date_modify'] ? $this -> article['date_modify'] : date( 'Y-m-d H:i:s' )
)
);?>
<?= \Html::input_switch(
array(
'label' => 'Powtórz wprowadzenie',