Merge commit 'v7.10.19' into WebGUI8
This commit is contained in:
commit
4fea10a1f5
52 changed files with 490 additions and 77 deletions
|
|
@ -2494,6 +2494,12 @@ sub www_editThingSave {
|
|||
my $thingId = $self->session->form->process("thingId");
|
||||
my $fields = $self->getFields($thingId);
|
||||
|
||||
if($fields->rows < 1){
|
||||
$self->session->log->warn("Thing failed to create because it had no fields");
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_Thingy");
|
||||
return $self->www_editThing($i18n->get("thing must have fields"));
|
||||
}
|
||||
|
||||
my $thing = {
|
||||
thingId => $thingId,
|
||||
label => $form->process("label"),
|
||||
|
|
@ -2524,12 +2530,6 @@ sub www_editThingSave {
|
|||
};
|
||||
$self->setCollateral("Thingy_things", "thingId", $thing, 0, 1);
|
||||
|
||||
if($fields->rows < 1){
|
||||
$self->session->log->warn("Thing failed to create because it had no fields");
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_Thingy");
|
||||
return $self->www_editThing($i18n->get("thing must have fields"));
|
||||
}
|
||||
|
||||
while (my $field = $fields->hashRef) {
|
||||
my $display = $self->session->form->process("display_".$field->{fieldId}) || 0;
|
||||
my $viewScreenTitle = $self->session->form->process("viewScreenTitle_".$field->{fieldId}) || 0;
|
||||
|
|
@ -3921,6 +3921,7 @@ sub www_viewThingData {
|
|||
my $thingId = shift || $session->form->process('thingId');
|
||||
my $thingDataId = shift || $session->form->process('thingDataId');
|
||||
my $templateId = shift || $session->form->process('templateId');
|
||||
my $callerAssetId = shift || $session->form->process('callerAssetId');
|
||||
my $var = $self->get;
|
||||
my $url = $self->getUrl;
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_Thingy");
|
||||
|
|
@ -3933,6 +3934,7 @@ sub www_viewThingData {
|
|||
$var->{"addThing_url"} = $session->url->append($url, 'func=editThing;thingId=new');
|
||||
$var->{"manage_url"} = $session->url->append($url, 'func=manage');
|
||||
$var->{"thing_label"} = $thingProperties->{label};
|
||||
$var->{"callerAssetId"} = $callerAssetId;
|
||||
|
||||
if($self->hasPrivileges($thingProperties->{groupIdEdit})){
|
||||
$var->{"edit_url"} = $session->url->append($url,'func=editThingData;thingId='
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue