WebGUI 3.0.1 release
This commit is contained in:
parent
baec9039ef
commit
237925b365
43 changed files with 129 additions and 329 deletions
|
|
@ -30,7 +30,7 @@ sub duplicate {
|
|||
tie %data, 'Tie::CPHash';
|
||||
%data = getProperties($namespace,$_[0]);
|
||||
$pageId = $_[1] || $data{pageId};
|
||||
$newWidgetId = create($pageId,$namespace,$data{title},$data{displayTitle},$data{description},$data{processMacros},$data{position});
|
||||
$newWidgetId = create($pageId,$namespace,$data{title},$data{displayTitle},$data{description},$data{processMacros},$data{templatePosition});
|
||||
WebGUI::Attachment::copy($data{image},$_[0],$newWidgetId);
|
||||
WebGUI::Attachment::copy($data{attachment},$_[0],$newWidgetId);
|
||||
WebGUI::SQL->write("insert into Article values ($newWidgetId, $data{startDate}, $data{endDate}, ".quote($data{body}).", ".quote($data{image}).", ".quote($data{linkTitle}).", ".quote($data{linkURL}).", ".quote($data{attachment}).", '$data{convertCarriageReturns}')");
|
||||
|
|
@ -61,7 +61,7 @@ sub www_add {
|
|||
$output .= tableFormRow(WebGUI::International::get(174),WebGUI::Form::checkbox("displayTitle",1,1));
|
||||
$output .= tableFormRow(WebGUI::International::get(175),WebGUI::Form::checkbox("processMacros",1,1));
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$output .= tableFormRow(WebGUI::International::get(363),WebGUI::Form::selectList("position",\%hash));
|
||||
$output .= tableFormRow(WebGUI::International::get(363),WebGUI::Form::selectList("templatePosition",\%hash));
|
||||
$output .= tableFormRow(WebGUI::International::get(3,$namespace),WebGUI::Form::text("startDate",20,30,epochToSet(time()),1));
|
||||
$output .= tableFormRow(WebGUI::International::get(4,$namespace),WebGUI::Form::text("endDate",20,30,'01/01/2037',1));
|
||||
$output .= tableFormRow(WebGUI::International::get(5,$namespace),WebGUI::Form::textArea("body",'',50,10,1));
|
||||
|
|
@ -83,7 +83,7 @@ sub www_add {
|
|||
sub www_addSave {
|
||||
my ($widgetId, $image, $attachment);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$widgetId = create($session{page}{pageId},$session{form}{widget},$session{form}{title},$session{form}{displayTitle},$session{form}{description},$session{form}{processMacros},$session{form}{position});
|
||||
$widgetId = create($session{page}{pageId},$session{form}{widget},$session{form}{title},$session{form}{displayTitle},$session{form}{description},$session{form}{processMacros},$session{form}{templatePosition});
|
||||
$image = WebGUI::Attachment::save("image",$widgetId);
|
||||
$attachment = WebGUI::Attachment::save("attachment",$widgetId);
|
||||
WebGUI::SQL->write("insert into Article values ($widgetId, '".setToEpoch($session{form}{startDate})."', '".setToEpoch($session{form}{endDate})."', ".quote($session{form}{body}).", ".quote($image).", ".quote($session{form}{linkTitle}).", ".quote($session{form}{linkURL}).", ".quote($attachment).", '$session{form}{convertCarriageReturns}')");
|
||||
|
|
@ -140,8 +140,8 @@ sub www_edit {
|
|||
$output .= tableFormRow(WebGUI::International::get(174),WebGUI::Form::checkbox("displayTitle","1",$data{displayTitle}));
|
||||
$output .= tableFormRow(WebGUI::International::get(175),WebGUI::Form::checkbox("processMacros","1",$data{processMacros}));
|
||||
%hash = WebGUI::Widget::getPositions();
|
||||
$array[0] = $data{position};
|
||||
$output .= tableFormRow(WebGUI::International::get(363),WebGUI::Form::selectList("position",\%hash,\@array));
|
||||
$array[0] = $data{templatePosition};
|
||||
$output .= tableFormRow(WebGUI::International::get(363),WebGUI::Form::selectList("templatePosition",\%hash,\@array));
|
||||
$output .= tableFormRow(WebGUI::International::get(3,$namespace),WebGUI::Form::text("startDate",20,30,epochToSet($data{startDate}),1));
|
||||
$output .= tableFormRow(WebGUI::International::get(4,$namespace),WebGUI::Form::text("endDate",20,30,epochToSet($data{endDate}),1));
|
||||
$output .= tableFormRow(WebGUI::International::get(5,$namespace),WebGUI::Form::textArea("body",$data{body},50,10,1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue