Begin to i18n the Site Starter. Added a Save tag to the WebGUI

namespace so we don't have to put one in every other namespace
anymore.
This commit is contained in:
Colin Kuskie 2008-08-28 19:22:00 +00:00
parent 6edcd7ab61
commit c59b48a3db
2 changed files with 87 additions and 125 deletions

View file

@ -151,19 +151,18 @@ sub handler {
$session->setting->set('companyName',$form->text("companyName")) if ($form->get("companyName")); $session->setting->set('companyName',$form->text("companyName")) if ($form->get("companyName"));
$session->setting->set('companyURL',$form->url("companyURL")) if ($form->get("companyURL")); $session->setting->set('companyURL',$form->url("companyURL")) if ($form->get("companyURL"));
$session->setting->set('companyEmail',$form->email("companyEmail")) if ($form->get("companyEmail")); $session->setting->set('companyEmail',$form->email("companyEmail")) if ($form->get("companyEmail"));
$legend = "Site Starter"; $legend = $i18n->get('site starter title');
$output .= ' <p>Do you wish to use the WebGUI Site Starter, which will lead you through options to create a custom $output .= ' <p>'.$i18n->get('site starter body').'</p>
look and feel for your site, and set up some basic content areas?</p> <p><a href="'.$session->url->gateway(undef, "step=7").'">'.$i18n->get('no thanks').'</a> &nbsp; &nbsp; &nbsp;
<p><a href="'.$session->url->gateway(undef, "step=7").'">No, thanks.</a> &nbsp; &nbsp; &nbsp; <a href="'.$session->url->gateway(undef,"step=4").'">'.$i18n->get('yes please').'</a></p>
<a href="'.$session->url->gateway(undef,"step=4").'">Yes, please!</a></p>
'; ';
} }
elsif ($session->form->process("step") eq "4") { elsif ($session->form->process("step") eq "4") {
my $f = WebGUI::HTMLForm->new($session,action=>$session->url->gateway()); my $f = WebGUI::HTMLForm->new($session,action=>$session->url->gateway());
$f->hidden( name=>"step", value=>"5",); $f->hidden( name=>"step", value=>"5",);
$f->file(name=>"logo", label=>"Logo"); $f->file(name=>"logo", label=>$i18n->get('logo'));
$f->submit; $f->submit;
$legend = "Upload Your Logo"; $legend = $i18n->get('upload logo');
$output .= $f->print; $output .= $f->print;
} }
elsif ($session->form->process("step") eq "5") { elsif ($session->form->process("step") eq "5") {
@ -198,7 +197,7 @@ sub handler {
$style->setScript($url->extras('/colorpicker/colorpicker.js'),{ type=>'text/javascript' }); $style->setScript($url->extras('/colorpicker/colorpicker.js'),{ type=>'text/javascript' });
$style->setScript($url->extras("/styleDesigner/styleDesigner.js"), {type=>"text/javascript"}); $style->setScript($url->extras("/styleDesigner/styleDesigner.js"), {type=>"text/javascript"});
$style->setLink($url->extras("/styleDesigner/styleDesigner.css"), {rel=>"stylesheet", type=>"text/css"}); $style->setLink($url->extras("/styleDesigner/styleDesigner.css"), {rel=>"stylesheet", type=>"text/css"});
$legend = "Style Designer"; $legend = $i18n->get("style designer");
$output .= ' $output .= '
<form method="post"> <form method="post">
<input type="submit" value="Save"> <input type="submit" value="Save">
@ -207,7 +206,7 @@ sub handler {
<script type="text/javascript"> <script type="text/javascript">
document.write(WebguiStyleDesigner.draw("^c;","'.$logoUrl.'","'.$storageId.'")); document.write(WebguiStyleDesigner.draw("^c;","'.$logoUrl.'","'.$storageId.'"));
</script> </script>
<input type="submit" value="Save"> <input type="submit" value="'.$i18n->get('save').'">
</form> </form>
'; ';
} }

View file

@ -1901,91 +1901,6 @@ This group could then be named "Employees in HMO 1", and would allow you to rest
lastUpdated => 1056151382 lastUpdated => 1056151382
}, },
'890' => {
message => q|<p>WebGUI has a sub-system that can create tabs. You'll see these in complex forms such as page editing. In order to make the tabs system look good and match your site, you'll need to add a section to your style's style sheet specifically for the tabs.
</p>
<p>The following style sheet classes are available:
</p>
<p><b>.tab</b><br />
The default look of each tab.
</p>
<p><b>div.tabs</b><br />
This also sets some properties for all of the tabs. This should be used for the text labels in the tabs.
</p>
<p><b>.tabBody</b><br />
The content area for each tab. This is where the form will show up. Note that for best results the background color of this should match the background color of .tabActive.
</p>
<p><b>.tabHover</b><br />
The look of a tab as the mouse hovers over it.
</p>
<p><b>.tabActive</b><br />
The look of the tab that is currently visible.
</p>
<p><i>Examples</i><br />
You can use these instead of creating your own if you wish. Or just use these as guidelines for creating your own.
</p>
<table width="100%"><tr><td valign="top">
<b>White or Light Colored Styles</b>
<pre>
.tab {
border: 1px solid black;
background-color: #eeeeee;
}
.tabBody {
border: 1px solid black;
border-top: 1px solid black;
border-left: 1px solid black;
background-color: #dddddd;
}
div.tabs {
line-height: 15px;
font-size: 14px;
}
.tabHover {
background-color: #cccccc;
}
.tabActive {
background-color: #dddddd;
}
</pre>
</td><td valign="top">
<b>Black or Dark Colored Styles</b>
<pre>
.tab {
border: 1px solid white;
background-color: #333333;
}
.tabBody {
border: 1px solid white;
border-top: 1px solid white;
border-left: 1px solid white;
background-color: #444444;
}
div.tabs {
line-height: 15px;
font-size: 14px;
}
.tabHover {
background-color: #555555;
}
.tabActive {
background-color: #444444;
}
</pre>
</td></tr></table>
|,
lastUpdated => 1146592150
},
'440' => { '440' => {
message => q|Contact Information|, message => q|Contact Information|,
lastUpdated => 1031514049 lastUpdated => 1031514049
@ -3628,17 +3543,17 @@ LongTruncOk=1</p>
message => q|Private Message Options|, message => q|Private Message Options|,
lastUpdated => 1181019679, lastUpdated => 1181019679,
}, },
'user profile field private message allow label' => { 'user profile field private message allow label' => {
message => q|Allow All|, message => q|Allow All|,
lastUpdated => 1181019679, lastUpdated => 1181019679,
}, },
'user profile field private message friends only label' => { 'user profile field private message friends only label' => {
message => q|Allow From My Friends Only|, message => q|Allow From My Friends Only|,
lastUpdated => 1181019679, lastUpdated => 1181019679,
}, },
'user profile field private message allow none label' => { 'user profile field private message allow none label' => {
message => q|Allow None|, message => q|Allow None|,
lastUpdated => 1181019679, lastUpdated => 1181019679,
@ -3728,7 +3643,7 @@ LongTruncOk=1</p>
message => q{Group to view and expire active sessions.}, message => q{Group to view and expire active sessions.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminAdSpace label' => { 'settings groupIdAdminAdSpace label' => {
message => q{AdSpace}, message => q{AdSpace},
@ -3738,7 +3653,7 @@ LongTruncOk=1</p>
message => q{Group to manage advertising.}, message => q{Group to manage advertising.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminCache label' => { 'settings groupIdAdminCache label' => {
message => q{Cache}, message => q{Cache},
@ -3748,7 +3663,7 @@ LongTruncOk=1</p>
message => q{Group to view and flush cache.}, message => q{Group to view and flush cache.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminCron label' => { 'settings groupIdAdminCron label' => {
@ -3759,7 +3674,7 @@ LongTruncOk=1</p>
message => q{Group to manage scheduled workflows.}, message => q{Group to manage scheduled workflows.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminDatabaseLink label' => { 'settings groupIdAdminDatabaseLink label' => {
message => q{Database Link}, message => q{Database Link},
@ -3769,7 +3684,7 @@ LongTruncOk=1</p>
message => q{Group to manage database links.}, message => q{Group to manage database links.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminGraphics label' => { 'settings groupIdAdminGraphics label' => {
message => q{Graphics}, message => q{Graphics},
@ -3779,7 +3694,7 @@ LongTruncOk=1</p>
message => q{Group to manage fonts and palettes.}, message => q{Group to manage fonts and palettes.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminGroup label' => { 'settings groupIdAdminGroup label' => {
message => q{Groups}, message => q{Groups},
@ -3789,7 +3704,7 @@ LongTruncOk=1</p>
message => q{Group to manage all groups.}, message => q{Group to manage all groups.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminGroupAdmin label' => { 'settings groupIdAdminGroupAdmin label' => {
message => q{Groups (limited)}, message => q{Groups (limited)},
@ -3799,7 +3714,7 @@ LongTruncOk=1</p>
message => q{Group to manage groups that user is administrator of.}, message => q{Group to manage groups that user is administrator of.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminHelp label' => { 'settings groupIdAdminHelp label' => {
message => q{Help}, message => q{Help},
@ -3809,7 +3724,7 @@ LongTruncOk=1</p>
message => q{Group that can view help.}, message => q{Group that can view help.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminLDAPLink label' => { 'settings groupIdAdminLDAPLink label' => {
message => q{LDAP}, message => q{LDAP},
@ -3819,7 +3734,7 @@ LongTruncOk=1</p>
message => q{Group to manage LDAP links.}, message => q{Group to manage LDAP links.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminLoginHistory label' => { 'settings groupIdAdminLoginHistory label' => {
message => q{Login History}, message => q{Login History},
@ -3829,7 +3744,7 @@ LongTruncOk=1</p>
message => q{Group to view login history.}, message => q{Group to view login history.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminProfileSettings label' => { 'settings groupIdAdminProfileSettings label' => {
message => q{User Profiling}, message => q{User Profiling},
@ -3839,7 +3754,7 @@ LongTruncOk=1</p>
message => q{Group to manage user profile fields.}, message => q{Group to manage user profile fields.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminReplacements label' => { 'settings groupIdAdminReplacements label' => {
message => q{Content Filters}, message => q{Content Filters},
@ -3849,7 +3764,7 @@ LongTruncOk=1</p>
message => q{Group to manage content filters.}, message => q{Group to manage content filters.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminSpectre label' => { 'settings groupIdAdminSpectre label' => {
message => q{Spectre}, message => q{Spectre},
@ -3859,7 +3774,7 @@ LongTruncOk=1</p>
message => q{Group to view Spectre status}, message => q{Group to view Spectre status},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminStatistics label' => { 'settings groupIdAdminStatistics label' => {
message => q{Statistics}, message => q{Statistics},
@ -3869,7 +3784,7 @@ LongTruncOk=1</p>
message => q{Group to view statistics}, message => q{Group to view statistics},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminUser label' => { 'settings groupIdAdminUser label' => {
message => q{Users}, message => q{Users},
lastUpdated => 0, lastUpdated => 0,
@ -3878,7 +3793,7 @@ LongTruncOk=1</p>
message => q{Group to manage users. Can add and edit users.}, message => q{Group to manage users. Can add and edit users.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminUserAdd label' => { 'settings groupIdAdminUserAdd label' => {
message => q{Users (add only)}, message => q{Users (add only)},
@ -3888,7 +3803,7 @@ LongTruncOk=1</p>
message => q{Group that can only add new users.}, message => q{Group that can only add new users.},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminVersionTag label' => { 'settings groupIdAdminVersionTag label' => {
message => q{Version Tags}, message => q{Version Tags},
@ -3898,7 +3813,7 @@ LongTruncOk=1</p>
message => q{Group to manage version tags}, message => q{Group to manage version tags},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminWorkflow label' => { 'settings groupIdAdminWorkflow label' => {
message => q{Workflow}, message => q{Workflow},
@ -3908,7 +3823,7 @@ LongTruncOk=1</p>
message => q{Group to manage workflows}, message => q{Group to manage workflows},
lastUpdated => 0, lastUpdated => 0,
}, },
'settings groupIdAdminWorkflowRun label' => { 'settings groupIdAdminWorkflowRun label' => {
message => q{Workflow (run)}, message => q{Workflow (run)},
@ -3958,7 +3873,7 @@ LongTruncOk=1</p>
message => q{Rich Editor}, message => q{Rich Editor},
lastUpdated => 1202274234, lastUpdated => 1202274234,
}, },
'SubscriptionGroup formName' => { 'SubscriptionGroup formName' => {
message => q{Subscription Group}, message => q{Subscription Group},
lastUpdated => 1202274234, lastUpdated => 1202274234,
@ -3974,49 +3889,97 @@ LongTruncOk=1</p>
lastUpdated => 0, lastUpdated => 0,
context => q{Label for site setting}, context => q{Label for site setting},
}, },
'showMessageOnLogin description' => { 'showMessageOnLogin description' => {
message => q{If yes, show a message after a user logs in.}, message => q{If yes, show a message after a user logs in.},
lastUpdated => 0, lastUpdated => 0,
context => q{Description for site setting}, context => q{Description for site setting},
}, },
'showMessageOnLoginTimes label' => { 'showMessageOnLoginTimes label' => {
message => q{Show Message Number of Times}, message => q{Show Message Number of Times},
lastUpdated => 0, lastUpdated => 0,
context => q{Label for site setting}, context => q{Label for site setting},
}, },
'showMessageOnLoginTimes description' => { 'showMessageOnLoginTimes description' => {
message => q{The number of times a user sees the message, one per login}, message => q{The number of times a user sees the message, one per login},
lastUpdated => 0, lastUpdated => 0,
context => q{Description for site setting}, context => q{Description for site setting},
}, },
'showMessageOnLoginReset label' => { 'showMessageOnLoginReset label' => {
message => q{Reset All Users Number of Times Seen}, message => q{Reset All Users Number of Times Seen},
lastUpdated => 0, lastUpdated => 0,
context => q{Label for site setting}, context => q{Label for site setting},
}, },
'showMessageOnLoginReset description' => { 'showMessageOnLoginReset description' => {
message => q{If "yes", will force all users to see the login message again}, message => q{If "yes", will force all users to see the login message again},
lastUpdated => 0, lastUpdated => 0,
context => q{Description for site setting}, context => q{Description for site setting},
}, },
'showMessageOnLoginBody label' => { 'showMessageOnLoginBody label' => {
message => q{Message on Login Body}, message => q{Message on Login Body},
lastUpdated => 0, lastUpdated => 0,
context => q{Label for site setting}, context => q{Label for site setting},
}, },
'showMessageOnLoginBody description' => { 'showMessageOnLoginBody description' => {
message => q{The body of the message to show on login. Macros are allowed.}, message => q{The body of the message to show on login. Macros are allowed.},
lastUpdated => 0, lastUpdated => 0,
context => q{Description for site setting}, context => q{Description for site setting},
}, },
'site starter title' => {
message => q{Site Starter},
lastUpdated => 0,
context => q{Title for the site starter screen.},
},
'site starter body' => {
message => q{Do you wish to use the WebGUI Site Starter, which will lead you through options to create a custom look and feel for your site, and set up some basic content areas?},
lastUpdated => 0,
context => q{Body for the site starter screen.},
},
'no thanks' => {
message => q{No, thanks},
lastUpdated => 0,
context => q{Option in site starter to not run it},
},
'yes please' => {
message => q{Yes, please},
lastUpdated => 0,
context => q{Option in site starter to run the site starter},
},
'logo' => {
message => q{Logo},
lastUpdated => 0,
context => q{Label for the Logo upload field in the site starter.},
},
'upload logo' => {
message => q{Upload Your Logo},
lastUpdated => 0,
context => q{Title for the Logo upload screen in the site starter.},
},
'style designer' => {
message => q{Style Designer},
lastUpdated => 0,
context => q{Title for the style designer screen in the site starter.},
},
'save' => {
message => q{Save},
lastUpdated => 0,
context => q{General purpose, similar to submit.},
},
}; };
1; 1;