|
|
|
@ -37,8 +37,8 @@ if( $form->validate()) { |
|
|
|
|
$submit = $values['send']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$default[content]=$content; |
|
|
|
|
if (isset($values['language'])){ |
|
|
|
|
$default['content']=$content; |
|
|
|
|
if (isset($values['language'])) { |
|
|
|
|
if($submit=='back') { |
|
|
|
|
header('Location: legal_add.php'); |
|
|
|
|
exit; |
|
|
|
@ -87,7 +87,7 @@ $token = Security::get_token(); |
|
|
|
|
|
|
|
|
|
$form->addElement('hidden','sec_token'); |
|
|
|
|
$form->setConstants(array('sec_token' => $token)); |
|
|
|
|
$form->addElement('label', null, get_lang('DisplayTermsConditions')); |
|
|
|
|
$form->addElement('header', get_lang('DisplayTermsConditions')); |
|
|
|
|
|
|
|
|
|
if (isset($_POST['language'])) { |
|
|
|
|
|
|
|
|
@ -99,7 +99,6 @@ if (isset($_POST['language'])) { |
|
|
|
|
$form->addElement('radio', 'type', '', get_lang('PageLink') ,'1'); |
|
|
|
|
$form->addElement('textarea', 'changes', get_lang('ExplainChanges'),array('width'=>'20')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$preview = LegalManager::show_last_condition($term_preview); |
|
|
|
|
|
|
|
|
|
if ($term_preview['type']!=-1) { |
|
|
|
@ -131,12 +130,7 @@ if (isset($_POST['language'])) { |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$form->addElement('select_language', 'language', get_lang('Language'),null,array()); |
|
|
|
|
$buttons = '<div class="row"> |
|
|
|
|
<div class="formw"> |
|
|
|
|
<button type="submit" class="save" name="send" value="load">'.get_lang('Load').'</button> |
|
|
|
|
</div> |
|
|
|
|
</div>'; |
|
|
|
|
$form->addElement('html',$buttons); |
|
|
|
|
$form->addElement('button', 'send', get_lang('Load')); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -154,9 +148,7 @@ function sendlang(){ |
|
|
|
|
|
|
|
|
|
// action menu |
|
|
|
|
echo '<div class="actions">'; |
|
|
|
|
echo '<div style="float:right;"> |
|
|
|
|
<a href="'.api_get_path(WEB_CODE_PATH).'admin/legal_list.php">'.Display::return_icon('search.gif',get_lang('EditTermsAndConditions'),'').get_lang('AllVersions').'</a> |
|
|
|
|
</div><br />'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/legal_list.php">'.Display::return_icon('search.gif',get_lang('EditTermsAndConditions'),'').get_lang('AllVersions').'</a>'; |
|
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
if (isset ($_GET['action'])) { |
|
|
|
@ -169,3 +161,4 @@ if (isset ($_GET['action'])) { |
|
|
|
|
|
|
|
|
|
$form->setDefaults($defaults); |
|
|
|
|
$form->display(); |
|
|
|
|
Display :: display_footer(); |