2022-03-18 07:50:13 +01:00
< ? php
// Lexique
$text = [];
$val = $this -> getData ([ 'config' , 'i18n' , 'langAdmin' ]);
switch ( $val ) {
case 'fr' :
$text [ 0 ] = 'Retour' ;
$text [ 1 ] = 'Enregistrer en brouillon' ;
$text [ 2 ] = 'Publier' ;
$text [ 3 ] = 'Informations générales' ;
$text [ 4 ] = 'Titre' ;
$text [ 5 ] = 'Taille optimale de l\'image de couverture : ' ;
$text [ 6 ] = 'Image de couverture' ;
$text [ 7 ] = 'Largeur de l\'image' ;
$text [ 8 ] = 'Position' ;
$text [ 9 ] = 'Le texte de l\'article est adapté autour de l\'image' ;
$text [ 10 ] = 'Masquer l\'image dans l\'article' ;
$text [ 11 ] = 'Options de publication' ;
$text [ 12 ] = 'Auteur' ;
$text [ 13 ] = 'L\'article n\'est visible qu\'après la date de publication prévue.' ;
$text [ 14 ] = 'Date de publication' ;
$text [ 15 ] = 'Edition / Suppression' ;
$text [ 16 ] = 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction' ;
$text [ 17 ] = 'Commentaires' ;
$text [ 18 ] = 'Fermer les commentaires' ;
$text [ 19 ] = 'Approbation par un modérateur' ;
$text [ 20 ] = 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.' ;
$text [ 21 ] = 'Caractères par commentaire' ;
$text [ 22 ] = 'Notification par email' ;
$text [ 23 ] = 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs' ;
$pictureSizes = $module :: $pictureSizes ;
$picturePositions = $module :: $picturePositions ;
$articleConsent = $module :: $articleConsent ;
break ;
case 'en' :
$text [ 0 ] = 'Back' ;
$text [ 1 ] = 'Save as draft' ;
$text [ 2 ] = 'Publish' ;
$text [ 3 ] = 'General information' ;
$text [ 4 ] = 'Title' ;
$text [ 5 ] = 'Optimal size of cover image : ' ;
$text [ 6 ] = 'Cover image' ;
$text [ 7 ] = 'Width of image' ;
$text [ 8 ] = 'Position' ;
$text [ 9 ] = 'The text of the article is adapted around the image' ;
$text [ 10 ] = 'Hide image in article' ;
$text [ 11 ] = 'Publication options' ;
$text [ 12 ] = 'Author' ;
$text [ 13 ] = 'The article is not visible until after the scheduled publication date' ;
$text [ 14 ] = 'Date of publication' ;
$text [ 15 ] = 'Edit / Delete' ;
$text [ 16 ] = 'Users in higher groups have unrestricted access to the article' ;
$text [ 17 ] = 'Comments' ;
$text [ 18 ] = 'Close comments' ;
$text [ 19 ] = 'Moderator approval' ;
$text [ 20 ] = 'Choice of the maximum number of characters for each comment in the article, including html formatting.' ;
$text [ 21 ] = 'Characters per comment' ;
$text [ 22 ] = 'Email notification' ;
$text [ 23 ] = 'Editors = editors + administrators<br/> Members = members + editors + administrators' ;
$pictureSizes = $module :: $pictureSizes_en ;
$picturePositions = $module :: $picturePositions_en ;
$articleConsent = $module :: $articleConsent_en ;
break ;
}
?>
2022-01-31 09:10:49 +01:00
< ? php echo template :: formOpen ( 'blogEditForm' ); ?>
< div class = " row " >
< div class = " col2 " >
< ? php echo template :: button ( 'blogEditBack' , [
'class' => 'buttonGrey' ,
'href' => helper :: baseUrl () . $this -> getUrl ( 0 ) . '/config' ,
'ico' => 'left' ,
2022-03-18 07:50:13 +01:00
'value' => $text [ 0 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
< div class = " col3 offset5 " >
< ? php echo template :: button ( 'blogEditDraft' , [
'uniqueSubmission' => true ,
2022-03-18 07:50:13 +01:00
'value' => $text [ 1 ]
2022-01-31 09:10:49 +01:00
]); ?>
< ? php echo template :: hidden ( 'blogEditState' , [
'value' => true
]); ?>
</ div >
< div class = " col2 " >
< ? php echo template :: submit ( 'blogEditSubmit' , [
2022-03-18 07:50:13 +01:00
'value' => $text [ 2 ],
2022-01-31 09:10:49 +01:00
'uniqueSubmission' => true ,
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-18 07:50:13 +01:00
< h4 >< ? php echo $text [ 3 ]; ?> </h4>
2022-01-31 09:10:49 +01:00
< div class = " row " >
< div class = " col12 " >
< ? php echo template :: text ( 'blogEditTitle' , [
2022-03-18 07:50:13 +01:00
'label' => $text [ 4 ],
2022-01-31 09:10:49 +01:00
'value' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'title' ])
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col6 " >
2022-03-18 07:50:13 +01:00
< ? php $help = '' ;
if ( $this -> getData ([ 'theme' , 'site' , 'width' ]) !== '100%' ) $help = $text [ 5 ] . (( int ) substr ( $this -> getData ([ 'theme' , 'site' , 'width' ]), 0 , - 2 ) - ( 20 * 2 )) . ' x 350 pixels.' ;
echo template :: file ( 'blogEditPicture' , [
'help' => $help ,
'label' => $text [ 6 ],
2022-01-31 09:10:49 +01:00
'type' => 1 ,
'value' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'picture' ])
]); ?>
</ div >
< div class = " col3 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: select ( 'blogEditPictureSize' , $pictureSizes , [
'label' => $text [ 7 ],
2022-01-31 09:10:49 +01:00
'selected' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'pictureSize' ])
]); ?>
</ div >
< div class = " col3 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: select ( 'blogEditPicturePosition' , $picturePositions , [
'label' => $text [ 8 ],
2022-01-31 09:10:49 +01:00
'selected' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'picturePosition' ]),
2022-03-18 07:50:13 +01:00
'help' => $text [ 9 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col6 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: checkbox ( 'blogEditHidePicture' , true , $text [ 10 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'hidePicture' ])
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
< ? php echo template :: textarea ( 'blogEditContent' , [
'class' => 'editorWysiwyg' ,
'value' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'content' ])
]); ?>
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-18 07:50:13 +01:00
< h4 >< ? php echo $text [ 11 ]; ?> </h4>
2022-01-31 09:10:49 +01:00
< div class = " row " >
< div class = " col4 " >
< ? php echo template :: select ( 'blogEditUserId' , $module :: $users , [
2022-03-18 07:50:13 +01:00
'label' => $text [ 12 ],
2022-01-31 09:10:49 +01:00
'selected' => $this -> getUser ( 'id' ),
'disabled' => $this -> getUser ( 'group' ) !== self :: GROUP_ADMIN ? true : false
]); ?>
</ div >
< div class = " col4 " >
< ? php echo template :: date ( 'blogEditPublishedOn' , [
2022-03-18 07:50:13 +01:00
'help' => $text [ 13 ],
'label' => $text [ 14 ],
2022-01-31 09:10:49 +01:00
'value' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'publishedOn' ])
]); ?>
</ div >
< div class = " col4 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: select ( 'blogEditConsent' , $articleConsent , [
'label' => $text [ 15 ],
2022-01-31 09:10:49 +01:00
'selected' => is_numeric ( $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'editConsent' ])) ? $module :: EDIT_GROUP : $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'editConsent' ]),
2022-03-18 07:50:13 +01:00
'help' => $text [ 16 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col12 " >
< div class = " block " >
2022-03-18 07:50:13 +01:00
< h4 >< ? php echo $text [ 17 ]; ?> </h4>
2022-01-31 09:10:49 +01:00
< div class = " row " >
< div class = " col4 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: checkbox ( 'blogEditCommentClose' , true , $text [ 18 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'commentClose' ])
]); ?>
</ div >
< div class = " col4 commentOptionsWrapper " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: checkbox ( 'blogEditCommentApproved' , true , $text [ 19 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'commentApproved' ]),
''
]); ?>
</ div >
< div class = " col4 commentOptionsWrapper " >
< ? php echo template :: select ( 'blogEditCommentMaxlength' , $module :: $commentLength ,[
2022-03-18 07:50:13 +01:00
'help' => $text [ 20 ],
'label' => $text [ 21 ],
2022-01-31 09:10:49 +01:00
'selected' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'commentMaxlength' ])
]); ?>
</ div >
</ div >
< div class = " row " >
< div class = " col3 commentOptionsWrapper offset2 " >
2022-03-18 07:50:13 +01:00
< ? php echo template :: checkbox ( 'blogEditCommentNotification' , true , $text [ 22 ], [
2022-01-31 09:10:49 +01:00
'checked' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'commentNotification' ]),
]); ?>
</ div >
< div class = " col4 commentOptionsWrapper " >
< ? php echo template :: select ( 'blogEditCommentGroupNotification' , $module :: $groupNews , [
'selected' => $this -> getData ([ 'module' , $this -> getUrl ( 0 ), 'posts' , $this -> getUrl ( 2 ), 'commentGroupNotification' ]),
2022-03-18 07:50:13 +01:00
'help' => $text [ 23 ]
2022-01-31 09:10:49 +01:00
]); ?>
</ div >
</ div >
</ div >
</ div >
</ div >
< ? php echo template :: formClose (); ?>