| main/src/main/java/com/bloatit/web/linkable/features/create/CreateFeatureAndOfferPage.java |
| 92 | 92 | |
| 93 | 93 | final HtmlTitleBlock offerPageContainer = new HtmlTitleBlock(Context.tr("Create a feature"), 1); |
| 94 | 94 | |
| 95 | |
| 96 | |
| 95 | 97 | // Create offer form |
| 96 | 98 | final CreateFeatureAndOfferActionUrl offerActionUrl = new CreateFeatureAndOfferActionUrl(getSession().getShortKey(), process); |
| 97 | 99 | final HtmlForm offerForm = new HtmlForm(offerActionUrl.urlString()); |
| 98 | 100 | |
| 101 | // Locale |
| 102 | offerForm.add(new LanguageField(offerActionUrl, // |
| 103 | Context.tr("Description language"), // |
| 104 | Context.tr("The language of the title and description. These texts can be translated in other language later."))); |
| 105 | |
| 106 | |
| 99 | 107 | // Title of the feature |
| 100 | 108 | final FieldData descriptionFieldData = offerActionUrl.getDescriptionParameter().pickFieldData(); |
| 101 | 109 | final HtmlTextField titleInput = new HtmlTextField(descriptionFieldData.getName(), tr("Title")); |
| ... | ... | |
| 144 | 152 | dateInput.addErrorMessages(dateData.getErrorMessages()); |
| 145 | 153 | dateInput.setComment(Context.tr("You will have to release this feature before the release date.")); |
| 146 | 154 | offerForm.add(dateInput); |
| 147 | | |
| 155 | |
| 148 | 156 | // Specification |
| 149 | 157 | final FieldData specificationData = offerActionUrl.getSpecificationParameter().pickFieldData(); |
| 150 | 158 | final HtmlTextArea specificationInput = new HtmlTextArea(specificationData.getName(), Context.tr("Description"), 10, 80); |
| ... | ... | |
| 195 | 203 | |
| 196 | 204 | offerForm.add(licenseInput); |
| 197 | 205 | |
| 198 | | // locale |
| 199 | | offerForm.add(new LanguageField(offerActionUrl, // |
| 200 | | Context.tr("description language"), // |
| 201 | | Context.tr("The language of the description."))); |
| 202 | 206 | |
| 203 | 207 | final HtmlDiv validationDetails = new HtmlDiv(); |
| 204 | 208 | final HtmlParagraph showHideLink = new HtmlParagraph(Context.tr("Show validation details")); |
| main/src/main/java/com/bloatit/web/linkable/features/create/CreateFeaturePage.java |
| 53 | 53 | public static final int SPECIF_INPUT_NB_LINES = 20; |
| 54 | 54 | public static final int SPECIF_INPUT_NB_COLUMNS = 100; |
| 55 | 55 | public static final int FILE_MAX_SIZE_MIO = 2; |
| 56 | | |
| 56 | |
| 57 | 57 | @NonOptional(@tr("The process is closed, expired, missing or invalid.")) |
| 58 | 58 | @RequestParam(role = Role.PAGENAME) |
| 59 | 59 | CreateFeatureProcess process; |
| 60 | | |
| 61 | | |
| 60 | |
| 62 | 61 | private final CreateFeaturePageUrl url; |
| 63 | | |
| 62 | |
| 64 | 63 | public CreateFeaturePage(final CreateFeaturePageUrl url) { |
| 65 | 64 | super(url); |
| 66 | 65 | this.url = url; |
| ... | ... | |
| 94 | 93 | |
| 95 | 94 | createFeatureTitle.add(createFeatureForm); |
| 96 | 95 | |
| 96 | // Locale |
| 97 | createFeatureForm.add(new LanguageField(doCreateUrl, // |
| 98 | Context.tr("Description language"), // |
| 99 | Context.tr("The language of the title and description. These texts can be translated in other language later."))); |
| 100 | |
| 97 | 101 | // Title of the feature |
| 98 | 102 | final FieldData descriptionFieldData = doCreateUrl.getDescriptionParameter().pickFieldData(); |
| 99 | 103 | final HtmlTextField titleInput = new HtmlTextField(descriptionFieldData.getName(), tr("Title")); |
| ... | ... | |
| 113 | 117 | softwareInput.addDropDownElement(String.valueOf(software.getId()), software.getName()); |
| 114 | 118 | } |
| 115 | 119 | softwareInput.setComment(Context.tr("On what software do you want to have this feature. Select 'new software' if your feature is the creation of a new software.")); |
| 116 | | |
| 120 | |
| 117 | 121 | if (softwareFieldData.getSuggestedValue() != null) { |
| 118 | 122 | softwareInput.setDefaultValue(softwareFieldData.getSuggestedValue()); |
| 119 | 123 | } |
| 120 | | |
| 124 | |
| 121 | 125 | createFeatureForm.add(softwareInput); |
| 122 | 126 | |
| 123 | 127 | // As team input |
| ... | ... | |
| 160 | 164 | // Markdown previewer |
| 161 | 165 | final MarkdownPreviewer mdPreview = new MarkdownPreviewer(specificationInput); |
| 162 | 166 | createFeatureForm.add(mdPreview); |
| 163 | | |
| 164 | | // Language |
| 165 | | createFeatureForm.add(new LanguageField(doCreateUrl, tr("Description language"), tr("The language of the description you just wrote."))); |
| 166 | 167 | |
| 167 | 168 | // Attachment |
| 168 | 169 | createFeatureForm.add(new AttachmentField(doCreateUrl, FILE_MAX_SIZE_MIO + " Mio")); |
| main/src/main/java/com/bloatit/web/linkable/offer/MakeOfferPage.java |
| 139 | 139 | dateInput.setComment(Context.tr("You will have to release this feature before the release date.")); |
| 140 | 140 | offerForm.add(dateInput); |
| 141 | 141 | |
| 142 | // locale |
| 143 | offerForm.add(new LanguageField(offerActionUrl, // |
| 144 | Context.tr("Description language"), // |
| 145 | Context.tr("The language of the offer description."))); |
| 146 | |
| 142 | 147 | // Description |
| 143 | 148 | final FieldData descriptionData = offerActionUrl.getDescriptionParameter().pickFieldData(); |
| 144 | 149 | final MarkdownEditor descriptionInput = new MarkdownEditor(descriptionData.getName(), Context.tr("Description"), 10, 80); |
| ... | ... | |
| 171 | 176 | |
| 172 | 177 | offerForm.add(licenseInput); |
| 173 | 178 | |
| 174 | | // locale |
| 175 | | offerForm.add(new LanguageField(offerActionUrl, // |
| 176 | | Context.tr("description language"), // |
| 177 | | Context.tr("The language of the offer description."))); |
| 178 | | |
| 179 | 179 | final HtmlDiv validationDetails = new HtmlDiv(); |
| 180 | 180 | final HtmlParagraph showHideLink = new HtmlParagraph(Context.tr("Show validation details")); |
| 181 | 181 | showHideLink.setCssClass("fake_link"); |
| main/src/main/java/com/bloatit/web/linkable/softwares/CreateSoftwarePage.java |
| 86 | 86 | softwareNameInput.setComment(Context.tr("The name of the existing software.")); |
| 87 | 87 | addSoftwareForm.add(softwareNameInput); |
| 88 | 88 | |
| 89 | // Language |
| 90 | final FieldData languageData = doCreateUrl.getLangParameter().pickFieldData(); |
| 91 | final LanguageSelector languageInput = new LanguageSelector(languageData.getName(), Context.tr("Language")); |
| 92 | languageInput.setDefaultValue(languageData.getSuggestedValue(), Context.getLocalizator().getLanguageCode()); |
| 93 | languageInput.addErrorMessages(languageData.getErrorMessages()); |
| 94 | languageInput.setComment(Context.tr("Language of the description. The description can be translated in other language later.")); |
| 95 | addSoftwareForm.add(languageInput); |
| 96 | |
| 97 | |
| 89 | 98 | // Description |
| 90 | 99 | final FieldData descriptionData = doCreateUrl.getDescriptionParameter().pickFieldData(); |
| 91 | 100 | final MarkdownEditor descriptionInput = new MarkdownEditor(descriptionData.getName(), |
| ... | ... | |
| 101 | 110 | final MarkdownPreviewer mdPreview = new MarkdownPreviewer(descriptionInput); |
| 102 | 111 | addSoftwareForm.add(mdPreview); |
| 103 | 112 | |
| 104 | | // Language |
| 105 | | final FieldData languageData = doCreateUrl.getLangParameter().pickFieldData(); |
| 106 | | final LanguageSelector languageInput = new LanguageSelector(languageData.getName(), Context.tr("Language")); |
| 107 | | languageInput.setDefaultValue(languageData.getSuggestedValue(), Context.getLocalizator().getLanguageCode()); |
| 108 | | languageInput.addErrorMessages(languageData.getErrorMessages()); |
| 109 | | languageInput.setComment(Context.tr("Language of the description.")); |
| 110 | | addSoftwareForm.add(languageInput); |
| 111 | 113 | |
| 112 | 114 | final HtmlFileInput softwareImageInput = new HtmlFileInput(CreateSoftwareAction.IMAGE_CODE, Context.tr("Software logo")); |
| 113 | 115 | softwareImageInput.setComment("Optional. The logo must be an image on a usable license, in png with transparency for the background. The size must be inferior to 64px x 64px."); |