Proceed is only autochecked if creating new wobject.
This commit is contained in:
parent
f0b799fed3
commit
2f97b596c2
2 changed files with 10 additions and 4 deletions
|
|
@ -107,12 +107,15 @@ sub www_deleteQuestionConfirm {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub www_edit {
|
sub www_edit {
|
||||||
my ($f, $output, @question, $sth);
|
my ($f, $output, @question, $sth, $proceed);
|
||||||
if (WebGUI::Privilege::canEditPage()) {
|
if (WebGUI::Privilege::canEditPage()) {
|
||||||
|
if ($_[0]->get("wobjectId") eq "new") {
|
||||||
|
$proceed = 1;
|
||||||
|
}
|
||||||
$output = helpIcon(1,$namespace);
|
$output = helpIcon(1,$namespace);
|
||||||
$output = '<h1>'.WebGUI::International::get(8,$namespace).'</h1>';
|
$output = '<h1>'.WebGUI::International::get(8,$namespace).'</h1>';
|
||||||
$f = WebGUI::HTMLForm->new;
|
$f = WebGUI::HTMLForm->new;
|
||||||
$f->yesNo("proceed",WebGUI::International::get(1,$namespace),1);
|
$f->yesNo("proceed",WebGUI::International::get(1,$namespace),$proceed);
|
||||||
$output = $_[0]->SUPER::www_edit($f->printRowsOnly);
|
$output = $_[0]->SUPER::www_edit($f->printRowsOnly);
|
||||||
unless ($_[0]->get("wobjectId") eq "new") {
|
unless ($_[0]->get("wobjectId") eq "new") {
|
||||||
$output .= '<p><a href="'.WebGUI::URL::page('func=editQuestion&wid='.$_[0]->get("wobjectId"))
|
$output .= '<p><a href="'.WebGUI::URL::page('func=editQuestion&wid='.$_[0]->get("wobjectId"))
|
||||||
|
|
|
||||||
|
|
@ -118,8 +118,11 @@ sub www_deleteLinkConfirm {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub www_edit {
|
sub www_edit {
|
||||||
my ($f, $output, @link, $sth, $indent, $lineSpacing, $bullet);
|
my ($proceed, $f, $output, @link, $sth, $indent, $lineSpacing, $bullet);
|
||||||
if (WebGUI::Privilege::canEditPage()) {
|
if (WebGUI::Privilege::canEditPage()) {
|
||||||
|
if ($_[0]->get("wobjectId") eq "new") {
|
||||||
|
$proceed = 1;
|
||||||
|
}
|
||||||
$bullet = $_[0]->get("bullet") || '·';
|
$bullet = $_[0]->get("bullet") || '·';
|
||||||
$lineSpacing = $_[0]->get("lineSpacing") || 1;
|
$lineSpacing = $_[0]->get("lineSpacing") || 1;
|
||||||
$indent = $_[0]->get("indent") || 5;
|
$indent = $_[0]->get("indent") || 5;
|
||||||
|
|
@ -129,7 +132,7 @@ sub www_edit {
|
||||||
$f->integer("indent",WebGUI::International::get(1,$namespace),$indent);
|
$f->integer("indent",WebGUI::International::get(1,$namespace),$indent);
|
||||||
$f->integer("lineSpacing",WebGUI::International::get(2,$namespace),$lineSpacing);
|
$f->integer("lineSpacing",WebGUI::International::get(2,$namespace),$lineSpacing);
|
||||||
$f->text("bullet",WebGUI::International::get(4,$namespace),$bullet);
|
$f->text("bullet",WebGUI::International::get(4,$namespace),$bullet);
|
||||||
$f->yesNo("proceed",WebGUI::International::get(5,$namespace),1);
|
$f->yesNo("proceed",WebGUI::International::get(5,$namespace),$proceed);
|
||||||
$output .= $_[0]->SUPER::www_edit($f->printRowsOnly);
|
$output .= $_[0]->SUPER::www_edit($f->printRowsOnly);
|
||||||
unless ($_[0]->get("wobjectId") eq "new") {
|
unless ($_[0]->get("wobjectId") eq "new") {
|
||||||
$output .= '<p><a href="'.WebGUI::URL::page('func=editLink&lid=new&wid='.$_[0]->get("wobjectId"))
|
$output .= '<p><a href="'.WebGUI::URL::page('func=editLink&lid=new&wid='.$_[0]->get("wobjectId"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue