-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move file uploader above the send button (dvsa/olcs-selfserve#98)
* feat: Move file uploader above the send button * fix: Remove guidance from reply * fix: Controller tests * fix: Whitespace
- Loading branch information
Showing
7 changed files
with
223 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
app/selfserve/module/Olcs/src/Form/Model/Fieldset/Message/Actions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Olcs\Form\Model\Fieldset\Message; | ||
|
||
use Common\Form\Elements\InputFilters\ActionButton; | ||
use Common\Form\Elements\Types\GuidanceTranslated; | ||
use Laminas\Form\Annotation as Form; | ||
|
||
class Actions | ||
{ | ||
/** | ||
* @Form\Attributes({ | ||
* "value": "markup-messaging-new-conversation-timeframe", | ||
* "id": "guidance" | ||
* }) | ||
* @Form\Type(GuidanceTranslated::class) | ||
*/ | ||
public ?GuidanceTranslated $guidance = null; | ||
|
||
/** | ||
* @Form\Attributes({ | ||
* "type": "submit", | ||
* "data-module": "govuk-button", | ||
* "class": "govuk-button govuk-button--default", | ||
* "id": "send" | ||
* }) | ||
* @Form\Options({ | ||
* "label": "Send message" | ||
* }) | ||
* @Form\Type(ActionButton::class) | ||
*/ | ||
public ?ActionButton $send = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
app/selfserve/module/Olcs/src/Form/Model/Fieldset/Message/CreateInput.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Olcs\Form\Model\Fieldset\Message; | ||
|
||
use Common\Form\Element\DynamicSelect; | ||
use Common\Service\Data\MessagingSubject; | ||
use Laminas\Filter\StringTrim; | ||
use Laminas\Form\Annotation as Form; | ||
use Laminas\Form\Element\Textarea; | ||
use Laminas\Validator\StringLength; | ||
use Olcs\Service\Data\MessagingAppOrLicNo; | ||
|
||
class CreateInput | ||
{ | ||
/** | ||
* @Form\Options({ | ||
* "label": "messaging.subject", | ||
* "empty_option": "Please select", | ||
* "disable_inarray_validator": false, | ||
* "service_name": MessagingSubject::class | ||
* }) | ||
* @Form\Attributes({ | ||
* "class": "govuk-select" | ||
* }) | ||
* @Form\Type(DynamicSelect::class) | ||
* @Form\Required(true) | ||
*/ | ||
public ?DynamicSelect $messageSubject = null; | ||
|
||
/** | ||
* @Form\Options({ | ||
* "label": "messaging.app-or-lic-no", | ||
* "empty_option": "Please select", | ||
* "disable_inarray_validator": false, | ||
* "service_name": MessagingAppOrLicNo::class, | ||
* "use_groups": true | ||
* }) | ||
* @Form\Attributes({ | ||
* "class": "govuk-select" | ||
* }) | ||
* @Form\Type(DynamicSelect::class) | ||
* @Form\Required(true) | ||
*/ | ||
public ?DynamicSelect $appOrLicNo = null; | ||
|
||
/** | ||
* @Form\Attributes({ | ||
* "class": "extra-long", | ||
* "maxlength": 1000 | ||
* }) | ||
* @Form\Options({ | ||
* "label": "", | ||
* "hint": "You can enter up to 1000 characters" | ||
* }) | ||
* @Form\Required(true) | ||
* @Form\Type(Textarea::class) | ||
* @Form\Filter(StringTrim::class) | ||
* @Form\Validator(StringLength::class, options={"min": 5, "max": 1000}) | ||
*/ | ||
public ?Textarea $messageContent = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/selfserve/module/Olcs/src/Form/Model/Fieldset/Message/ReplyInput.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Olcs\Form\Model\Fieldset\Message; | ||
|
||
use Laminas\Filter\StringTrim; | ||
use Laminas\Form\Annotation as Form; | ||
use Laminas\Form\Element\Textarea; | ||
use Laminas\Validator\StringLength; | ||
|
||
class ReplyInput | ||
{ | ||
/** | ||
* @Form\Attributes({ | ||
* "class": "extra-long", | ||
* "maxlength": 1000 | ||
* }) | ||
* @Form\Options({ | ||
* "label": "", | ||
* "hint": "You can enter up to 1000 characters" | ||
* }) | ||
* @Form\Required(true) | ||
* @Form\Type(Textarea::class) | ||
* @Form\Filter(StringTrim::class) | ||
* @Form\Validator(StringLength::class, options={"min": 5, "max": 1000}) | ||
*/ | ||
public ?TextArea $reply = null; | ||
} |
Oops, something went wrong.