r43 - in trunk/chorem-web/src/main: java/org/chorem/bonzoms/action resources resources/i18n resources/org/chorem/bonzoms/action webapp/WEB-INF/jsp/bonzoms
Author: vbriand Date: 2011-03-25 12:01:27 +0100 (Fri, 25 Mar 2011) New Revision: 43 Url: http://chorem.org/repositories/revision/chorem/43 Log: Added classes with validation for adding an employment contract and some contact details Added: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/ContactDetailsAction-validation.xml trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/EmploymentContractAction-validation.xml trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addEmploymentContract.jsp Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties trunk/chorem-web/src/main/resources/struts.xml Added: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java (rev 0) +++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java 2011-03-25 11:01:27 UTC (rev 43) @@ -0,0 +1,115 @@ +package org.chorem.bonzoms.action; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.ChoremProxy; +import org.chorem.action.BaseAction; +import org.chorem.entities.ContactDetailsImpl; + +import static org.nuiton.i18n.I18n.n_; + +/** + * Contact details management class + * + * @author vbriand + */ +public class ContactDetailsAction extends BaseAction { + + private static final long serialVersionUID = 2480555291620298704L; + + private static final Log log = LogFactory.getLog(ContactDetailsAction.class); + + /** + * Adds new contact details + * + * @return INPUT if the mandatory fields haven't all been filled in + * @return SUCCESS if the contact details have been added successfully + * @return ERROR if an error occurred + */ + public String add() { + String result = INPUT; + + if (name != null && type != null && value != null) { + if (!name.isEmpty() && !type.isEmpty() && !value.isEmpty()) { + //If the contact details have been added successfully + if (addContactDetails()) { + result = SUCCESS; + } else { + result = ERROR; + } + } + } + return result; + } + + protected String name; + protected String type; + protected String value; + + /** + * Stores the new contact details through the proxy + * + * @return true if the contact details have been stored properly + * @return false if a problem occurred + */ + protected boolean addContactDetails() { + boolean result = true; + + try { + ChoremProxy proxy = getChoremProxy(); + ContactDetailsImpl newContactDetails = new ContactDetailsImpl(); + + newContactDetails.setName(name); + newContactDetails.setType(type); + newContactDetails.setValue(value); + proxy.store(newContactDetails); + } catch (Exception e) { + result = false; + addActionError(getText(n_("chorem.bonzoms.contactDetails.create.error"))); + log.error("An error occured while creating new contact details", e); + } + return result; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @param type the type to set + */ + public void setType(String type) { + this.type = type; + } + + /** + * @return the value + */ + public String getValue() { + return value; + } + + /** + * @param value the value to set + */ + public void setValue(String value) { + this.value = value; + } +} Property changes on: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/ContactDetailsAction.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java =================================================================== --- trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java (rev 0) +++ trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java 2011-03-25 11:01:27 UTC (rev 43) @@ -0,0 +1,203 @@ +package org.chorem.bonzoms.action; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.ChoremProxy; +import org.chorem.action.BaseAction; +import org.chorem.entities.EmploymentContractImpl; + +import static org.nuiton.i18n.I18n.n_; + +/** + * Employment contract management class + * + * @author vbriand + */ +public class EmploymentContractAction extends BaseAction { + + private static final long serialVersionUID = -5841507190565206548L; + + private static final Log log = LogFactory.getLog(EmploymentContractAction.class); + + /** + * Adds a new employment contract + * + * @return INPUT if the mandatory fields haven't all been filled in + * @return SUCCESS if the employment contract has been added successfully + * @return ERROR if an error occurred + */ + public String add() { + String result = INPUT; + + if (type != null && description != null && salary != null && + workingTime != null && beginDate != null && endDate != null) { + if (!type.isEmpty() && !description.isEmpty() && + !salary.isEmpty() && !workingTime.isEmpty() && + !beginDate.isEmpty()) { + //If the employment contract has been added successfully + if (addEmploymentContract()) { + result = SUCCESS; + } else { + result = ERROR; + } + } + } + return result; + } + + protected String type; + protected String description; + protected String salary; + protected String workingTime; + protected String beginDate; + protected String endDate; + + /** + * Stores the new employment contract through the proxy + * + * @return true if the employment contract has been stored properly + * @return false if a problem occurred + */ + protected boolean addEmploymentContract() { + boolean result = true; + + try { + ChoremProxy proxy = getChoremProxy(); + EmploymentContractImpl newEmploymentContract = new EmploymentContractImpl(); + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + + //Lenient mode disabled because results may be very odd + formatter.setLenient(false); + try { + Calendar cal = Calendar.getInstance(); + + newEmploymentContract.setBeginDate(formatter.parse(beginDate)); + + //Subtracts 1 day to the current time so the next test willn't + //fail if the begin date is today's date, as the before() method + //is exclusive + cal.add(Calendar.DAY_OF_MONTH, -1); + //If the begin date is set before the current date + if (newEmploymentContract.getBeginDate().before(cal.getTime())) { + result = false; + addFieldError("beginDate", getText(n_("chorem.beginDate.beforeToday"))); + } + + if (!endDate.isEmpty()) { //If the contract is not permanent + newEmploymentContract.setEndDate(formatter.parse(endDate)); + //If the end date is anterior to the begin date (...) + if (newEmploymentContract.getEndDate().before(newEmploymentContract.getBeginDate())) { + result = false; + addActionError(getText(n_("chorem.endDate.afterBegin"))); + } + } + } catch (ParseException e) { + //If the date doesn't match the format above + result = false; + addActionError(getText(n_("chorem.date.wrongFormat"))); + } + newEmploymentContract.setDescription(description); + newEmploymentContract.setSalary(Float.parseFloat(salary)); + newEmploymentContract.setType(type); + newEmploymentContract.setWorkingTime(Integer.parseInt(workingTime)); + + //If everything went smoothly + if (result) { + proxy.store(newEmploymentContract); + } + } catch (Exception e) { + result = false; + addActionError(getText(n_("chorem.bonzoms.employmentcontract.create.error"))); + log.error("An error occured while creating a new employment contract", e); + } + return result; + } + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @param type the type to set + */ + public void setType(String type) { + this.type = type; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * @return the salary + */ + public String getSalary() { + return salary; + } + + /** + * @param salary the salary to set + */ + public void setSalary(String salary) { + this.salary = salary; + } + + /** + * @return the workingTime + */ + public String getWorkingTime() { + return workingTime; + } + + /** + * @param workingTime the workingTime to set + */ + public void setWorkingTime(String workingTime) { + this.workingTime = workingTime; + } + + /** + * @return the beginDate + */ + public String getBeginDate() { + return beginDate; + } + + /** + * @param beginDate the beginDate to set + */ + public void setBeginDate(String beginDate) { + this.beginDate = beginDate; + } + + /** + * @return the endDate + */ + public String getEndDate() { + return endDate; + } + + /** + * @param endDate the endDate to set + */ + public void setEndDate(String endDate) { + this.endDate = endDate; + } +} Property changes on: trunk/chorem-web/src/main/java/org/chorem/bonzoms/action/EmploymentContractAction.java ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties =================================================================== --- trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-03-25 09:14:58 UTC (rev 42) +++ trunk/chorem-web/src/main/resources/i18n/chorem-web_en_GB.properties 2011-03-25 11:01:27 UTC (rev 43) @@ -6,28 +6,43 @@ chorem.bonzoms.company.type=Company''s type chorem.bonzoms.contactDetails=Contact details chorem.bonzoms.contactDetails.add=Add a new contact details +chorem.bonzoms.contactDetails.create.error=An error occurred while creating your new contact details, please try again. If the problem persists, please contact an administrator chorem.bonzoms.contactDetails.name=Contact details'' name +chorem.bonzoms.contactDetails.name.required=You must enter the contact details'' name chorem.bonzoms.contactDetails.type=Contact details'' type +chorem.bonzoms.contactDetails.type.required=You must enter the contact details'' type chorem.bonzoms.contactDetails.value=Contact details'' value +chorem.bonzoms.contactDetails.value.required=You must enter the contact details'' value chorem.bonzoms.employmentContract=Employment contract chorem.bonzoms.employmentContract.add=Add a new employment contract +chorem.bonzoms.employmentContract.beginDate=Begin date (dd/mm/yyyy) +chorem.bonzoms.employmentContract.beginDate.required=You must enter the employment contract''s begin date chorem.bonzoms.employmentContract.description=Description +chorem.bonzoms.employmentContract.description.required=You must enter the employment contract''s description +chorem.bonzoms.employmentContract.endDate=End date (dd/mm/yyyy) chorem.bonzoms.employmentContract.salary=Salary +chorem.bonzoms.employmentContract.salary.required=You must enter the employee''s salary +chorem.bonzoms.employmentContract.salary.wrongFormat=The salary must be a positive integer or floating point number (the decimal mark may be either a dot or a comma) chorem.bonzoms.employmentContract.type=Type +chorem.bonzoms.employmentContract.type.required=You must enter the employment contract''s type chorem.bonzoms.employmentContract.workingTime=Working time +chorem.bonzoms.employmentContract.workingTime.required=You must enter the employee''s working time +chorem.bonzoms.employmentContract.workingTime.wrongFormat=The working time must be a positive integer +chorem.bonzoms.employmentcontract.create.error=An error occurred while creating your new employment contract, please try again. If the problem persists, please contact an administrator +chorem.bonzoms.employmentcontract.endDate.required=You must enter the employment contract''s end date chorem.bonzoms.home=Home chorem.bonzoms.person=Person chorem.bonzoms.person.add=Add a new person -chorem.bonzoms.person.birthDate=Birth date -chorem.bonzoms.person.birthDate.required=You must enter the person birth date +chorem.bonzoms.person.birthDate=Birth date (dd/mm/yyyy) +chorem.bonzoms.person.birthDate.required=You must enter the person''s birth date chorem.bonzoms.person.create.error=An error occurred while adding the person, please try again. If the problem persists, please contact an administrator chorem.bonzoms.person.email=Email -chorem.bonzoms.person.email.required=You must enter the person email +chorem.bonzoms.person.email.required=You must enter the person''s email chorem.bonzoms.person.email.wrongFormat=The email format is invalid chorem.bonzoms.person.firstName=First name -chorem.bonzoms.person.firstName.required=You must enter the person first name +chorem.bonzoms.person.firstName.required=You must enter the person''s first name chorem.bonzoms.person.lastName=Last name -chorem.bonzoms.person.lastName.required=You must enter the person last name +chorem.bonzoms.person.lastName.required=You must enter the person''s last name chorem.config.configFileName.description=chorem''s configuration filename chorem.date.wrongFormat=The date must be in the following format \: dd/mm/yyyy chorem.endDate.afterBegin=The end date cannot be posterior to the begin date @@ -43,12 +58,12 @@ chorem.gepeto.projectDetails.title=Details of project {0} chorem.gepeto.projectOrder=Project order chorem.gepeto.projectOrder.add=Add a new project order -chorem.gepeto.projectOrder.beginDate=Begin date +chorem.gepeto.projectOrder.beginDate=Begin date (dd/mm/yyyy) chorem.gepeto.projectOrder.beginDate.required=You must provide a begin date for this project order chorem.gepeto.projectOrder.create.error=An error occurred while creating your new project order, please try again. If the problem persists, please contact an administrator chorem.gepeto.projectOrder.description=Description chorem.gepeto.projectOrder.description.required=You must describe the project order -chorem.gepeto.projectOrder.estimatedEndDate=Estimated end date +chorem.gepeto.projectOrder.estimatedEndDate=Estimated end date (dd/mm/yyyy) chorem.gepeto.projectOrder.estimatedEndDate.required=You must enter the estimated end date for this project order chorem.gepeto.projectOrder.type=Type chorem.gepeto.projectOrder.type.required=You must specify the project order''s type @@ -56,7 +71,7 @@ chorem.gepeto.results.title=Results by year chorem.gepeto.task=Task {0} chorem.gepeto.task.add=Add a new task -chorem.gepeto.task.beginDate=Begin date +chorem.gepeto.task.beginDate=Begin date (dd/mm/yyyy) chorem.gepeto.task.beginDate.required=You must enter the begin date for this task chorem.gepeto.task.create.error=An error occurred while creating your new task, please try again. If the problem persists, please contact an administrator chorem.gepeto.task.description=Description @@ -64,11 +79,11 @@ chorem.gepeto.task.estimatedDays=Estimated days chorem.gepeto.task.estimatedDays.required=You must enter the estimated number of days for this task chorem.gepeto.task.estimatedDays.wrongFormat=The estimated days must be a positive integer -chorem.gepeto.task.estimatedEndDate=Estimated end date +chorem.gepeto.task.estimatedEndDate=Estimated end date (dd/mm/yyyy) chorem.gepeto.task.estimatedEndDate.required=You must enter the estimated end date for this task chorem.gepeto.task.name=Task name -chorem.gepeto.task.name.required=You must enter the task name +chorem.gepeto.task.name.required=You must enter the task''s name chorem.gepeto.task.price=Price -chorem.gepeto.task.price.required=You must enter the task price +chorem.gepeto.task.price.required=You must enter the task''s price chorem.gepeto.task.price.wrongFormat=The price must be a positive integer or floating point number (the decimal mark may be either a dot or a comma) chorem.home=Home Modified: trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties =================================================================== --- trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-03-25 09:14:58 UTC (rev 42) +++ trunk/chorem-web/src/main/resources/i18n/chorem-web_fr_FR.properties 2011-03-25 11:01:27 UTC (rev 43) @@ -8,21 +8,32 @@ chorem.bonzoms.company.type.required=Vous devez entrer le type de la soci\u00E9t\u00E9 chorem.bonzoms.contactDetails=M\u00E9thode de contact chorem.bonzoms.contactDetails.add=Ajouter une nouvelle m\u00E9thode de contact +chorem.bonzoms.contactDetails.create.error=Une erreur s''est produite lors de la cr\u00E9ation de votre nouvelle m\u00E9thode de contact, merci d''essayer \u00E0 nouveau. Si le probl\u00E8me se reproduit, merci de contacter un administrateur chorem.bonzoms.contactDetails.name=Nom de la m\u00E9thode de contact chorem.bonzoms.contactDetails.type=Type de la m\u00E9thode de contact chorem.bonzoms.contactDetails.value=Valeur de la m\u00E9thode de contact chorem.bonzoms.employmentContract=Contrat de travail chorem.bonzoms.employmentContract.add=Ajouter un nouveau contrat de travail +chorem.bonzoms.employmentContract.beginDate=Date de d\u00E9but +chorem.bonzoms.employmentContract.beginDate.required=Vous devez renseigner la date de d\u00E9but du contrat de travail chorem.bonzoms.employmentContract.description=Description +chorem.bonzoms.employmentContract.description.required=Vous devez d\u00E9crire le contrat de travail +chorem.bonzoms.employmentContract.endDate=Date de fin chorem.bonzoms.employmentContract.salary=Salaire +chorem.bonzoms.employmentContract.salary.required=Vous devez entrer le salaire de l'employ\u00E9 +chorem.bonzoms.employmentContract.salary.wrongFormat=Le salaire doit \u00EAtre un entier positif ou un nombre \u00E0 virgule flottante positif (le s\u00E9parateur d\u00E9cimal peut \u00EAtre un point ou une virgule) chorem.bonzoms.employmentContract.type=Type +chorem.bonzoms.employmentContract.type.required=Vous devez sp\u00E9cifier le type du contrat de travail chorem.bonzoms.employmentContract.workingTime=Temps de travail +chorem.bonzoms.employmentContract.workingTime.required=Vous devez saisir le temps de travail de l'employ\u00E9 +chorem.bonzoms.employmentContract.workingTime.wrongFormat=Le temps de travail doit \u00EAtre un entier positif +chorem.bonzoms.employmentcontract.create.error=Une erreur s''est produite lors de la cr\u00E9ation de votre nouveau contrat de travail, merci d''essayer \u00E0 nouveau. Si le probl\u00E8me se reproduit, merci de contacter un administrateur chorem.bonzoms.home=Accueil chorem.bonzoms.person=Personne chorem.bonzoms.person.add=Ajouter une nouvelle personne chorem.bonzoms.person.birthDate=Date de naissance chorem.bonzoms.person.birthDate.required=Vous devez entrer la date de naissance de la personne -chorem.bonzoms.person.create.error= +chorem.bonzoms.person.create.error=Une erreur s''est produite lors de l''ajout de la personne, merci d''essayer \u00E0 nouveau. Si le probl\u00E8me se reproduit, merci de contacter un administrateur chorem.bonzoms.person.email=Email chorem.bonzoms.person.email.required=Vous devez entrer l''adresse email de la personne chorem.bonzoms.person.email.wrongFormat=L''adresse email que vous avez entr\u00E9e est incorrecte Added: trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/ContactDetailsAction-validation.xml =================================================================== --- trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/ContactDetailsAction-validation.xml (rev 0) +++ trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/ContactDetailsAction-validation.xml 2011-03-25 11:01:27 UTC (rev 43) @@ -0,0 +1,21 @@ +<!DOCTYPE validators PUBLIC + "-//OpenSymphony Group//XWork Validator 1.0.2//EN" + "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> + +<validators> + <field name="name"> + <field-validator type="requiredstring"> + <message key="chorem.bonzoms.contactDetails.name.required" /> + </field-validator> + </field> + <field name="type"> + <field-validator type="requiredstring"> + <message key="chorem.bonzoms.contactDetails.type.required" /> + </field-validator> + </field> + <field name="value"> + <field-validator type="requiredstring"> + <message key="chorem.bonzoms.contactDetails.value.required" /> + </field-validator> + </field> +</validators> Property changes on: trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/ContactDetailsAction-validation.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/EmploymentContractAction-validation.xml =================================================================== --- trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/EmploymentContractAction-validation.xml (rev 0) +++ trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/EmploymentContractAction-validation.xml 2011-03-25 11:01:27 UTC (rev 43) @@ -0,0 +1,49 @@ +<!DOCTYPE validators PUBLIC + "-//OpenSymphony Group//XWork Validator 1.0.2//EN" + "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> + +<validators> + <field name="type"> + <field-validator type="requiredstring"> + <message key="chorem.bonzoms.employmentContract.type.required" /> + </field-validator> + </field> + <field name="description"> + <field-validator type="requiredstring"> + <message key="chorem.bonzoms.employmentContract.description.required" /> + </field-validator> + </field> + <field name="salary"> + <field-validator type="requiredstring"> + <message key="chorem.bonzoms.employmentContract.salary.required" /> + </field-validator> + <field-validator type="regex"> + <param name="expression"><![CDATA[([0-9]+)([\.,][0-9]+)?]]></param> + <message key="chorem.bonzoms.employmentContract.salary.wrongFormat" /> + </field-validator> + </field> + <field name="workingTime"> + <field-validator type="requiredstring"> + <message key="chorem.bonzoms.employmentContract.workingTime.required" /> + </field-validator> + <field-validator type="regex"> + <param name="expression"><![CDATA[([0-9]+)]]></param> + <message key="chorem.bonzoms.employmentContract.workingTime.wrongFormat" /> + </field-validator> + </field> + <field name="beginDate"> + <field-validator type="requiredstring"> + <message key="chorem.bonzoms.employmentContract.beginDate.required" /> + </field-validator> + <field-validator type="regex"> + <param name="expression"><![CDATA[([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})]]></param> + <message key="chorem.date.wrongFormat" /> + </field-validator> + </field> + <field name="endDate"> + <field-validator type="regex"> + <param name="expression"><![CDATA[([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})]]></param> + <message key="chorem.date.wrongFormat" /> + </field-validator> + </field> +</validators> Property changes on: trunk/chorem-web/src/main/resources/org/chorem/bonzoms/action/EmploymentContractAction-validation.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: trunk/chorem-web/src/main/resources/struts.xml =================================================================== --- trunk/chorem-web/src/main/resources/struts.xml 2011-03-25 09:14:58 UTC (rev 42) +++ trunk/chorem-web/src/main/resources/struts.xml 2011-03-25 11:01:27 UTC (rev 43) @@ -34,9 +34,22 @@ <result name="error">/WEB-INF/jsp/bonzoms/addPerson.jsp</result> <result type="redirectAction">home</result> </action> - <action name="addContactDetails"> + <action name="addContactDetails_input"> <result>/WEB-INF/jsp/bonzoms/addContactDetails.jsp</result> </action> + <action name="addContactDetails" class="org.chorem.bonzoms.action.ContactDetailsAction" method="add"> + <result name="input">/WEB-INF/jsp/bonzoms/addContactDetails.jsp</result> + <result name="error">/WEB-INF/jsp/bonzoms/addContactDetails.jsp</result> + <result type="redirectAction">home</result> + </action> + <action name="addEmploymentContract_input"> + <result>/WEB-INF/jsp/bonzoms/addEmploymentContract.jsp</result> + </action> + <action name="addEmploymentContract" class="org.chorem.bonzoms.action.EmploymentContractAction" method="add"> + <result name="input">/WEB-INF/jsp/bonzoms/addEmploymentContract.jsp</result> + <result name="error">/WEB-INF/jsp/bonzoms/addEmploymentContract.jsp</result> + <result type="redirectAction">home</result> + </action> </package> <package name="gepeto" namespace="/gepeto" extends="struts-default"> Added: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addEmploymentContract.jsp =================================================================== --- trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addEmploymentContract.jsp (rev 0) +++ trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addEmploymentContract.jsp 2011-03-25 11:01:27 UTC (rev 43) @@ -0,0 +1,34 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@taglib prefix="s" uri="/struts-tags" %> + +<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" + xmlns:jsp="http://java.sun.com/JSP/Page"> + <head> + <title><s:text name="chorem.bonzoms.employmentContract.add" /></title> + <s:head /> + </head> + <body> + <h2><s:text name="chorem.bonzoms.employmentContract.add" /></h2> + <s:actionerror /> + <s:form action="addEmploymentContract" method="post"> + <fieldset> + <legend><s:text name="chorem.bonzoms.employmentContract" /></legend> + <s:textfield key="chorem.bonzoms.employmentContract.type" name="type" labelSeparator=": " /> + <br /> + <br /> + <s:textarea key="chorem.bonzoms.employmentContract.description" name="description" cols="50" rows="10" labelposition="top" /> + <br /> + <br /> + <s:textfield key="chorem.bonzoms.employmentContract.salary" name="salary" labelSeparator=": " /> + <br /> + <s:textfield key="chorem.bonzoms.employmentContract.workingTime" name="workingTime" labelSeparator=": " /> + <br /> + <s:textfield key="chorem.bonzoms.employmentContract.beginDate" name="beginDate" labelSeparator=": " /> + <br /> + <s:textfield key="chorem.bonzoms.employmentContract.endDate" name="endDate" labelSeparator=": " /> + <br /> + <s:submit key="chorem.bonzoms.person.add" name="submit" /> + </fieldset> + </s:form> + </body> +</html> Property changes on: trunk/chorem-web/src/main/webapp/WEB-INF/jsp/bonzoms/addEmploymentContract.jsp ___________________________________________________________________ Added: svn:mime-type + text/plain
participants (1)
-
vbriand@users.chorem.org