diff options
author | msquare <msquare@notrademark.de> | 2016-09-27 17:49:13 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-09-27 17:49:39 +0200 |
commit | 031fc3057c46245cd62fc39f2d11ee3f0a393e06 (patch) | |
tree | ba0b4fbf68e7bc8e706d1ee6dd8b9d2987dd9c65 /includes/view | |
parent | 45bbf95972777e9499996d56a873c2a304815b3f (diff) |
rename settings to event config and implement mvc pattern on it
Diffstat (limited to 'includes/view')
-rw-r--r-- | includes/view/EventConfigView.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/includes/view/EventConfigView.php b/includes/view/EventConfigView.php new file mode 100644 index 00000000..a00a26ed --- /dev/null +++ b/includes/view/EventConfigView.php @@ -0,0 +1,41 @@ +<?php + +/** + * Render edit page for event config. + * @param string $event_name The event name + * @param string $event_welcome_msg The welcome message + * @param date $buildup_start_date + * @param date $event_start_date + * @param date $event_end_date + * @param date $teardown_end_date + */ +function EventConfig_edit_view($event_name, $event_welcome_msg, $buildup_start_date, $event_start_date, $event_end_date, $teardown_end_date) { + return page_with_title(admin_settings_title(), [ + msg(), + form([ + div('row', [ + div('col-md-6', [ + form_text('event_name', _("Event Name"), $event_name), + form_info('', _("Event Name is shown on the start page.")), + form_textarea('event_welcome_msg', _("Event Welcome Message"), $event_welcome_msg), + form_info('', _("Welcome message is shown after successful registration. You can use markdown.")) + ]), + div('col-md-3', [ + form_date('buildup_start_date', _("Buildup date"), $buildup_start_date), + form_date('event_start_date', _("Event start date"), $event_start_date) + ]), + div('col-md-3', [ + form_date('teardown_end_date', _("Teardown end date"), $teardown_end_date), + form_date('event_end_date', _("Event end date"), $event_end_date) + ]) + ]), + div('row', [ + div('col-md-6', [ + form_submit('submit', _("Save")) + ]) + ]) + ]) + ]); +} + +?>
\ No newline at end of file |