<% from slowfoot import binderytools from merescoharvester.controlpanel.tools import checkName f = asform(input) id = f.id domain = xml fileName = "%s.%s.repositoryGroup"%(domain.domain.id,id) if id == '': redirect('/page/domain.edit/' + domain.domain.id + '.domain?error=No%20name%20given.') elif not checkName(id): redirect('/page/domain.edit/' + domain.domain.id + '.domain?error=Name%20is%20not%20valid.%20Only%20use%20alphanumeric%20characters.') elif os.path.isfile(filepath(fileName)): redirect('/page/domain.edit/' + domain.domain.id + '.domain?error=Deze%20id%20bestaat%20al.') else: new_repositoryGroup = binderytools.bind_string("%s"%id).repositoryGroupId domain.domain.xml_append(new_repositoryGroup) target(filepath(domain.domain.id + '.domain')) req.write(domain.xml()) target(filepath(fileName)) %> <%escape_xml(id)%> <% redirect('/page/repositoryGroup.edit/' + fileName) # %>