sub edit {
$lxdebug->enter_sub();
-
+ # show history button
+ $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
+ #/show hhistory button
$form->{title} = "Edit";
if ($form->{type} eq 'project') {
. $locale->text('Delete') . qq|">|;
}
+# button for saving history
+print qq|
+ <input type=button onclick=set_history_window(|
+ . $form->{id}
+ . qq|); name=history id=history value=|
+ . $locale->text('history')
+ . qq|>|;
+# /button for saving history
print qq|
</form>
PE->save_pricegroup(\%myconfig, \%$form);
$form->redirect($locale->text('Pricegroup saved!'));
}
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$lxdebug->leave_sub();
}
if ($form->{type} eq 'pricegroup') {
$form->redirect($locale->text('Pricegroup deleted!'));
}
-
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
$lxdebug->leave_sub();
}
. $locale->text('Delete') . qq|">|;
}
+# button for saving history
+print qq|
+ <input type=button onclick=set_history_window(|
+ . $form->{id}
+ . qq|); name=history id=history value=|
+ . $locale->text('history')
+ . qq|>|;
+# /button for saving history
print qq|
</form>
. $locale->text('Delete') . qq|">|;
}
+# button for saving history
+print qq|
+ <input type=button onclick=set_history_window(|
+ . $form->{id}
+ . qq|); name=history id=history value=|
+ . $locale->text('history')
+ . qq|>|;
+# /button for saving history
print qq|
</form>