UNPKG

digitalmarketplace-frontend

Version:

Digital Marketplace Frontend contains assets and components used in Digital Marketplace projects

77 lines (76 loc) 10.1 kB
{ "component": "compliance-communication-attachment-row", "fixtures": [ { "name": "default", "options": { "attachment": { "file": { "name": "attachments-0-file", "question": "File", "hint": "The filename can only contain letters, numbers, spaces and/or underscores" }, "required": { "name": "attachments-0-required", "question": "Attachment required", "hint": "Check this to include this attachment" } }, "index": 0 }, "hidden": false, "description": "", "previewLayoutModifiers": [], "html": "<fieldset class=\"govuk-fieldset dm-compliance-communication__attachments-item\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n Attachment <span class=\"dm-compliance-communication__attachments-item-legend-counter\">1</span>\n </legend>\n <input type=\"hidden\" name=\"attachments-0-hidden_tag\" value=\"hidden-tag\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-one-half\">\n \n\n\n\n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"input-attachments-0-file\">\n File\n </label>\n <div id=\"input-attachments-0-file-hint\" class=\"govuk-hint\">\n The filename can only contain letters, numbers, spaces and/or underscores\n </div>\n <div\n class=\"govuk-drop-zone\"\n data-module=\"govuk-file-upload\">\n <input class=\"govuk-file-upload dm-compliance-communication__attachments-item-file\" id=\"input-attachments-0-file\" name=\"attachments-0-file\" type=\"file\" aria-describedby=\"input-attachments-0-file-hint\">\n </div>\n</div>\n\n\n </div>\n <div class=\"govuk-grid-column-one-half\">\n <button type=\"button\" class=\"govuk-button govuk-button--secondary dm-compliance-communication__attachments-item-remove govuk-visually-hidden\" data-module=\"govuk-button\" tabindex=\"-1\">\n Remove attachment <span class=\"dm-compliance-communication__attachments-item-remove-counter\">1</span>\n</button>\n \n\n\n\n\n\n<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset dm-compliance-communication__attachments-item-required\" aria-describedby=\"input-attachments-0-required-hint\">\n <legend class=\"govuk-fieldset__legend \">\n Attachment required\n </legend>\n <div id=\"input-attachments-0-required-hint\" class=\"govuk-hint\">\n Check this to include this attachment\n </div>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"input-attachments-0-required\" name=\"attachments-0-required\" type=\"checkbox\" value=\"true\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"input-attachments-0-required\">\n Attachment required\n </label>\n </div>\n </div>\n </fieldset>\n</div>\n\n\n </div>\n </div>\n\n</fieldset>" }, { "name": "with error message", "options": { "attachment": { "file": { "name": "attachments-0-file", "question": "File", "hint": "The filename can only contain letters, numbers, spaces and/or underscores", "errors": [ "You must select a file for attachment 1" ] }, "required": { "name": "attachments-0-required", "question": "Attachment required", "hint": "Check this to include this attachment", "data": true } }, "index": 0 }, "hidden": false, "description": "", "previewLayoutModifiers": [], "html": "<fieldset class=\"govuk-fieldset dm-compliance-communication__attachments-item\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n Attachment <span class=\"dm-compliance-communication__attachments-item-legend-counter\">1</span>\n </legend>\n <input type=\"hidden\" name=\"attachments-0-hidden_tag\" value=\"hidden-tag\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-one-half\">\n \n\n\n\n\n<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"input-attachments-0-file\">\n File\n </label>\n <div id=\"input-attachments-0-file-hint\" class=\"govuk-hint\">\n The filename can only contain letters, numbers, spaces and/or underscores\n </div>\n <p id=\"input-attachments-0-file-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> You must select a file for attachment 1\n </p>\n <div\n class=\"govuk-drop-zone\"\n data-module=\"govuk-file-upload\">\n <input class=\"govuk-file-upload dm-compliance-communication__attachments-item-file govuk-file-upload--error\" id=\"input-attachments-0-file\" name=\"attachments-0-file\" type=\"file\" aria-describedby=\"input-attachments-0-file-hint input-attachments-0-file-error\">\n </div>\n</div>\n\n\n </div>\n <div class=\"govuk-grid-column-one-half\">\n <button type=\"button\" class=\"govuk-button govuk-button--secondary dm-compliance-communication__attachments-item-remove govuk-visually-hidden\" data-module=\"govuk-button\" tabindex=\"-1\">\n Remove attachment <span class=\"dm-compliance-communication__attachments-item-remove-counter\">1</span>\n</button>\n \n\n\n\n\n\n<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset dm-compliance-communication__attachments-item-required\" aria-describedby=\"input-attachments-0-required-hint\">\n <legend class=\"govuk-fieldset__legend \">\n Attachment required\n </legend>\n <div id=\"input-attachments-0-required-hint\" class=\"govuk-hint\">\n Check this to include this attachment\n </div>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"input-attachments-0-required\" name=\"attachments-0-required\" type=\"checkbox\" value=\"true\" checked>\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"input-attachments-0-required\">\n Attachment required\n </label>\n </div>\n </div>\n </fieldset>\n</div>\n\n\n </div>\n </div>\n\n</fieldset>" }, { "name": "with template", "options": { "attachment": { "file": { "name": "attachments-99-file", "question": "File", "hint": "The filename can only contain letters, numbers, spaces and/or underscores" }, "required": { "name": "attachments-99-required", "question": "Attachment required", "hint": "Check this to include this attachment" } }, "index": 99, "template": true }, "hidden": false, "description": "", "previewLayoutModifiers": [], "html": "<fieldset class=\"govuk-fieldset dm-compliance-communication__attachments-item\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n Attachment <span class=\"dm-compliance-communication__attachments-item-legend-counter\">100</span>\n </legend>\n <input type=\"hidden\" name=\"attachments-99-hidden_tag\" value=\"hidden-tag\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-one-half\">\n \n\n\n\n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"input-attachments-99-file\">\n File\n </label>\n <div id=\"input-attachments-99-file-hint\" class=\"govuk-hint\">\n The filename can only contain letters, numbers, spaces and/or underscores\n </div>\n <div\n class=\"govuk-drop-zone\"\n data-module=\"govuk-file-upload\">\n <input class=\"govuk-file-upload dm-compliance-communication__attachments-item-file\" id=\"input-attachments-99-file\" name=\"attachments-99-file\" type=\"file\" aria-describedby=\"input-attachments-99-file-hint\" tabindex=\"-1\">\n </div>\n</div>\n\n\n </div>\n <div class=\"govuk-grid-column-one-half\">\n <button type=\"button\" class=\"govuk-button govuk-button--secondary dm-compliance-communication__attachments-item-remove govuk-visually-hidden\" data-module=\"govuk-button\" tabindex=\"-1\">\n Remove attachment <span class=\"dm-compliance-communication__attachments-item-remove-counter\">100</span>\n</button>\n \n\n\n\n\n\n<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset dm-compliance-communication__attachments-item-required\" aria-describedby=\"input-attachments-99-required-hint\">\n <legend class=\"govuk-fieldset__legend \">\n Attachment required\n </legend>\n <div id=\"input-attachments-99-required-hint\" class=\"govuk-hint\">\n Check this to include this attachment\n </div>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"input-attachments-99-required\" name=\"attachments-99-required\" type=\"checkbox\" value=\"true\" tabindex=\"-1\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"input-attachments-99-required\">\n Attachment required\n </label>\n </div>\n </div>\n </fieldset>\n</div>\n\n\n </div>\n </div>\n\n</fieldset>" } ] }