[% currentPage = 'edit.html' currentPageTitle = 'Edit object' id = modwheel.getParam('id') title = modwheel.getParam('title') keywords = modwheel.getParam('keywords') summary = modwheel.getParam('summary') text = modwheel.getParam('text') active = modwheel.getParam('active') parent = modwheel.getParam('parent') sort = modwheel.getParam('sort') template = modwheel.getParam('template') username = modwheel.getCurrentUser() execute = modwheel.getParam('execute') executeDeleteFile = modwheel.getParam('executeDeleteFile') deleteFileId = modwheel.getParam('deleteFileId') %] [% # ######### Fetch the object requested. %] [% this = modwheel.fetchObject(id => id) %] [% error = 'No such object' UNLESS this%] [% id = this.id IF this.id %] [% # ######### Get prototype for object type. %] [% prototype = modwheel.getPrototypeForType(this.type) %] [% # ######### Set default values %] [% DEFAULT active = 'off' %] [% DEFAULT sort = 10 %] [% DEFAULT parent = this.parent %] [% # ############ Save the object. %] [% IF execute == 'Yes' %] [% error = 'All objects must have a title.' UNLESS title %] [% UNLESS error %] [% ret = this.setObjectValues( type => prototype.type name => title, keywords => keywords, description => summary, data => text, active => active, parent => parent, sort => sort, template => template owner => username, revised_by => username) %] [% ret = modwheel.saveObject(this) %] [% error = "Internal Error: Couldn't save object." UNLESS ret %] [% END %] [% END %] [% IF executeDeleteFile == 'Yes' and deleteFileId %] [% ret = modwheel.deleteRepositoryFile(deleteFileId) %] [% END %] [% INCLUDE header_basic.html %] [% INCLUDE header_js.html %] [% INCLUDE header_end.html %]

Edit [% prototype.type FILTER lcfirst %]: [% this.name %]

[% includeChangePathButton = 'Yes' %] [% INCLUDE currentpath.html %]

[% prototype.name %]

[% prototype.keywords %]

[% prototype.description %]

[% prototype.data %]

Active: Sort: Custom template:

Tags for this object:

[Add new tags]

Files connected with this object:

[% IF execute == 'Yes' %] [% IF error %] [% error %] [% ELSE %] [% prototype.type FILTER ucfirst %] successfully saved. [% ret %] [% END %] [% END %]

Help

You can use basic html tags, also if you want to reference a file that is connected with this object you can type: [file:2] where 2 is the id of the file (the number to the left in parantheses in the list of files above). [% INCLUDE footer.html %]