Commit 2f07992e authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat: display legal disclaimer and warning on podcast import page

updated podcast import translations

closes #34
parent a973c097
......@@ -21,8 +21,14 @@ if (!function_exists('form_section')) {
function form_section(
string $title = '',
string $subtitle = '',
array $attributes = []
array $attributes = [],
string $customSubtitleClass = ''
): string {
$subtitleClass = 'text-sm text-gray-600';
if ($customSubtitleClass !== '') {
$subtitleClass = $customSubtitleClass;
}
$section =
'<div class="flex flex-wrap w-full gap-6 mb-8"' .
stringify_attributes($attributes) .
......@@ -31,7 +37,9 @@ if (!function_exists('form_section')) {
$info =
'<div class="w-full max-w-xs"><h2 class="text-lg font-semibold">' .
$title .
'</h2><p class="text-sm text-gray-600">' .
'</h2><p class="' .
$subtitleClass .
'">' .
$subtitle .
'</p></div>';
......
......@@ -7,19 +7,14 @@
*/
return [
'legal_dislaimer_title' => 'Legal Disclaimer',
'legal_dislaimer_content' =>
'Make sure you own the rights for this podcast before importing it.<br/>Copying and broadcasting a podcast without the proper rights is piracy and is liable to prosecution.',
'warning_title' => 'Warning',
'warning_content' =>
'This procedure may take a long time.<br/>The current version does not show any progress while it runs. You will not see anything updated until it is done.<br/>In case of timeout error, increase max_execution_time value.',
'warning' =>
'This procedure may take a long time.<br/>As the current version does not show any progress while it runs, you will not see anything updated until it is done.<br/>In case of timeout error, increase `max_execution_time` value.',
'old_podcast_section_title' => 'The podcast to import',
'old_podcast_section_subtitle' => '',
'old_podcast_section_subtitle' =>
'Make sure you own the rights for this podcast before importing it. Copying and broadcasting a podcast without the proper rights is piracy and is liable to prosecution.',
'imported_feed_url' => 'Feed URL',
'imported_feed_url_hint' =>
'The feed must be in `.xml` format. Make sure you are legally allowed to copy the podcast.',
'imported_feed_url_hint' => 'The feed must be in `.xml` format.',
'new_podcast_section_title' => 'The new podcast',
'new_podcast_section_subtitle' => '',
'name' => 'Name',
'name_hint' => 'Used for generating the podcast URL.',
'advanced_params_section_title' => 'Advanced parameters',
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<g>
<path fill="none" d="M0 0h24v24H0z"/>
<path fill-rule="nonzero" d="M12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0zm-8.66 16h15.588L12 5.5 4.206 19zM11 16h2v2h-2v-2zm0-7h2v5h-2V9z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<g>
<path fill="none" d="M0 0H24V24H0z"/>
<path d="M13 2v1.278l5 1.668 3.632-1.21.633 1.896-3.032 1.011 3.096 8.512C21.237 16.292 19.7 17 18 17c-1.701 0-3.237-.708-4.329-1.845l3.094-8.512L13 5.387V19H17v2H7v-2h4V5.387L7.232 6.643l3.096 8.512C9.237 16.292 7.7 17 6 17c-1.701 0-3.237-.708-4.329-1.845l3.094-8.512-3.03-1.01.633-1.898L6 4.945l5-1.667V2h2zm5 7.103l-1.958 5.386c.587.331 1.257.511 1.958.511.7 0 1.37-.18 1.958-.51L18 9.102zm-12 0l-1.958 5.386C4.629 14.82 5.299 15 6 15c.7 0 1.37-.18 1.958-.51L6 9.102z"/>
</g>
</svg>
......@@ -16,9 +16,13 @@
]) ?>
<?= csrf_field() ?>
<?= form_section(
lang('PodcastImport.old_podcast_section_title'),
lang('PodcastImport.old_podcast_section_subtitle')
icon('scales', 'mr-2 text-lg flex-shrink-0') .
lang('PodcastImport.old_podcast_section_subtitle'),
[],
'inline-flex text-xs p-2 text-teal-800 font-semibold bg-teal-100 border border-teal-300 rounded'
) ?>
<?= form_label(
......@@ -40,10 +44,7 @@
<?= form_section_close() ?>
<?= form_section(
lang('PodcastImport.new_podcast_section_title'),
lang('PodcastImport.new_podcast_section_subtitle')
) ?>
<?= form_section(lang('PodcastImport.new_podcast_section_title'), '') ?>
<?= form_label(
lang('PodcastImport.name'),
......@@ -206,6 +207,11 @@
<?= form_section_close() ?>
<div class="inline-flex w-full p-2 mb-4 text-sm font-semibold text-yellow-800 bg-orange-100 border border-orange-300 rounded" role="alert">
<?= icon('alert', 'mr-2 text-lg flex-shrink-0') .
lang('PodcastImport.warning') ?>
</div>
<?= button(
lang('PodcastImport.submit'),
null,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment